Learn how to filter posts by categories, tags, and search queries.
Marble API provides powerful filtering options to retrieve exactly the content you need. Filters are applied using query parameters and can be combined for precise content selection.
When using both include and exclude filters, they work together—not against each other:
Filter Combination
Result
categories=tech
Posts in “tech” category
excludeTags=outdated
Posts without “outdated” tag
categories=tech&excludeTags=outdated
Posts in “tech” AND without “outdated” tag
Important: If a post is in the “tech” category but has the “outdated” tag,
it will be excluded when using categories=tech&excludeTags=outdated.
Exclude filters take effect regardless of category matches.
Use excludes for “everything except”: When you want all content except a
few categories, use excludeCategories instead of listing every category you
want.
Combine with pagination: Filtering works seamlessly with pagination. Apply
filters first, then paginate through the filtered results.
Filter order doesn’t matter: The API applies all filters together
regardless of the order you specify them in the query string.
Watch your rate limits: Each search request counts against your rate
limit. For real-time “search as you type” experiences,
fetch your posts once and filter them client-side instead of making a new API
request on every keystroke.