List Posts
wordpress.list_posts
ActionBusiness appsconnection required
Calls the WordPress API with the connection's credentials.
List posts on the site, filtered by search text, status, author, category or tag. Only published posts are returned unless status says otherwise.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Username & password
- Providers
- WordPress
- Secret shape
- {"username": "…", "password": "… the application password …"}
- Config it needs
- site_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
13 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
search Return only items matching this search string. | string | No | — | — | — |
status Statuses to include, comma-separated. Defaults to publish; anything else needs a connection user who can read that status. | string | No | — | — | — |
categories Only posts in these category ids, as a JSON array or comma-separated list. | array | No | — | array of number | — |
tags Only posts carrying these tag ids, as a JSON array or comma-separated list. | array | No | — | array of number | — |
author Only posts written by this user id. | number | No | — | ≥ 1 | — |
slug Only the post with this URL slug. | string | No | — | — | — |
after Only posts published after this ISO 8601 date. | string | No | — | iso8601 format | — |
before Only posts published before this ISO 8601 date. | string | No | — | iso8601 format | — |
orderby Attribute the result set is sorted by. | string | No | — | one of "date", "id", "title", "slug", "modified", "author", "include" | — |
order Sort direction for the result set. | string | No | — | one of "asc", "desc" | — |
per_page How many items to return in one page, 1-100. WordPress defaults to 10. | number | No | — | 1–100 | — |
page Which 1-based page of the result set to return. | number | No | — | ≥ 1 | — |
context Response scope. 'view' returns rendered HTML only; 'edit' also returns the raw block markup (title.raw, content.raw) and needs edit rights on the item. | string | No | view | one of "view", "edit", "embed" | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"context": "view"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
items The objects WordPress returned for this page of results. | array | — |
count How many objects are in items. | number | — |
{
"count": 0,
"items": []
}Notes
- GET /wp/v2/posts. WordPress pages the result set; use per_page and page rather than expecting every post in one call.
See List Posts run in a workflow.
In a technical demo we add the WordPress connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.