Métodos de autenticación
A través de las cookies de WordPress
Headers para enviar con su solicitud:
- X-WP-Nonce: abra la consola de su navegador, ingrese «
wpApiSettings» y copie el nonce - Cookie: abra la consola de su navegador, vaya a Aplicaciones y copie el nombre Y el valor de esta cookie
wordpress_logged_in_(eg:wordpress_logged_in_41432erzre768dffez23456=admin%AREGREJOGRE54Y65KO534KTO4O3TJ43EFFEKZFOEZK£FEZRGTH)
A través de contraseñas de aplicaciones
Es la mejor solución. Cree una contraseña de aplicación desde su perfil de WordPress.
Use su ID de WP (por ejemplo, admin) y esta nueva contraseña de la aplicación para autenticarse (elija «Basic Authentification» en Postman o equivalente).
Body (JSON Object) para enviar con su solicitud dependiendo del punto final:
Título y meta descripción
{
"title":"this is SEO title",
"description":"this is meta description"
}
Palabras clave objetivo
{
"_seopress_analysis_target_kw":"keyword1, keyword2"
}
Metadatos sociales
{
"_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"
}
Redirección
{
"_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"
}
Respuesta:
Si tiene éxito:
{
"code": "success"
}
Si falla:
{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 401
}
}
o
{
"code": "rest_cookie_invalid_nonce",
"message": "Cookie check failed",
"data": {
"status": 403
}
}
Obtener metadatos de publicaciones
Desde SEOPress 5.0, puede solicitar sus metadatos de SEO utilizando nuestra API REST.
Actualmente hay 2 rutas disponibles:
/wp-json/seopress/v1/posts/[postId]: reemplaza [postId] por el ID de tu publicación/wp-json/seopress/v1/posts/by-url?url=https://example.com/seopress-best-wordpress-seo-plugin/reemplace la URL por el enlace permanente deseado
Método disponible: GET.
Obtendrá en respuesta un JSON con la siguiente información:
{
"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,
"noarchive": 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/"
}
}
Para solicitar sus datos, puede utilizar, por ejemplo, la API HTTP de WordPress.
Obtener metadatos de términos
Desde SEOPress 5.5, puede obtener metadatos de SEO para sus términos de taxonomía utilizando nuestra API REST.
Actualmente hay 2 rutas disponibles:
/wp-json/seopress/v1/terms/[termId]: reemplace [termId] con su ID de término/wp-json/seopress/v1/terms/[termId]?taxonomy=[yourCustomTaxonomy]similar a la ruta anterior, con taxonomía como argumento (predeterminado: «categoría» si no se proporciona)
Método disponible: GET.
Obtendrá en respuesta un JSON con la siguiente información:
{
"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,
"noarchive": 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/"
}
}
Enviar metadatos de publicación
Para escribir metadatos de publicaciones de SEO, puede usar estos puntos finales:
- título y meta descripción:
/wp-json/seopress/v1/posts/[postId]/title-description-metas - palabras clave objetivo:
/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 - redirección:
/wp-json/seopress/v1/posts/[postId]/redirection-settings
Capacidad de usuario necesaria para la seguridad: edit_post
Método disponible: PUT.
Obtener la configuración de SEOPress
Desde SEOPress 5.5, puede solicitar configuraciones globales de SEOPress a través de nuestra API REST.
Actualmente hay 10 rutas disponibles:
/wp-json/seopress/v1/options/dashboard-settings: Configuración del panel/wp-json/seopress/v1/options/titles-settings: Títulos y metaconfiguraciones/wp-json/seopress/v1/options/social-settings: Configuración de redes sociales/wp-json/seopress/v1/options/sitemaps-settings: Configuración de mapas de sitio/wp-json/seopress/v1/options/analytics-settings: Ajustes de medición y análisis estadístico/wp-json/seopress/v1/options/advanced-settings: Ajustes avanzados/wp-json/seopress/v1/options/bot-settings: Configuración de bots/wp-json/seopress/v1/options/indexing-settings: Configuración de indexación instantánea/wp-json/seopress/v1/options/license-settings: Configuración de licencia/wp-json/seopress/v1/options/pro-settings: Configuración PRO
Método disponible: GET.
Obtendrá en respuesta un JSON con la siguiente información:
{
"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"
}
Obtener informes de publicaciones de Search Console
Desde SEOPress 5.7, puede solicitar informes de Google Search Console de sus publicaciones utilizando nuestra API REST.
1 ruta está disponible actualmente:
/wp-json/seopress/v1/posts/[postID]/inspect: reemplace [postID] con el ID de la publicación
Método disponible: GET.
Obtendrá como respuesta un JSON que contiene la siguiente información:
{
"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"
}
]
}
]
}
}
}
}
Obtener redirecciones
Desde SEOPress 8.8, puedes obtener la lista de redirecciones de SEOPress a través de nuestra API REST.
Actualmente hay 1 ruta disponible:
/wp-json/seopress/v1/redirections: para obtener todas las redirecciones, enumere los argumentos a continuación:- id (opcional): integer, ID de redireccionamiento
- enabled (opcional): string,
yesono - type (opcional): tabla de tipos de redireccionamiento,
301,302,307,404,410,451
Método disponible: GET.
Obtendrá una respuesta JSON con la siguiente información:
{
"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"
}
}
}
Obteniendo problemas de SEO
Desde SEOPress 8.2, puede obtener sus problemas de SEO (función de auditoría del sitio) utilizando nuestra API REST.
Actualmente hay 2 rutas disponibles:
/wp-json/seopress/v1/seo-issues/[postId]: para obtener los problemas de SEO de la publicación, reemplace [postId] con el ID de la publicación deseada/wp-json/seopress/v1/seo-issues/para obtener todos los problemas, lista de argumentos disponibles a continuación:- id (opcional): ID de publicación
- ignore (opcional): booleano (
1o0) - type (opcional):
all_canonical, json_schemas, old_post, permalink, headings, title, description, social, robots, img_alt, nofollow_links, outbound_links, internal_links - priority (opcional):
high, medium, low, good -
name (opcional):
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_noarchive, 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
Método disponible: GET.
Obtendrá una respuesta JSON con la siguiente información:
{
"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"
}
];
}
Solicitar informe de Google Page Speed
Desde SEOPress 8.8, puede solicitar su informe de Google Page Speed mediante nuestra API REST.
Por motivos de seguridad, debe iniciar sesión con un usuario habilitado para manage_options.
Actualmente hay una ruta disponible:
/wp-json/seopress/v1/page-speedpara obtener el informe de Google Page Speed. A continuación, se muestra la lista de argumentos disponibles:- device (optional):
mobile(default) odesktop
- device (optional):
Método disponible: GET.
Recibirá una respuesta JSON.
Solicitar estadísticas de Google Analytics 4
Desde SEOPress 8.8, puedes solicitar tus estadísticas de Google Analytics 4 mediante nuestra API REST.
Por seguridad, debes iniciar sesión con un usuario con la función edit_dashboard.
Actualmente hay 1 rutas disponible:
/wp-json/seopress/v1/ga4para obtener las estadísticas de Google Analytics 4
Método disponible: GET.
Recibirá una respuesta JSON con todas las métricas por fecha.
Solicitar estadísticas de Matomo Analytics
Desde SEOPress 8.8, puedes solicitar tus estadísticas de Matomo Analytics mediante nuestra API REST.
Por seguridad, debes iniciar sesión con un usuario con la función edit_dashboard.
Actualmente hay 1 rutas disponible:
/wp-json/seopress/v1/matomopara obtener las estadísticas de Matomo Analytics
Método disponible: GET.
Recibirá una respuesta JSON con todas las métricas por fecha.
Solicitar clasificaciones de SEOPress Insights
Desde SEOPress Insights 2.0, puedes solicitar las clasificaciones de tus palabras clave utilizando nuestra API REST.
Actualmente hay 1 rutas disponible:
/wp-json/seopress-insights/v1/rankings, lista de argumentos disponibles a continuación:- kws (opcional): array of IDs
- cpt (opcional): string,
seopress_rankings - dates (opcional): array of timestamp
Método disponible: GET.
Obtendrá una respuesta JSON con la siguiente información:
{
"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
}
],
}
Solicitar competidores de SEOPress Insights
Desde SEOPress Insights 2.0, puedes solicitar las clasificaciones de tus palabras clave utilizando nuestra API REST.
Actualmente hay 1 rutas disponible:
/wp-json/seopress-insights/v1/competitors, lista de argumentos disponibles a continuación:- kws (opcional): array of IDs
- cpt (opcional): string,
seopress_p1_rankings - dates (opcional): array of timestamp
Método disponible: GET.
Obtendrá una respuesta JSON con la siguiente información:
{
"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
}
],
}
Solicitar backlinks de SEOPress Insights
Desde SEOPress Insights 2.0, puedes solicitar la lista de backlinks utilizando nuestra API REST.
Actualmente hay 1 rutas disponible:
/wp-json/seopress-insights/v1/backlinks
Método disponible: GET.
Obtendrá una respuesta JSON con la siguiente información:
[
{
"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
},
]