Search API
Filters and fields
Narrow a POST search with the filter language and choose the fields each result returns.
POST /api/v1/search takes the query with a filter, a field projection and a language. Every value is checked against the public contract; a rejected request returns 400 and names the fields to correct.
{
"query": "semiconductor export controls",
"limit": 20,
"lang": "en",
"filter": "(@categories INCLUDES ANY [\"/News\"] AND @publish_time >= now-1d)",
"select": [
"url",
"title",
"publish_time",
"highlights"
]
} Request fields
querystringRequiredThe search text.
Minimum length1
Maximum length512
limitinteger | nullOptionalThe maximum number of results. The default is 20.
Minimum1
Maximum50
langstring | nullOptionalA two-letter lowercase language code that results must match.
Pattern^[a-z]{2}$
filterstring | nullOptionalAn expression in the filter language that every result must satisfy.
Minimum length1
Maximum length65536
selectSearchResultField[]OptionalThe fields each result returns.
Minimum items1
Filter language
A filter is one or more predicates joined with AND and OR, grouped in parentheses. A predicate names a field with @, then an operator, then a value: a double-quoted string, a number, true or false, or a JSON list. A filter holds at most 50 predicates, 50 values in one list and three levels of parentheses.
@domain IN ["python.org", "mozilla.org"]
@categories INCLUDES NONE ["/Adult"]
(@categories INCLUDES ANY ["/News"] AND @publish_time >= now-1d)
@page_type = "Article" AND @word_count >= 800
@language = "de" OR @location = "DE"
@title : "benchmark" AND @url ^ "https://docs." Each field takes the operators of its value kind. A time compares with now-5m, now-2h, now-1d or now-1w, or with a quoted ISO 8601 date such as "2025-01-01". A list value is a JSON array.
| Kind | Fields | Operators |
|---|---|---|
| Text | title, description, url, content | : !: PHRASE NOT PHRASE |
| Keyword | site_name, author, domain, page_type, rule_type, document_intent, content_angle | = != IN NOT IN : !: ^ !^ |
| Code | language, location | = != IN NOT IN |
| Number | word_count | = != < <= > >= BETWEEN |
| Time | publish_time, first_seen | = != < <= > >= BETWEEN |
| List | categories | INCLUDES ANY INCLUDES ALL INCLUDES NONE |
| Flag | republished | = != |
Result fields
select names the fields of every result. Omit it to receive url, title, description and language. A selected field that a page does not have is null. The content field can be filtered on but not selected.
urlnull | stringOptionalCanonical page URL.
titlenull | stringOptionalPage title.
descriptionnull | stringOptionalResult description.
anchornull | stringOptionalAggregated inbound anchor text.
site_namenull | stringOptionalSite display name.
authornull | stringOptionalPage author.
languagenull | stringOptionalDocument language.
domainnull | stringOptionalRegistrable or host domain.
categoriesnull | object[]OptionalScored taxonomy categories.
locationnull | stringOptionalGeographic location code.
page_typenull | stringOptionalPage content type.
publish_timenull | stringOptionalPublished timestamp.
first_seennull | stringOptionalFirst-seen timestamp.
refdomainsnull | integerOptionalReferring-domain count.
domain_refdomainsnull | integerOptionalDomain referring-domain count.
word_countnull | integerOptionalVisible word count.
rule_typenull | stringOptionalApplied rule type.
document_intentnull | stringOptionalClassified document intent.
content_anglenull | stringOptionalClassified content angle.
republishednull | booleanOptionalWhether the document was republished.
highlightsnull | string[]OptionalUp to three query-relevant passages.
Page types
The page_type field takes one of these values:
ListingListing_CollectionArticleLanding_PageInteractive_ToolsImageVideoAudioDocumentUser_Generated_ContentCore_Page