Glossary
What is facet filtering?
Facet filtering narrows a set of results by structured attributes such as category, domain or date, usually with a count shown for each value.
Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)
Facet filtering narrows a result set by structured attributes, called facets, such as category, size, domain or date, usually paired with counts per value so you can see the shape of the data before drilling in. The sidebar of an online shop is the classic example. Data APIs expose the same idea as filter expressions over stored attributes.
How does facet filtering work?
Each record carries a set of structured attributes, its facets, which are computed and stored when the record is written, not worked out at query time. Filtering is then a matter of simple conditions on those attributes: equality, ranges, membership of a set, combined with AND. Because the values are stored in advance, two things stay cheap: applying the filter, and counting how many matching records have each facet value. Those counts, sometimes called a facet summary, are what turn filtering into navigation. You can see how the filtered set divides, by top-level domain or by category for example, before you narrow further.
Facet filtering vs full-text search
Full-text search ranks records by relevance to a free-text query. Facet filtering partitions records by exact structured values. They work together and do not compete: search produces the candidate set, and facets slice it. The difference matters when designing an API. A relevance score cannot express "only companies with at least 500 employees", and a facet filter cannot tell you which page answers a question most directly.
Why does it matter for AI and web-data APIs?
Agents and pipelines increasingly work with datasets built from the web (see what a webset is), and a list of several thousand rows is only useful if it can be queried. Facet filtering gives an agent a cheap, deterministic way to slice a dataset instead of running discovery again, and the counts let it inspect the distribution before choosing a slice. A deterministic filter over stored values is also more dependable than asking a model to filter prose, where it may skip or invent rows.
How do APIs expose facet filtering?
Typically as filter parameters or a filter expression over named facets, plus a sort parameter, with counts per value in the response. In a search API the facets are usually attributes of the page or the site: its domain, its type, its topic, its language, its date.
Where MillionShort fits
MillionShort has filters on structured attributes, and no facet counts.
On a search request you can filter by page_types and topics (the slugs come from GET /v1/sources), by site with include_domains and exclude_domains, by popularity with remove_top_sites, only_top_sites and popularity_buckets, by date, language and country on the sources that carry them, and by safe_search. Every result then carries the attributes themselves: source, page_type, topic, popularity and risk, so your code can group or filter the list further. The filters are described under lenses and in the search reference.
What it does not have: counts per facet value or a filter expression language. Web pages carry no date, so a date filter is not applied to web. summary.removed counts results that were removed and why, which is a different thing from a facet summary. MillionShort does not offer stored datasets or collections to filter either.