queryPosts( )


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.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),hasSome(),in(),ascending(),descending()
titleeq(),ne(),startsWith(),hasSome(),lt(),le(),gt(),ge(),exists(),in(),ascending(),descending()
firstPublishedDateeq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
lastPublishedDateeq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
slugeq(),ne(),lt(),le(),gt(),ge(),hasSome(),ascending(),descending()
featuredeq(),ne(),ascending(),descending()
pinnedeq(),ne(),ascending(),descending()
categoryIdshasSome(),hasAll()
memberIdeq(),ne(),hasSome()
hashtagshasSome(),hasAll()
commentingEnabledeq(),ne(),ascending(),descending()
minutesToReadeq(),ne(),lt(),le(),gt(),ge(),in()
tagIdshasSome(),hasAll()
pricingPlanIdshasSome(),hasAll()
translationIdeq(),ne(),exists(),in()
languageeq(),ne(),hasSome(),exists(),in()
metrics.commentseq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
metrics.likeseq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
metrics.viewseq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
media.displayedeq(),ne()
Permissions
Read Blog
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryPostsOptions
Returns
Return Type:PostsQueryBuilder
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?