Get related posts is a WordPress ability from Jetpack — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Get related posts
Read-onlyReturn posts related to a given post, powered by Jetpack's Elasticsearch-backed Related Posts feature.
Requires the Jetpack plugin on WordPress 6.9+. Abilities are registered by several bundled Jetpack packages (automattic/jetpack-backup, jetpack-connection, jetpack-forms, jetpack-stats) plus the main plugin's own registrars for Related Posts, Shortlinks, Sitemaps, Newsletter/Subscriptions, and Monitor. Permission requirements vary by ability — most gate on 'manage_options', 'jetpack_admin_page', or 'view_stats', while Forms abilities use 'edit_pages'. Backup abilities only register when a Backup product/plan is active; Sitemaps, Monitor, and Newsletter abilities only register when their respective module is turned on.
What it does
This ability returns related posts for a single source post as an array of id, url, title, excerpt, date, post type, and format, backed by Jetpack's Elasticsearch connection. When Related Posts is disabled, the source post is unknown, or the Elasticsearch backend is unreachable, it returns an empty array rather than an error. Results can be capped (up to 20, the Elasticsearch hard limit), restricted to a specific post type, and can exclude a list of post IDs. The caller must additionally be able to edit the specific source post, not just posts in general; an unauthorized request returns jetpack_related_posts_forbidden.
See it in action
You ask your AI assistant
"What posts are related to my latest blog post, post #915?"
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| post_id | integer | Yes | The source post ID to find related posts for; must reference an existing post. |
| per_page | integer | No | Maximum related posts to return, 1-20 (Elasticsearch hard cap). Defaults to 20. |
| size | integer | No | Deprecated alias for per_page (1-20). Defaults to 3 when per_page is omitted. |
| post_type | string | No | Restrict matches to a single post type slug; defaults to the source post's own type. |
| exclude_post_ids | array | No | Post IDs to exclude from the result. |
Returns
An array of related post objects, each with id, url, title, excerpt, date, post_type, and format (nullable).
Permission
The current user must have the 'edit_posts' capability, and must be able to edit the specific source post (checked at execution time).
More Jetpack abilities
Bulk update form responses
Mark multiple Jetpack Forms responses as spam or restore them from spam in a single call.
Create a form
Create a new Jetpack Forms form with a title and optional block content.
Delete a form
Move a Jetpack Forms form to the trash.
Get backup overview
Return a one-call snapshot of the site's backup state: last backup, recent count, schedule, and storage usage.
Get follower counts
Return a breakdown of follower counts across email, WordPress.com, comments, and Publicize.
Get form details
Get a single form's full structure, including its field definitions, status, and edit URL.