How Filtering Works
When you request a list of posts, you can include or exclude content based on:- Categories - Filter by the post’s category (a post belongs to one category)
- Tags - Filter by the post’s tags (a post can have multiple tags)
- Featured status - Filter by whether a post is featured
- Search queries - Search for matches in title and content
Filter Parameters
Comma-separated list of category slugs. Posts must belong to one of the
specified categories. Example:
tech,newsComma-separated list of category slugs to exclude. Posts in these categories
will be omitted from results. Example:
changelog,legalComma-separated list of tag slugs. Posts must have at least one of the
specified tags. Example:
javascript,reactComma-separated list of tag slugs to exclude. Posts with any of these tags
will be omitted. Example:
outdated,draftSearch term to filter by title and content. Example:
nextjsSort order by
publishedAt. Options: asc or descFilter by featured status. Options:
true or falseSDK Examples
- Filter by Category
- Exclude Categories
- Combined Filters
- Featured Posts
Get all posts in the “tutorials” category:
Filter Behavior
AND Logic: All specified filters are applied together. A post must satisfy
every condition to appear in results.
Understanding Filter Precedence
When using both include and exclude filters, they work together—not against each other:Include vs Exclude Logic
Categories (include)
Categories (include)
Posts must belong to one of the specified categories:Returns posts in “tech” OR “news” categories.
Categories (exclude)
Categories (exclude)
Posts must not belong to any excluded category:Returns all posts except those in “legal” or “changelog”.
Search Queries
Use thequery parameter to search for matches in post titles and content:
Common Use Cases
- Blog Posts Only
- Featured Content
- Fresh Content
- Topic Deep Dive
Exclude system pages like legal and changelog:
Best Practices
Filter order doesn’t matter: The API applies all filters together
regardless of the order you specify them in the query string.