WordPress Headless
v1.0.0Read WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_content Search site content
Full-text search across published posts, pages, and custom post types. "results" are title and body matches from WordPress search; "acf_matches" are items whose ACF custom fields contain every search word (WordPress search skips ACF, and on many sites most text lives there). Use get_post to read a result.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search terms |
include_acf | boolean | Also search ACF field values (first page only) |
page | integer | Page number |
per_page | integer | Results per page |
post_type | string | Limit to one post type slug (see list_post_types), e.g. "page" or "project" |
list_post_types List content types
Lists the content types on the site (posts, pages, and custom post types such as projects), with how many published items each has and which taxonomies apply. Call this first to learn what the site contains.
get_post Get a post, page, or custom post
Returns one published item by ID or slug: title, URL, dates, author, featured image, terms, body as Markdown, and ACF custom fields. Works for any post type (see list_post_types).
| Parameter | Type | Description |
|---|---|---|
id | integer | Post ID. Provide either id or slug. |
include_acf | boolean | Include ACF custom fields |
max_chars | integer | Maximum characters of body text (and of each long ACF text field) to return |
post_type | string | Post type slug, e.g. "post", "page", "project" |
slug | string | Post slug. Provide either id or slug. |
list_posts List posts, pages, or custom posts
Lists published items of one post type, newest first by default, with optional filters. Returns summaries (title, URL, dates, excerpt). Use get_post for the full content.
| Parameter | Type | Description |
|---|---|---|
after | string | Only items published after this date (YYYY-MM-DD or ISO 8601) |
before | string | Only items published before this date (YYYY-MM-DD or ISO 8601) |
include_acf | boolean | Include shortened ACF fields for each item (useful when content lives in ACF) |
modified_after | string | Only items last modified after this date (YYYY-MM-DD or ISO 8601); finds recent edits |
order | string | |
orderby | string | Sort field. "relevance" requires search. |
page | integer | |
per_page | integer | |
post_type | string | Post type slug, e.g. "post", "page", "project" |
search | string | Keyword filter |
taxonomy | string | Taxonomy slug to filter by, e.g. "category" or "post_tag" |
terms | array | Term slugs or numeric IDs in that taxonomy. Requires taxonomy. |
list_terms List categories, tags, or custom taxonomy terms
Lists terms in a taxonomy with how many published items use each. Term slugs can be passed to list_posts to filter.
| Parameter | Type | Description |
|---|---|---|
hide_empty | boolean | Skip terms with no published items |
page | integer | |
per_page | integer | |
search | string | Keyword filter on term names |
taxonomy | string | Taxonomy slug, e.g. "category" or "post_tag" |
get_acf_fields Get ACF fields with labels
Returns the ACF custom fields of one item with each field's label, type, field group, and value. Use it to understand what each field means; get_post already includes the values alone.
| Parameter | Type | Description |
|---|---|---|
id | integer | Post ID. Provide either id or slug. |
max_chars | integer | Maximum characters of body text (and of each long ACF text field) to return |
post_type | string | Post type slug, e.g. "page" or "project" |
slug | string | Post slug. Provide either id or slug. |
get_company_info Get company and site info
Returns the site name, tagline, URL, and timezone, plus the organization behind the site (name, logo, social profiles, and contact details when published) from Yoast SEO data, and the text of the home page, where sites usually say who they are and what they do.