Skip to content
unlob

collapse

none | host | page | story

Deduplicates the result set by host, page or story cluster.

collapse=story is the important one. A breaking news item can occupy every slot in a result set with syndicated copies of the same text; collapsing by story returns one representative per cluster with a group size attached.

That single parameter is usually worth more to an agent than any amount of ranking tuning, because it converts ten wasted slots into ten distinct facts.

Accepted values

  • none
  • host
  • page
  • story

The live vocabulary is served by /describe — read it rather than hardcoding this list.

Example

collapsebash
curl -H "x-api-key: $UNLOB_API_KEY" \
  "https://api.unlob.com/search?q=central+bank+decision&collapse=story"

Common questions

What does the collapse filter do?

Deduplicates the result set by host, page or story cluster.

When should I use collapse?

Any query over news or widely-syndicated content. Set it to `story` by default there.

How does collapse behave in practice?

That single parameter is usually worth more to an agent than any amount of ranking tuning, because it converts ten wasted slots into ten distinct facts.

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.