Datalumo
API Summarize
API

Summarize

View markdown
POST /api/v1/{organisation}/widgets/{widget}/summarize

Auth: widget domain, widget secret, or organisation API key with summarize
Billing: uses answer allowance, same as chat (402 when none are left)

Returns a short overview of the best matching pages for a query. Useful when you want “what does our site say about X?” without a full chat thread.

#Body

Field Type Required Description
query string yes Max 2048 characters
filters object no Optional search filters
ids string[] no Page public ids to summarise instead of searching again. Max 20. Unknown ids are ignored.
external_ids string[] no CMS ids (the external_id on a search hit) to summarise instead of searching again. Used when ids is omitted. Max 20.
limit int no How many top results to base the summary on, 1-20, default 8
browser_language string no Language hint for the summary
stream bool no Stream the summary text

#JSON response

When there is enough relevant content:

{
  "data": {
    "text": "A concise overview…",
    "sources": [ /* same fields as search hits */ ],
    "summarized": true
  }
}

When there is too little to summarise (or the query looks like simple navigation, such as a single keyword):

{
  "data": {
    "text": "",
    "sources": [],
    "summarized": false
  }
}

Always check summarized before showing text. sources is the cited subset of the pages the summary was built from (same fields as search hits). Use that list for a "sources used" block. Pass the ids from a search you already ran when you want the summary to stay on those results.

#Streaming

Uses the same event types as chat (token, done, error). The final done payload includes { "summarized": true }. If there is nothing worth summarising, you get a normal JSON response with summarized: false instead of a stream.