Skip to content

Docs

›

Content API

Filtering, sorting and search

The filter operators, sort syntax, full-text search and relation filters of the Content API.

Updated November 8, 2026

Search

q searches text, rich text, slug and email fields:

GET https://your-workspace.praismahub.com/api/v1/public/YOUR_TOKEN/ORG_ID/blog-posts?q=launch

Sorting

sort is a comma-separated list of field:asc or field:desc. Besides your own fields you can sort by id, created_at, updated_at, published_at and lang. Without a sort, the newest published entries come first.

?sort=published_at:desc,title:asc

Filters

Send filters as a URL-encoded JSON object. Each key is a field; its value is an object of operators (a bare value means $eq).

const filters = { price: { $gte: 10, $lt: 50 }, "category.slug": { $eq: "news" } }; const url = `${base}/products-cms?filters=${encodeURIComponent(JSON.stringify(filters))}`;

Operators

Text, boolean, choice fields:$eq,$ne,$in,$nin,$contains,$notcontains,$null,$notnull.

Numbers and dates:$eq,$ne,$in,$nin,$gt,$gte,$lt,$lte,$between,$notbetween,$null,$notnull.

Relations:$eqand$inon<relation>.idor<relation>.slug.

Logic:$andand$ortake a list of filter objects.

$in and $nin take a list; $between takes [from, to]; $null takes true or false. The strings "true", "false" and "null" and numeric strings are read as their values. Unknown fields are ignored.

{ "$or": [ { "featured": { "$eq": true } }, { "published_at": { "$gte": "2026-10-01" } } ], "author.slug": { "$in": ["ana", "ben"] } }

Filtering collection pages on your site

Collection lists built in the site builder do not use the API or a token; they read from Praisma directly. Their filter and search controls put the state in the page URL, which you can also link to:

q=<text>: search.

sort=<field>:ascor:desc.

filter_<field>=value,filter_<field>=a,b(any of) andfilter_<field>=min:max(range).

filter_<relation>-id=<id>andfilter_<relation>-slug=<slug>for relations.

If the collection has a parameter prefix set, every key starts with <prefix>_, for example blog_filter_category-slug=news.

Questions about building on Praisma Hub? We're happy to help.

Contact us