Skip to content
unlob

Query syntax

A small, predictable grammar. Everything else that shapes a result set is a filter rather than syntax, which keeps queries readable and machine-generable.

Boolean operators

AND and OR combine terms explicitly. Without an operator, terms are combined in the way that produces the best hybrid ranking rather than as a strict conjunction — so if you need every term present, say AND.

Examplestext
rust AND async
kubernetes OR k8s
retrieval AND (agent OR assistant)

Negation

A leading minus removes a term. This is usually the fastest fix for an ambiguous query — one exclusion often does more than any amount of ranking tuning.

texttext
rust -python
jaguar -car -animal

Exact phrases

Double quotes require the enclosed words to appear together in order. Use this when word order carries the meaning — "context window" is not the same query as context window.

texttext
"context window"
"retrieval augmented generation" AND evaluation

Exact terms with the term filter

For identifiers — error codes, CVE numbers, part numbers, case citations — use the term filter rather than the query string. It is a hard lexical requirement rather than a hint, and it is backed by a guarantee: an exact identifier that is in the index stays findable, and will not quietly disappear as the corpus is compacted.

bashbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/search?q=disk+full&term=ENOSPC"

What is not syntax

There is no site: operator, no filetype: and no before:. Those are filters — site, content_type, published_to — and keeping them out of the query string means an agent can compose them programmatically without string-building, and a malformed filter fails loudly instead of being silently searched for as a literal.

Start on the free tier

10,000 requests a month, no card. Everything documented here works on every plan.