wp_search_posts
Search WordPress content across posts, pages, custom post types, and terms via the WP /wp/v2/search endpoint. Filter by type (post or term) to retrieve lightweight results with ID, title, URL, and subtype.
Instructions
Full-text search across posts, pages, custom post types, and terms via the WP /wp/v2/search endpoint. Returns a lightweight result shape (id, title, url, type, subtype). Filter by type=post (default search target) or type=term (taxonomies). For richer content fetch the hit by id via wp_posts_get / wp_pages_get.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| type | No | ||
| query | Yes | ||
| subtype | No | ||
| per_page | No |