List Blog Posts
GET
/api/v1/posts
Lists posts with pagination, sorting and content filters. Supports CPT filter ?type= when Post Types is enabled.
Parameters
Query Parameters
page
Type
integer
Minimum
1Default
1limit
Type
integer
Minimum
1Maximum
100Default
10sort
Type
string
Valid values
"created_at""published_at""updated_at""title"order
Type
string
Valid values
"asc""desc"Default
"desc"status
Type
string
visibility
Type
string
category
Type
string
tag
Type
string
author
Type
string
q
Type
string
lang
Type
string
type
Filter by post_type (CPT). Ignored when Post Types is disabled.
Type
string
Responses
Posts list
List blog posts with filters and pagination.
Auth: optional.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | No | Page number |
limit | query | number | No | Items per page |
sort | query | string | No | Sort field |
order | query | string | No | asc or desc |
q | query | string | No | Text search |
type | query | string | No | Filter by post_type (CPT). Ignored when Post Types is disabled |
lang | query | string | No | Language filter |
Request Body
None.
Response 200
json
{
"data": [],
"user_context": { "authenticated": false },
"meta": { "page": 1, "limit": 10, "total": 0, "hasMore": false }
}Response Errors
400invalid query parameters
Notes
- Use this for public listing pages.
- Supports page, limit, sort, order, category, tag, author, q, lang, and CPT
typefilters. - When CPT is enabled, each post may include
post_typeandcustom_fields. - Returns the standard
data/user_context/metaenvelope. - See also List Posts by Type.