Documentation search for coding agents
Teams building coding assistants and developer tooling.
The problem
- A general web search for a programming question returns tutorial blogs that paraphrase documentation, frequently against an older version.
- Semantic search actively harms error-code lookup: an exact identifier has no meaningful embedding neighbourhood, so results are merely about errors.
- Ambiguous names cross domains — a query for "rust" returns metallurgy alongside the language.
The approach
- vertical=code is disambiguation by construction: metallurgy passages are not in that core, so they cannot be returned regardless of ranking.
- content_type=docs restricts to reference material maintained by whoever built the thing, rather than blogs about it.
- The term filter is a hard lexical requirement, and it is backed by a guarantee: an error code that is in the index stays findable, however aggressively the corpus is compacted.
The parameters that matter
| Parameter | Value | Why |
|---|---|---|
vertical | code | Ambiguous names cannot cross into other domains. |
content_type[] | docs | Official reference rather than paraphrase. |
term | the error code | A hard lexical requirement semantic search would smooth away. |
site | docs.example.com | Turns the index into search over one project’s documentation. |
# Documentation only, no tutorial blogs
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=async+runtime&vertical=code&content_type[]=docs&limit=8"
# Exact error code
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=connection+pool&term=SQLSTATE-08006"Where this is not the right tool
- Documentation for very new or niche libraries may not be indexed. why_not distinguishes not-crawled from removed.
- The index does not track versions explicitly. Use published_from when a recent version matters.
Frequently asked questions
How do I search one project’s documentation?
Set site to its documentation host and content_type to docs. That turns a general index into project-scoped documentation search with no separate integration.
Why use term instead of quoting the phrase?
A quoted phrase constrains the query; term is a hard filter on the index. It is also backed by our guarantee that an exact identifier in the index stays findable rather than being compacted away.
Build it on the free tier
10,000 requests a month, no card. Every parameter above works on every plan.