lang
stringRestricts results to one language; `langs[]` accepts several.
The index puts 101 languages in a single embedding space, so a semantic query in English can retrieve relevant German or Japanese passages without a translation step. That is often what you want — and sometimes emphatically not.
lang is how you pin it down when the answer must be in a language your user reads.
Example
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=klimapolitik&lang=de"Common questions
What does the lang filter do?
Restricts results to one language; `langs[]` accepts several.
When should I use lang?
The output has to be in a specific language, or you are deliberately comparing coverage across languages.
How does lang behave in practice?
`lang` is how you pin it down when the answer must be in a language your user reads.
Filters are free
Every filter is evaluated against a stored field, so it narrows the candidate set before scoring — a filtered query is often faster than an unfiltered one.