Skip to content Skip to navigation

Get started with the SEOPress REST API

Authentification methods

Using WordPress cookies

Headers to send with your request:

  • X-WP-Nonce: open your browser console, enter “wpApiSettings” and copy the nonce
  • Cookie: open your browser console, go to Applications, and copy the name AND the value of this cookie wordpress_logged_in_ (eg: wordpress_logged_in_41432erzre768dffez23456=admin%AREGREJOGRE54Y65KO534KTO4O3TJ43EFFEKZFOEZK£FEZRGTH)

Using Application passwords

SEOPress 6.8 is required.

This is the best solution. Create an application password from your WordPress profile.

Use your WP login (eg: admin) and this new app password to authenticate (choose “Basic Authentification” from Postman or equivalent).

Body (JSON Object) to sent with your request depending on the endpoint:

Title and meta description

{
    "title":"this is SEO title",
    "description":"this is meta description"
}

Target keywords

{
    "_seopress_analysis_target_kw":"keyword1, keyword2"
}

Social metadata

{
    "_seopress_social_fb_title":"my facebook title",
    "_seopress_social_fb_desc":"my facebook description",
    "_seopress_social_fb_img":"facebook image URL",
    "_seopress_social_fb_img_attachment_id":"facebook attachment ID",
    "_seopress_social_fb_img_width":"facebook attachment width",
    "_seopress_social_fb_img_height":"facebook attachment height",
    "_seopress_social_twitter_title":"my twitter title",
    "_seopress_social_twitter_desc":"my twitter description",
    "_seopress_social_twitter_img":"twitter image URL",
    "_seopress_social_twitter_img_attachment_id":"twitter attachment ID",
    "_seopress_social_twitter_img_width":"twitter attachment width",
    "_seopress_social_twitter_img_height":"twitter attachment height"
}

Meta robots

{
    "_seopress_robots_index":"yes",
    "_seopress_robots_follow":"yes",
    "_seopress_robots_archive":"yes",
    "_seopress_robots_snippet":"yes",
    "_seopress_robots_imageindex":"yes",
    "_seopress_robots_canonical":"my canonical URL",
    "_seopress_robots_primary_cat":"my primary cat ID",
    "_seopress_robots_breadcrumbs":"my custom breadcrumbs"
}

Since SEOPress 10.4, the primary term of another public hierarchical taxonomy has its own key, _seopress_robots_primary_term_{taxonomy} (for example _seopress_robots_primary_term_genre). It takes a term ID, or an empty value to remove it. _seopress_robots_primary_cat remains the key for categories and product categories.

Redirection

{
    "_seopress_redirections_enabled":"yes",
    "_seopress_redirections_logged_status":"both|only_logged_in|only_not_logged_in",
    "_seopress_redirections_type":"301|302|307",
    "_seopress_redirections_value":"my redirection URL"
}

Since SEOPress 10.4, only a user with the manage_options or unfiltered_html capability can point a redirection to another website. See Security and headless sites below.

Response:

If success:

{
    "code": "success"
}

If fail:

{
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
        "status": 401
    }
}

or

{
    "code": "rest_cookie_invalid_nonce",
    "message": "Cookie check failed",
    "data": {
        "status": 403
    }
}

or, since SEOPress 10.4, when the redirection target is refused:

{
    "code": "seopress_redirection_external_target",
    "message": "You are not allowed to redirect this content to another website. Use a URL on this site, or ask an administrator.",
    "data": {
        "status": 403
    }
}

Request post metadata

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

These GET routes are public and do not require authentication or the edit_post capability. Post metadata is returned only for published posts of a post type visitors can view (since SEOPress 10.4), when password protection does not block the request.

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.

When metadata is available, the response contains success: true and the metadata in data. Otherwise, data is null. The JSON below shows only the data object; for example, read the title from response.data.title.

{ 
    "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",
        "attachment_id": "1",
        "image_width": "1920",
        "image_height": "1080"
    }, 
    "twitter": { 
        "title": "My Twitter title", 
        "description": "My Twitter description", 
        "image": "https://example.com/seopress-best-wordpress-seo-plugin.jpg",
        "attachment_id": "1",
        "image_width": "1920",
        "image_height": "1080"
    },
    "robots": {
        "noindex": false, 
        "nofollow": false, 
        "nosnippet": false, 
        "noimageindex": false 
    },
    "primarycat": "1",
    "breadcrumbs": "my custom breadcrumbs for current item",
    "redirections": {
        "enabled": true,
        "status":"both",
        "type":"301",
        "value":"https://example.com/destination-url/"
    }
}

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

Request term metadata

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

This GET route is public, with or without the taxonomy parameter, and does not require authentication or the edit_post capability. Since SEOPress 10.4, it only describes terms of a publicly queryable taxonomy, and the term must belong to the taxonomy you request: for a WooCommerce product category, for example, add ?taxonomy=product_cat.

2 routes are currently available:

  • /wp-json/seopress/v1/terms/[termId] : replace [termId] by the ID of your term
  • /wp-json/seopress/v1/terms/[termId]?taxonomy=[yourCustomTaxonomy] similar to the previous route, with taxonomy argument (default: “category” if not provided)

Available method: GET.

When metadata is available, the response contains success: true and the metadata in data. Otherwise, data is null. The JSON below shows only the data object; for example, read the title from response.data.title.

{ 
    "title": "My super term title", 
    "description": "My super term meta description",
    "canonical": "https://example.com/seopress-best-wordpress-seo-plugin/",
    "og": { 
        "title": "My Facebook term title", 
        "description": "My Facebook term description", 
        "image": "https://example.com/term-seopress-best-wordpress-seo-plugin.jpg",
        "attachment_id": "1",
        "image_width": "1920",
        "image_height": "1080" 
    }, 
    "twitter": { 
        "title": "My Twitter term title", 
        "description": "My Twitter term description", 
        "image": "https://example.com/term-seopress-best-wordpress-seo-plugin.jpg",
        "attachment_id": "1",
        "image_width": "1920",
        "image_height": "1080"
    }, 
    "robots": { 
        "noindex": false, 
        "nofollow": false, 
        "nosnippet": false, 
        "noimageindex": false 
    },
    "breadcrumbs": "my custom breadcrumbs for current item",
    "redirections": {
        "enabled": true,
        "status":"both",
        "type":"301",
        "value":"https://example.com/destination-url/"
    }
}

Send post metadata

To write SEO post metadata, you can use these endpoints:

  • title and meta description: /wp-json/seopress/v1/posts/[postId]/title-description-metas
  • target keywords: /wp-json/seopress/v1/posts/[postId]/target-keywords
  • social meta: /wp-json/seopress/v1/posts/[postId]/social-settings
  • meta robots: /wp-json/seopress/v1/posts/[postId]/meta-robot-settings
  • redirection: /wp-json/seopress/v1/posts/[postId]/redirection-settings

Required user capability for security: edit_post

Available method: PUT.

A role checked in SEO > Advanced settings > Security cannot use these routes, as in the SEO metabox: SEO metaboxes: blocked roles for all of them, Content Analysis: blocked roles for the target keywords. Since SEOPress 10.4, the same restriction applies when these routes are read with GET, and the redirection target is checked (see below).

Security and headless sites (since SEOPress 10.4)

SEOPress 10.4 tightens what the REST API shows to visitors and what each role can change. If you run a headless front end, or an integration that reads or writes SEO data, check the points below.

Public routes only describe public content

The public routes seopress/v1/posts/[postId], seopress/v1/posts/by-url and seopress/v1/terms/[termId] are open to anyone. They now only describe content a visitor could already reach:

  • posts of a viewable post type (posts, pages, products, public custom post types). Reusable blocks, template parts and the internal records of other plugins return data: null, even when they are published;
  • terms of a publicly queryable taxonomy, and only when the term exists in the taxonomy you request.

To expose an internal post type or taxonomy on purpose, for example for an integration that relied on the previous behaviour, use these filters. Drafts and password-protected posts stay hidden whatever the post filter returns.

// Describe the posts of an internal post type in the public SEO route.
add_filter( 'seopress_api_public_post_is_readable', function( $allowed, $post_id, $post_type ) {
	if ( 'my_internal_type' === $post_type ) {
		return true;
	}
	return $allowed;
}, 10, 3 );

// Describe the terms of a non-public taxonomy in the public SEO route.
add_filter( 'seopress_api_public_term_is_readable', function( $allowed, $term_id, $taxonomy ) {
	if ( 'my_internal_taxonomy' === $taxonomy && term_exists( $term_id, $taxonomy ) ) {
		return true;
	}
	return $allowed;
}, 10, 3 );

SEO metas in the WordPress core routes (/wp/v2)

SEOPress registers its post metas on the WordPress core REST routes (/wp/v2/posts, /wp/v2/pages, etc.) so the block editor can read and save them. Until 10.4, they were also printed in the public responses of these routes. Since SEOPress 10.4:

  • a user who cannot edit the post, visitors included, no longer gets any SEOPress meta (_seopress_*) in the meta field. By default, no key stays public;
  • a user who can edit the post keeps them, except the keys of an area their role is blocked from in SEO > Advanced settings > Security (for example the target keywords for a role checked in Content Analysis: blocked roles).

For a headless front end, the recommended source is the seopress/v1/posts/[postId] route: it returns the values as they are rendered. If your front end reads the raw metas from /wp/v2, list the keys that must stay public with the seopress_rest_public_meta_keys filter:

// Keep the SEO title and meta description in public /wp/v2 responses.
add_filter( 'seopress_rest_public_meta_keys', function( $keys, $post ) {
	$keys[] = '_seopress_titles_title';
	$keys[] = '_seopress_titles_desc';
	return $keys;
}, 10, 2 );

Only list the keys your front end needs: the target keywords, a redirection that is not enabled or the content analysis settings are not meant to be public.

Redirections to another website

Any user who can edit a post can enable its redirection. Since SEOPress 10.4, the target of a post or term redirection must be on your site, unless the user has the manage_options or unfiltered_html capability. This stops a user from turning one of your URLs into a link to any domain (an open redirect).

  • A target on your site, or on a host added with the WordPress allowed_redirect_hosts filter, is always accepted.
  • Keeping the target already saved is accepted, so an author can still update a post an administrator redirected.
  • Nothing is checked when no user is logged in (cron, WP-CLI, imports).
  • The redirections manager of SEOPress PRO is not affected: it has its own capabilities.

The rule applies to every way of saving a post or term redirection, the REST API included. With PUT /wp-json/seopress/v1/posts/[postId]/redirection-settings, a refused target returns the seopress_redirection_external_target error (HTTP 403) and nothing is saved. Through /wp/v2, the previous target is silently kept. To let more users redirect to another website, use the seopress_redirection_external_target_allowed filter:

// Accept the shop subdomain as a redirection target for every user who can edit the post.
add_filter( 'seopress_redirection_external_target_allowed', function( $allowed, $url ) {
	if ( 'shop.example.com' === wp_parse_url( $url, PHP_URL_HOST ) ) {
		return true;
	}
	return $allowed;
}, 10, 2 );

SEO metabox restrictions on the read routes

The write routes of the SEO metabox already refused a role checked in SEO > Advanced settings > Security. Since SEOPress 10.4, the GET routes the metabox reads follow the same rule, so a blocked role can no longer fetch the fields the metabox hides from it. Administrators are never blocked.

Route Refused when the role is checked in
title-description-metas, target-keywords, meta-robot-settings, preview-title-description-metas, page-preview, count-target-keywords-use both SEO metaboxes: blocked roles and Content Analysis: blocked roles
social-settings, redirection-settings, redirection-test SEO metaboxes: blocked roles
content-analysis (GET) and content-analysis/analyze (POST) Content Analysis: blocked roles

All these routes live under /wp-json/seopress/v1/posts/[postId]/ and still require the edit_post capability. The SEOPress abilities that change SEO settings apply the same role restrictions since 10.4 (reading stays allowed there), see Using SEOPress abilities (Free & PRO).

Request SEOPress’ settings

Since SEOPress 5.5, you can request your SEOPress’ global settings using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

10 routes are currently available:

  • /wp-json/seopress/v1/options/dashboard-settings: Dashboard settings
  • /wp-json/seopress/v1/options/titles-settings: Titles and metas settings
  • /wp-json/seopress/v1/options/social-settings: Social networks settings
  • /wp-json/seopress/v1/options/sitemaps-settings: Sitemaps settings
  • /wp-json/seopress/v1/options/analytics-settings: Analytics settings
  • /wp-json/seopress/v1/options/advanced-settings: Advanced settings
  • /wp-json/seopress/v1/options/bot-settings: Bot settings
  • /wp-json/seopress/v1/options/indexing-settings: Instant Indexing settings
  • /wp-json/seopress/v1/options/license-settings: License settings
  • /wp-json/seopress/v1/options/pro-settings: PRO settings

Available method: GET.

You will get in response a JSON with the following informations (eg. with Dashboard settings):

{
  "cards_order": [
    "seopress-page-list",
    "notice-insights-alert",
    "seopress-news-panel"
  ],
  "toggle-rich-snippets": "1",
  "toggle-404": "1",
  "toggle-bot": "1",
  "toggle-titles": "1",
  "toggle-white-label": "0",
  "toggle-social": "1",
  "toggle-xml-sitemap": "1",
  "toggle-google-analytics": "1",
  "toggle-advanced": "1",
  "toggle-woocommerce": "1",
  "toggle-edd": "1",
  "toggle-local-business": "1",
  "toggle-dublin-core": "1",
  "toggle-breadcrumbs": "1",
  "toggle-robots": "1",
  "toggle-news": "1",
  "toggle-rewrite": "1",
  "toggle-instant-indexing": "1",
  "notice-wizard": "1"
}

Request Instant Indexing history

Since SEOPress 10.4, every URL submitted to IndexNow or Google, manually or automatically, is recorded in a history you can request using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability, except for the per-post route (edit_post).

2 routes are currently available:

  • /wp-json/seopress/v1/instant-indexing/history: the whole history, newest first, list of available arguments below:
    • page (optional): integer, default 1
    • per_page (optional): integer, 1 to 100, default 20
    • search (optional): string, part of a URL
    • source (optional): manual or auto
  • /wp-json/seopress/v1/posts/[postId]/indexing-history: the last 20 submissions of a post, replace [postId] by the ID of your post

Available methods: GET, and DELETE on /instant-indexing/history to clear the whole history.

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

{
    "items": [
        {
            "id": 42,
            "url": "https://example.com/my-post/",
            "post_id": 123,
            "engine": "indexnow",
            "source": "auto",
            "status_code": 200,
            "success": true,
            "message": "",
            "date_gmt": "2026-10-28T09:15:00+00:00",
            "date": "October 28, 2026 9:15 am"
        }
    ],
    "total": 1,
    "total_pages": 1,
    "max_rows": 5000
}

engine is indexnow or google. The per-post route returns items, plus automatic (whether automatic submission is turned on) and history_url (the link to the History tab, empty for a user who cannot open it). The history keeps the 5,000 most recent rows by default, one row per URL and per search engine. Change this number with the seopress_instant_indexing_history_max_rows filter; 0 stops recording.

Request Redirections

Since SEOPress 8.8, you can request your SEOPress’ redirections using our REST API.

Note that for security reasons, you must be logged in with a user having the read_redirection capability.

1 route is currently available:

  • /wp-json/seopress/v1/redirections: to get all redirects, list of available arguments below:
    • id (optional): integer, redirect ID
    • enabled (optional): string, yes or no
    • type (optional): array of redirect types, 301, 302, 307, 404, 410, 451

Available method: GET.

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

{
  "success": true,
  "data": {
    "1681": {
      "origin": "my-origin-redirect",
      "destination": "https://www.seopress.org/redirect",
      "enabled": "yes",
      "type": "301",
      "param": "",
      "enabled_regex": "",
      "logged_status": "",
      "ip": "",
      "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",
      "full_origin": "",
      "date_request": "",
      "count": "14",
      "redirect_date_request": "1747125367"
    }
  }
}

Request Search Console reports of your posts

Since SEOPress 5.7, you can request your Google Search Console reports of your posts using our REST API.

Note that for security reasons, you must be logged in with a user having the edit_post capability.

1 route is currently available:

  • /wp-json/seopress/v1/posts/[postID]/inspect : replace [postID] by the ID of your post

Available method: GET, POST.

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

{
    "google_api_key_is_empty": false,
    "data": {
        "inspectionResult": {
            "inspectionResultLink": "https://search.google.com/search-console/inspect?resource_id=https://example.com/&id=xxxxxxxx&utm_medium=link&utm_source=api",
            "indexStatusResult": {
                "coverageState": "Indexed, not submitted in sitemap",
                "crawledAs": "MOBILE",
                "googleCanonical": "https://example.com/",
                "indexingState": "INDEXING_ALLOWED",
                "lastCrawlTime": "2022-04-29T13:25:27Z",
                "pageFetchState": "SUCCESSFUL",
                "referringUrls": [
                    "https://www.example.com/"
                ],
                "robotsTxtState": "ALLOWED",
                "sitemap": null,
                "userCanonical": "https://example.com/",
                "verdict": "PASS"
            },
            "mobileUsabilityResult": {
                "verdict": "PASS"
            },
            "richResultsResult": {
                "verdict": "PASS",
                "detectedItems": [
                {
                    "richResultType": "Logos",
                    "items": [
                    {
                        "name": "Unnamed item"
                    }
                    ]
                },
                {
                    "richResultType": "Sitelinks searchbox",
                    "items": [
                        {
                            "name": "Unnamed item"
                        }
                        ]
                    }
                ]
            }
        }
    }
}

Request SEO alerts

Since SEOPress PRO 9.7 | PRO

/wp-json/seopress/v1/alerts

Method: GET

Returns real-time status of the three SEO alert checks: homepage noindex detection, robots.txt reachability, and XML sitemap reachability. Results are cached for 5 minutes.

Examples

  • Get SEO alerts: /wp-json/seopress/v1/alerts
  • Force a fresh check (bypasses cache): /wp-json/seopress/v1/alerts?force=true

Parameters

Argument Description
[force] Boolean. Bypass cache and force a fresh check. Default: false. Rate-limited to once per user per 60 seconds.

Response

{
    "homepage_noindex": {
        "status": "ok",
        "checked_url": "https://example.com",
        "noindex_found": false
    },
    "robots_txt": {
        "status": "ok",
        "checked_url": "https://example.com/robots.txt",
        "http_code": 200
    },
    "xml_sitemap": {
        "status": "error",
        "checked_url": "https://example.com/sitemaps.xml",
        "http_code": 404
    },
    "timestamp": "2026-03-31T12:00:00+00:00"
}

Required capability: manage_options

Request automatic schemas

Since SEOPress PRO 9.7 | PRO

/wp-json/seopress/v1/schemas

Method: GET

Returns all automatic schema templates (structured data) configured in SEOPress.

Examples

  • Get all schemas: /wp-json/seopress/v1/schemas
  • Filter by schema type: /wp-json/seopress/v1/schemas?type=faq

Parameters

Argument Description
[type] Filter schemas by type. Accepted values: articles, localbusiness, faq, howto, courses, recipes, jobs, videos, events, products, softwareapp, services, review, custom.

Response

{
    "data": [
        {
            "id": 123,
            "title": "My FAQ Schema",
            "type": "faq",
            "rules": [...],
            "meta": {
                "_seopress_pro_rich_snippets_faq_...": "..."
            }
        }
    ],
    "total": 1
}

Required capability: edit_schemas

Request a single automatic schema

/wp-json/seopress/v1/schemas/[schemaId]

Method: GET

Returns a single automatic schema template by its ID.

Parameters

Argument Description
<schemaId> The schema ID.

Required capability: edit_schema

Create an automatic schema

/wp-json/seopress/v1/schemas

Method: POST

Creates a new automatic schema template.

JSON body

{
    "title": "My FAQ Schema",
    "type": "faq",
    "rules": [...],
    "meta": {
        "_seopress_pro_rich_snippets_faq_...": "..."
    }
}

Parameters

Argument Description
<title> The schema title. Required.
<type> The schema type. Required. Accepted values: articles, localbusiness, faq, howto, courses, recipes, jobs, videos, events, products, softwareapp, services, review, custom.
[rules] Targeting rules (post types, taxonomies, etc.). Optional.
[meta] Schema meta values. Keys must start with _seopress_pro_rich_snippets_. Optional.

Required capability: publish_schemas

Update an automatic schema

/wp-json/seopress/v1/schemas/[schemaId]

Method: PUT

Updates an existing automatic schema template.

Parameters

Argument Description
<schemaId> The schema ID.
[title] The schema title.
[type] The schema type.
[rules] Targeting rules.
[meta] Schema meta values.

Required capability: edit_schema

Delete an automatic schema

/wp-json/seopress/v1/schemas/[schemaId]

Method: DELETE

Deletes an automatic schema template.

Parameters

Argument Description
<schemaId> The schema ID.

Required capability: delete_schema

Request manual schemas for a post

Since SEOPress PRO 5.0 | PRO

/wp-json/seopress/v1/posts/[postId]/schemas-manual

Method: GET

Returns the manual rich snippets (structured data) configured for a specific post, along with the available schema types and their fields.

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Send manual schemas for a post

/wp-json/seopress/v1/posts/[postId]/schemas-manual

Method: PUT

Updates the manual rich snippets for a specific post.

JSON body

{
    "schemas": [
        {
            "_seopress_pro_rich_snippets_type": "faq",
            "_seopress_pro_rich_snippets_faq": [...]
        }
    ]
}

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Request video sitemap data for a post

Since SEOPress PRO 5.0 | PRO

/wp-json/seopress/v1/posts/[postId]/video-sitemap

Method: GET

Returns video sitemap data for a specific post, including all video entries and their fields (URL, title, description, thumbnail, duration, rating, etc.).

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Send video sitemap data for a post

Since SEOPress PRO 5.1

/wp-json/seopress/v1/posts/[postId]/video-sitemap

Method: PUT

Updates video sitemap data for a specific post.

JSON body

{
    "_seopress_video_disabled": false,
    "videos": [
        {
            "url": "https://www.youtube.com/watch?v=xxxxx",
            "title": "My Video Title",
            "desc": "My video description",
            "thumbnail": "https://example.com/thumb.jpg",
            "duration": 120,
            "rating": 4.5,
            "tag": "seo, wordpress",
            "family_friendly": false,
            "internal_video": false,
            "view_count": 1500
        }
    ]
}

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Request Google News settings for a post

Since SEOPress PRO 5.0 | PRO

/wp-json/seopress/v1/posts/[postId]/google-news-settings

Method: GET

Returns the Google News sitemap settings for a specific post.

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Send Google News settings for a post

Since SEOPress PRO 5.1

/wp-json/seopress/v1/posts/[postId]/google-news-settings

Method: PUT

Updates the Google News sitemap settings for a specific post.

JSON body

{
    "_seopress_news_disabled": "yes"
}

Parameters

Argument Description
<postId> The post ID.
<_seopress_news_disabled> Set to “yes” to exclude the post from the Google News Sitemap. Omit or set to any other value to include it.

Required capability: edit_post

Generate SEO metadata with AI

Since SEOPress PRO 5.0 | PRO

/wp-json/seopress/v1/posts/[postId]/generate-metas-by-ai

Method: POST

Generates an SEO title and meta description for a post using AI.

Examples

  • Generate metadata in French: POST /wp-json/seopress/v1/posts/123/generate-metas-by-ai {"lang": "fr_FR"}

Parameters

Argument Description
<postId> The post ID.
[lang] Language/locale for generation. Optional. Default: site locale (e.g. en_US).

Required capability: edit_post

Generate social metadata with AI

Since SEOPress PRO 9.4 | PRO

/wp-json/seopress/v1/posts/[postId]/generate-social-metas-by-ai

Method: POST

Generates social media meta tags (Open Graph or Twitter) for a post using AI.

Examples

  • Generate a Facebook title in English: POST /wp-json/seopress/v1/posts/123/generate-social-metas-by-ai {"platform": "facebook", "meta_type": "title", "lang": "en_US"}

Parameters

Argument Description
<postId> The post ID.
<platform> The social platform. Accepted values: “facebook”, “twitter”.
<meta_type> Which meta to generate. Accepted values: “title”, “desc”.
[lang] Language/locale for generation. Optional. Default: site locale.

Required capability: edit_post

Request significant keywords suggestions

Since SEOPress PRO 5.0 | PRO

/wp-json/seopress/v1/posts/[postId]/significant-keywords

Method: GET

Returns keyword suggestions based on the post content analysis.

Parameters

Argument Description
<postId> The post ID.

Response

{
    "suggestions": [
        {"keyword": "seo", "count": 12, "density": 2.5},
        {"keyword": "wordpress", "count": 8, "density": 1.7}
    ]
}

Required capability: edit_post

Request SEO issues

Since SEOPress 8.2, you can request your SEO issues (Site Audit feature) using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

2 routes are currently available:

  • /wp-json/seopress/v1/seo-issues/[postId] : to get the SEO issues of the post, replace [postId] by the desired post ID
  • /wp-json/seopress/v1/seo-issues/ to get all issues, list of available arguments below:
    • id (optional): post ID
    • ignore (optional): boolean (1 or 0)
    • type (optional): all_canonical, json_schemas, old_post, permalink, headings, title, description, social, robots, img_alt, nofollow_links, outbound_links, internal_links
    • priority (optional): high, medium, low, good
    • name (optional): json_schemas_duplicated, json_schemas_not_found, old_post, keywords_permalink, headings_not_found, headings_h1_duplicated, headings_h1_not_found, headings_h1_without_target_kw, headings_h2_without_target_kw, headings_h3_without_target_kw, title_without_target_kw, title_too_long, title_not_custom, description_without_target_kw, description_too_long, description_not_custom, og_title_duplicated, og_title_empty, og_title_missing, og_desc_duplicated, og_desc_empty, og_desc_missing, og_img_empty, og_img_missing, og_url_duplicated, og_url_empty, og_url_missing, og_sitename_duplicated, og_sitename_empty, og_sitename_missing, x_title_duplicated, x_title_empty, x_title_missing, x_desc_duplicated, x_desc_empty, x_desc_missing, x_img_empty, x_img_missing, meta_robots_duplicated, meta_robots_noindex, meta_robots_nofollow, meta_robots_noimageindex, meta_robots_nosnippet, meta_robots_nositelinkssearchbox, img_alt_missing, img_alt_no_media, nofollow_links_too_many, outbound_links_missing, internal_links_missing, canonical_duplicated, canonical_missing

Available method: GET.

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

{
    "success": true,
    "data": [
        {
            "id": "1",
            "post_id": "1",
            "issue_name": "json_schemas_not_found",
            "issue_desc": "",
            "issue_type": "json_schemas",
            "issue_priority": "medium",
            "issue_ignore": "1"
        },
        {
            "id": "2",
            "post_id": "1",
            "issue_name": "keywords_permalink",
            "issue_desc": "",
            "issue_type": "permalink",
            "issue_priority": "medium",
            "issue_ignore": "0"
        },
        {
            "id": "3",
            "post_id": "1",
            "issue_name": "headings_h1_without_target_kw",
            "issue_desc": "",
            "issue_type": "headings",
            "issue_priority": "high",
            "issue_ignore": "0"
        }
    ];
}

Request content analysis

Since SEOPress 5.0 | Free

/wp-json/seopress/v1/posts/[postId]/content-analysis

Method: GET

Runs a full content analysis on the given post and returns detailed SEO checks (internal links, outbound links, score, keyword usage, etc.).

Since SEOPress 10.4, the response also contains score_summary: how many checks the post passes and fails, and how many ran (passed, failed, total), ignored checks left out. This is the ratio shown in the Score column. score now gives the impact of each check, keyed by check, instead of the list of distinct impacts. A role checked in Content Analysis: blocked roles cannot request the analysis.

Parameters

Argument Description
<postId> The post ID.
[target_keywords] Optional. Comma-separated keywords to analyze. If omitted, uses the keywords saved in the database.

Required capability: edit_post

Save content analysis

Since SEOPress 5.0 | Free

/wp-json/seopress/v1/posts/[postId]/content-analysis

Method: POST

Saves content analysis data (internal links, outbound links and score) for a post.

JSON body

{
    "score": "good",
    "internal_links": ["https://example.com/page1", "https://example.com/page2"],
    "outbound_links": ["https://external.com/page1"]
}

Parameters

Argument Description
<postId> The post ID.

Required capability: edit_post

Request Google Page Speed report

Since SEOPress 8.8, you can request your Google Page Speed report using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

1 route is currently available:

  • /wp-json/seopress/v1/page-speed to get the Google Page Speed report, list of available arguments below:
    • device (optional): mobile (default) or desktop

Available method: GET.

You will get a JSON response.

Request Google Analytics 4 stats

Since SEOPress 8.8, you can request your Google Analytics 4 stats using our REST API.

Note that for security reasons, you must be logged in with a user having the edit_dashboard capability.

1 route is currently available:

  • /wp-json/seopress/v1/ga4 to get the Google Analytics 4 stats

Available method: GET.

You will get a JSON response with all the metrics per date.

Request Matomo Analytics stats

Since SEOPress 8.8, you can request your Matomo Analytics stats using our REST API.

Note that for security reasons, you must be logged in with a user having the edit_dashboard capability.

1 route is currently available:

  • /wp-json/seopress/v1/matomo to get the Matomo Analytics stats

Available method: GET.

You will get a JSON response with all the metrics per date.

Since SEOPress PRO 10.4, when the last synchronization with Matomo failed, the response explains why instead of being empty. reason is token_rejected, unreachable, unreadable or other:

{
    "error": {
        "reason": "unreachable",
        "summary": "Your Matomo instance could not be reached.",
        "hint": "Check the Matomo URL, that the instance is up, and that its TLS certificate is valid.",
        "response": "",
        "time": 1761643200,
        "date": "October 28, 2026 9:20 am"
    }
}

Request rankings from SEOPress Insights

Since SEOPress Insights 2.0, you can request your keyword rankings using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

1 route is currently available:

  • /wp-json/seopress-insights/v1/rankings, list of available arguments below:
    • kws (optional): array of IDs
    • cpt (optional): string, seopress_rankings
    • dates (optional): array of timestamp

Available method: GET.

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

{
    "2025/02/17": [
        {
            "keyword": "your keyword",
            "p": 18,
            "url": "https://www.seopress.org/example",
            "search_volume": 2900,
            "cpc": 4.1100000000000003,
            "competition": 0.13,
            "date": 1739760053,
            "added": 1634064757,
            "id": 7389
        }
    ],
}

Request competitors from SEOPress Insights

Since SEOPress Insights 2.0, you can request your competitors ranking on the first position using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

1 route is currently available:

  • /wp-json/seopress-insights/v1/competitors, list of available arguments below:
    • kws (optional): array of IDs
    • cpt (optional): string, seopress_p1_rankings
    • dates (optional): array of timestamp

Available method: GET.

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

{
    "2025/02/17": [
        {
            "keyword": "your keyword",
            "p": 18,
            "url": "https://www.example.com/my-competitor",
            "search_volume": 2900,
            "cpc": 4.1100000000000003,
            "competition": 0.13,
            "date": 1739760053,
            "added": 1634064757,
            "id": 7389
        }
    ],
}

Since SEOPress Insights 2.0, you can request your backlinks using our REST API.

Note that for security reasons, you must be logged in with a user having the manage_options capability.

1 route is currently available:

  • /wp-json/seopress-insights/v1/backlinks

Available method: GET.

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

[
    {
        "backlink": "https://example.com/seopress",
        "acr_rank": 1,
        "anchor_text": "visit website",
        "source_title": "SEOPress",
        "source_out_domains_ext": "2",
        "source_out_links_ext": "3",
        "source_out_links_int": "6",
        "source_language": "en",
        "source_language_desc": "English",
        "source_language_conf": 99,
        "flag_redirect": 0,
        "flag_frame": 0,
        "flag_no_follow": 1,
        "flag_images": 0,
        "flag_deleted": 0,
        "flag_alt_text": 0,
        "flag_mention": 0,
        "target_url": "https://www.seopress.org/",
        "indirect_target_url": "",
        "indirect_target_type": "",
        "target_title": "SEOPress - The Best SEO Tools for WordPress in 2025",
        "target_language": "en",
        "target_language_desc": "English",
        "target_language_conf": 99,
        "links_root_domain": -1,
        "domain_id": 3245,
        "first_indexed_date": "2025-02-19",
        "last_seen_date": "2025-02-19",
        "date_lost": "",
        "reason_lost": "",
        "link_type": "TextLink",
        "link_sub_type": "TextLink_Normal",
        "target_citation_flow": 42,
        "target_trust_flow": 28,
        "target_topical_tf": "Business",
        "target_topical_tf_value": 27,
        "source_cf": 9,
        "source_tf": 0,
        "source_topical_tf": "",
        "source_topical_tf_value": "",
        "source_topical_tf_1": "",
        "source_topical_tf_value_1": "",
        "source_topical_tf_2": "",
        "source_topical_tf_value_2": "",
        "date": false
    },
]

Request the Insights dashboard

Returns the dashboard payload: KPI summary, ranking trend, keyword movers, position distribution, favorite keywords and backlink summary.

GET /wp-json/seopress-insights/v1/dashboard

Adds a link the Majestic import has not found, for example a partnership or a guest post. Only source_url is required.

POST /wp-json/seopress-insights/v1/backlinks/manual

{
  "source_url": "https://example.com/blog/post",
  "target_url": "https://your-site.com/page",
  "anchor_text": "your anchor",
  "source_language": "en",
  "flag_no_follow": false,
  "source_cf": 30,
  "source_tf": 25,
  "first_indexed_date": "2026-08-01",
  "source_topical_tf": "Computers/Internet"
}

All Insights routes require the matching Insights capability. See SEOPress & Insights user capabilities.