Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
Query Posts runs with these defaults, which you can override:
firstPublishedDate
is sorted in descending order, with pinned posts first.paging.limit
is 50
.paging.offset
is 0
.For field support for filters and sorting, see Field Support for Filtering and Sorting.
To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection. For a detailed list of supported filters and sortable fields, see Field Support for Filtering and Sorting.
Deprecated. Use query
instead.
This parameter will be removed on June 30, 2023.
Pagination options.
Deprecated. Use query
instead.
This parameter will be removed on June 30, 2023.
Filter object.
Deprecated. Use query
instead.
This parameter will be removed on June 30, 2023.
Sorting options. For a list of sortable fields, see Field Support for Filtering and Sorting.
Deprecated. Use fieldsets
instead.
This parameter will be removed on June 30, 2023.
List of post fields to be included in the response.
Query options.
List of additional post fields to include in the response. For example, use the URL
fieldset to retrieve the url field in
the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
only the post’s base fields are returned.
List of posts.
Deprecated. Use pagingMetadata
instead.
This property will be removed on June 30, 2023.
Details on the paged set of results returned.
Details on the paged set of results returned.
curl \
'https://www.wixapis.com/blog/v3/posts/query' \
--data-binary '{
"fieldsets": ["URL", "METRICS", "CONTENT_TEXT"],
"filter": {
"title": {
"$startsWith": "My vacation"
}
}
}' \
}
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"posts": [
{
"id": "894a58a2-dc75-422d-9ca6-00a489750dfd",
"title": "My vacation",
"slug": "my-vacation",
"firstPublishedDate": "2020-08-06T09:18:07.839Z",
"lastPublishedDate": "2020-08-06T09:18:07.839Z",
"url": {
"base": "https://some-user.wixsite.com/my-site",
"path": "/blog/posts/my-vacation"
},
"featured": true,
"pinned": false,
"categoryIds": ["5f2bcaa0879ad500173577f3", "5f2bcaa5940a02003488af3e"],
"memberId": "5ee77ebfffeab500188f496b",
"hashtags": ["sea", "sun"],
"commentingEnabled": true,
"minutesToRead": 1,
"tagIds": ["5f2bcaa0879a4400173577f1", "5f2bc445940a02003488af3a"],
"pricingPlanIds": ["5f2bc445940a02003498af3e"],
"relatedPostIds": [
"111a58a2-dc75-422d-0015-00a489750dfd",
"211a58a2-dc75-422d-1512-00a489750dfd"
],
"language": "en",
"translationId": "111a58a2-dc75-422d-9ca6-00a489750dfd"
}
],
"metaData": {
"count": 1,
"offset": 0,
"total": 1
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.