Skip to content

WordPress - Get Posts

This module allows querying and searching posts or articles from a WordPress site. Supports filters by status, category, text search, pagination, and sorting.

FieldDescriptionExample
urlWordPress site base URLhttps://my-site.com
usernameWordPress usernameadmin
application_passwordApplication password generated in WordPressxxxx xxxx xxxx xxxx
FieldTypeRequiredDescription
credentials_idcredentialsYesWordPress credential
post_idtextNoSpecific ID. If empty, lists all
searchtextNoSearch term
statusselectNoFilter: publish, draft, pending, private, any
categoriestextNoFilter by category ID
per_pagenumberNoPosts per page (1-100). Default: 10
pagenumberNoPage number. Default: 1
orderbyselectNoSort by: date, title, modified, id
{
"success": true,
"posts": [
{
"id": 123,
"title": { "rendered": "Mi Post" },
"content": { "rendered": "<p>Content...</p>" },
"status": "publish",
"link": "https://misitio.com/mi-post/",
"date": "2024-01-15T10:30:00",
"categories": [1, 5],
"tags": [3]
}
],
"total": 45,
"page": 1,
"per_page": 10
}
{
"status": "publish",
"per_page": 10,
"orderby": "date"
}
{
"categories": "5",
"status": "publish"
}
{
"search": "WordPress tutorial"
}
  • Posts include content rendered in HTML
  • Categories and tags are returned as arrays of IDs
  • The total field indicates the total number of posts matching the filters
  • By default sorted by date descending
  • WordpressCreatePost - Create a new post
  • WordpressUpdatePost - Update an existing post
  • WordpressDeletePost - Delete a post
  • WordpressGetCategories - Get categories for filtering