Posts: Supported Filters and Sorting

The following table shows field support for filters and sorting for the Post object:

FieldSupported FiltersSortable
id$eq, $ne, $hasSomeSortable
title$eq, $ne, $contains, $startsWith, $endsWith, $hasSome, $lt, $lte, $gt, $gte, $exists, $inSortable
firstPublishedDate$eq, $ne, $lt, $lte, $gt, $gte, $inSortable
lastPublishedDate$eq, $ne, $lt, $lte, $gt, $gte, $inSortable
slug$hasSome, $hasAll
featured$eq, $neSortable
pinned$eq, $neSortable
categoryIds$hasSome, $hasAll
memberId$eq, $ne, $hasSome
hashtags$hasSome, $hasAll
commentingEnabled$eq, $neSortable
minutesToRead$eq, $ne, $lt, $lte, $gt, $gte, $in
tagIds$hasSome, $hasAll
pricingPlanIds$hasSome, $hasAll
language$eq, $ne, $hasSome, $exists, $in
translationId$eq, $ne, $exists, $in
metrics.views$eq, $ne, $gt, $lt, $gte, $lte, $inSortable
metrics.comments$eq, $ne, $gt, $lt, $gte, $lte, $inSortable
metrics.likes$eq, $ne, $gt, $lt, $gte, $lte, $inSortable

Related content: API Query Language, Query Posts

Was this helpful?
Yes
No

Post Object

Attributes
idstringRead-onlyformat GUID
Post ID.

titlestringmaxLength 100
Post title.

excerptstringmaxLength 140
Post excerpt. Can be selected by a site contributor. By default, it is extracted from the content text's first characters. Max: 140 characters

contentTextstringRead-onlymaxLength 400000
The post's content in plain text.

firstPublishedDatestringformat date-time
Date the post was first published.

lastPublishedDatestringRead-onlyformat date-time
Date the post was last published.

urlobject
Post URL.

slugstringmaxLength 100
Post slug. For example, 'post-slug'.

featuredboolean
Whether the post is marked as featured.

pinnedboolean
Whether the post is pinned. If true, the post is placed at the top of the post list.

categoryIdsArray <string>maxItems 10format GUID
Category IDs of the post.

coverMediaobject
Deprecated. Use media instead. This property will be removed on June 30, 2023. Post cover media.

memberIdstringformat GUID
Post owner's member ID.

hashtagsArray <string>Read-onlymaxItems 100maxLength 100
Hashtags in the post.

commentingEnabledboolean
Whether commenting on the post is enabled.

minutesToReadinteger
Estimated reading time (calculated automatically).

heroImageobject
Image placed at the top of the blog page.

tagIdsArray <string>Read-onlymaxItems 30format GUID
IDs of tags the post is tagged with.

relatedPostIdsArray <string>Read-onlymaxItems 3format GUID
IDs of posts related to the post.

pricingPlanIdsArray <string>Read-onlymaxItems 100format GUID
Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan.

translationIdstringformat GUID
ID of the translations of this post. All translations of a single post share the same translationId.

languagestringformat LANGUAGE
Language the post is written in. 2-letter language code in ISO 639-1 alpha-2 format.

seoDataobject
SEO data.

contentstringRead-onlymaxLength 400000
Reserved for internal use.

contactIdstringformat GUID
Post owner's contact ID.

richContentobject
Post rich content

previewbooleanRead-only
Whether the returned content is a preview of premium content. Defaults to false. A preview displays a limited number of paragraphs of paid content to non-subscribed users.

contentIdstringmaxLength 24
Reserved for internal use.

mostRecentContributorIdstringRead-onlyformat GUID
Reserved for internal use.

moderationDetailsobject
Post moderation details. Only relevant to posts submitted by guest writers.

mediaobject
Post cover media.

richContentStringstringRead-onlymaxLength 4000000
Post rich content as a string

hasUnpublishedChangesbooleanRead-only
Indicates if there is a draft post with changes that have not yet been published.

internalIdstringRead-onlymaxLength 24
Reserved for internal use.

internalCategoryIdsArray <string>Read-onlymaxItems 10maxLength 24
Reserved for internal use.

internalRelatedPostIdsArray <string>Read-onlymaxItems 3maxLength 24
Reserved for internal use.
Was this helpful?
Yes
No

GetGet Post

Gets a post by the specified ID.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v3/posts/{postId}

Was this helpful?
Yes
No

GetGet Post By Slug

Gets a post with the provided slug.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v3/posts/slugs/{slug=**}

Was this helpful?
Yes
No

GetList Posts

Retrieves a list of up to 100 published posts per request.

List 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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v3/posts

Was this helpful?
Yes
No

PostQuery Posts

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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/v3/posts/query

Was this helpful?
Yes
No

GetGet Post Metrics

Gets a specified post's metrics.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v3/posts/{postId}/metrics

Was this helpful?
Yes
No

GetQuery Post Count

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves the number of published posts per month within a specified time range.

The time range is set using the rangeStart and months properties. The time range always starts on the 1st day of the month set in rangeStart and includes the number of months following rangeStart. For example, if rangeStart is set to '2022-03-13' and months is set to 4, the time range will be from '2022-03-01' until '2022-06-30'. The time range always ends on the last day of the month.

Note: If there are no published posts in a month within the time range, that month is not included in the response. For example, let's say a blog has 0 posts dated in February 2022. If rangeStart is set to '2022-01-01' and months is set to 3, the response includes postCount values for January and March, but not February.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v2/stats/post/count

Was this helpful?
Yes
No

GetGet Total Posts

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Gets the total amount of published posts of the blog.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/v2/stats/posts/total

Was this helpful?
Yes
No

Post Created

Triggered when a post is created.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.blog.post.

slugstring
Event name. Expected created.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

createdEventobject
Event information.
Was this helpful?
Yes
No

Post Updated

Triggered when a post is updated.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.blog.post.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No

Post Deleted

Triggered when a post is deleted.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.blog.post.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.
Was this helpful?
Yes
No

Post Liked

Triggered when a post is liked.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.blog.post.

slugstring
Event name. Expected liked.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No

Post Unliked

Triggered when a post is unliked.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.blog.post.

slugstring
Event name. Expected unliked.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No