Skip to content
unlob

web_search

Search & retrieval

Searches the agent-first web index and returns metadata-only hits — url, host, snippet, score — never the page body.

The tool an agent reaches for first. It accepts boolean queries and the full filter surface: vertical, site, term, source, language, date range, host rank, quality, sort, collapse and facets.

Returning metadata rather than bodies is what keeps a ten-result search affordable. The agent reads titles and snippets, decides, and then calls get_document for the one or two passages worth spending context on.

Arguments

NameTypeDescription
queryrequiredstringBoolean query. AND / OR, `-` negation, "quoted phrases".
modestringkeyword, semantic or hybrid. Defaults to hybrid.
limitintegerResult count. Defaults to 10.
verticalstringRestrict to a vertical, or omit to auto-route.
sitestringRestrict to one host.
langstringLanguage code.
from / tointegerUnix timestamp range.
min_host_ranknumberAuthority floor.
min_qualityintegerQuality floor.
sortstringrelevance, recency, host_rank, quality, published, words, centrality.
collapsestringnone, host, page or story.

Returns:Metadata-only hits with scores and world-model signals.

Example

Prompt: “Find recent Rust async runtime documentation, excluding Python results.”

web_search calljson
{ "query": "rust AND async -python", "vertical": "code", "sort": "published", "limit": 8 }

Over HTTP

The same operation is available as GET /search for anything that does not speak MCP.

/searchbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/search?q=rust+AND+async+-python&vertical=code&mode=hybrid&limit=5"

Setup

One config block gives your client all 11 tools, including this one.

MCP configjson
{
  "mcpServers": {
    "unlob": {
      "command": "npx",
      "args": ["-y", "@unlob/mcp"],
      "env": { "UNLOB_API_KEY": "ulb_your_key_here" }
    }
  }
}

Get a key and connect

10,000 free requests a month. MCP calls bill exactly like HTTP calls — one request each.