Skip to content
unlob

Facets

Facets let an agent understand the shape of a result set before spending a single token on document text.

What you get

Setting facets=true adds counts across seven dimensions: host, vertical, source, content type, authority, publication year and graph community.

The publication-year histogram is often the most informative — it immediately shows whether a topic is actively discussed or whether everything written about it dates from three years ago.

bashbash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/search?q=quantum+computing&facets=true&limit=5"

Facets as an agent control loop

For an agent that chooses its own next step, facets are cheaper than reading. If the host facet shows results concentrated on one domain, the agent knows to broaden. If the year histogram is flat and old, it knows the topic is stale. If the community facet splits, the term is ambiguous and needs disambiguating before anything is read.

All of that costs one request and no document fetches.

Combining with limit=0

limit=0 returns the total and the facets without any results. It is the cheapest possible coverage probe — enough to decide whether a query is worth running properly.

Start on the free tier

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