Skip to content Skip to navigation
Back to the main support

Get started with the SEOPress REST API

Since SEOPress 5.0, you can request your SEO metadata using our REST API.

2 routes are currently available:

  • /wp-json/seopress/v1/posts/[postId] : replace [postId] by the ID of your post
  • /wp-json/seopress/v1/posts/by-url?url=https://example.com/seopress-best-wordpress-seo-plugin/ replace the URL by the desired permalink

Available method: GET.

You will get in response a JSON with the following informations:

{
    "title": "SEOPress, Best WordPress SEO plugin",
    "description": "My super meta description",
    "canonical": "https://example.com/seopress-best-wordpress-seo-plugin/",
    "og": {
        "title": "My Facebook title",
        "description": "My Facebook description",
        "image": "https://example.com/seopress-best-wordpress-seo-plugin.jpg"
    },
    "twitter": {
        "title": "My Twitter title",
        "description": "My Twitter description",
        "image": "https://example.com/seopress-best-wordpress-seo-plugin.jpg"
    },
    "robots": {
        "noindex": false,
        "nofollow": false,
        "noodp": false,
        "noarchive": false,
        "nosnippet": false,
        "noimageindex": false
    }
}

To request your data, you can for example use the WordPress HTTP API.