Get WordPress SEO Meta
wp_get_seo_metaFetch SEO meta for a WordPress post or page by ID or slug. Auto-detects the active SEO plugin (Yoast, RankMath, AIOSEO) and normalizes title, description, canonical, social, and focus keyword fields.
Instructions
Get SEO meta (title, description, canonical, OG/Twitter, focus keyword) for a single post or page. Auto-detects the active SEO plugin (Yoast, RankMath, AIOSEO) and normalizes the fields where possible.
Either 'id' or 'slug' must be provided.
Args:
content_type (enum): post | page. Required.
id (number): Numeric ID of target. Mutually exclusive with slug.
slug (string): Slug of target. Mutually exclusive with id.
response_format (enum): markdown | json. Default 'markdown'.
Returns: WPSeoMetaResult object with shape: { "detected_plugin": "yoast" | "rankmath" | "aioseo" | "none", "meta_title"?: string, "meta_description"?: string, "canonical_url"?: string, "noindex"?: boolean, "og_title"?: string, "og_description"?: string, "og_image"?: string, "twitter_title"?: string, "twitter_description"?: string, "twitter_image"?: string, "focus_keyword"?: string, "raw"?: object // The raw plugin-specific blob for reference }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Numeric ID of the target. Either id OR slug is required. | |
| slug | No | Slug of the target. Either id OR slug is required. | |
| content_type | Yes | Whether the target is a post or a page. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |