Menu

Search

Highlights and page text

Three sizes of text for each result: the snippet, the passages that best answer the query, and the page itself.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

A search result can carry three sizes of text. Choose by what the model that reads it needs, and by what you want to pay.

You wantSendComes back inCost
A short extract around the matchnothing, or max_chars_per_result (0 to 2,000)snippetFree
The passages that best answer the querymax_highlights (0 to 5; 0 is off)highlights, highlight_spansFree
The text of the pageinclude_content: truecontent1 credit a call for the text of up to 10 results; 1 more for each further 10 with text

Highlights

Example
Shell
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "sourdough starter hydration", "max_highlights": 3 }'

max_highlights returns up to that many passages for each result, best first. highlight_characters sets how long one passage should be, and cannot be sent without max_highlights. Each highlight has a span in highlight_spans, in the same order:

FieldTypeNotes
startinteger, 0 or more or nullCharacter offset (in Unicode code points) of the highlight in content.text as this result returns it. Null when there is nothing to point into: include_content was not sent, the highlight lies past the max_characters cut, or we hold no page text for the result.
endinteger or nullThe offset just past the highlight. Null with start.
scorenumber, 0 to 11.0 is a full-length passage of plain prose that holds every word of the query.

Without max_highlights, highlights is the snippet as a one-item list.

Highlights suit an agent that reads many results and decides which to open: they cost nothing and keep the context small.

Page text

Example
Shell
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "sourdough starter hydration",
    "num_results": 5,
    "include_content": true,
    "max_characters": 4000
  }'

include_content: true adds content to each web and news result: the text of the page as we hold it. max_characters cuts it (500 to 50,000, default 10,000) and cannot be sent without include_content.

FieldTypeNotes
textstringThe page's text: menus and page chrome removed, e-mail addresses and phone numbers redacted, cut at max_characters.
charactersintegerLength of text.
truncatedbooleanTrue when the page is longer than text.
captured_fromstringThe earliest day this copy can have been taken. Treat the page as being this old.
captured_tostringThe latest day this copy can have been taken. The same day as captured_from for news.

Three things to know:

The text is cleaned: menus and page chrome are taken out, and e-mail addresses and phone numbers are replaced with [email] and [phone].

Which one

The fields are listed in full under Parameters, and the cost rules under Pricing and limits.

This page as Markdown ยท llms.txt