Get contents
Metadata and short verbatim excerpts of up to 10 URLs.
Returns, for each URL, its title, the description its publisher gives it, its publication date, its source
and a very short verbatim excerpt (up to 25 words, never from the first paragraph) — never the full text.
With a query, the model picks the excerpt about it and scores each page’s relevance. Articles that can’t
be quoted (short, paid, or whose publisher asked for no snippets) come back without an excerpt.
Each URL has its own status: one that fails never fails the request.
Body
urlsuri[]requiredUp to 10 full URLs.
querystringWhen set, the model picks the excerpt about this query and scores each page’s
relevance.highlightsbooleanDefault:trueReturn a short verbatim excerpt: up to 25 words, never from the first paragraph. Defaults to
true.max_tokensinteger | nullA hard cap on model tokens for this request, minimum 2000. If it is reached, you get everything judged so far with
incomplete: true.
Response
idstringThe request id.
object"contents"Always
contents.resultsobject[]One entry per URL, in the order they were sent.
Show child attributes
urlstringThe article’s canonical URL.
statusenum<string>okorerror. A failing URL never fails the whole request.errorobject | nullWhen
statusiserror: the reason, such assource_unavailablewhen the source isn’t available right now (we don’t say why, and it may be temporary).Show child attributes
codestringA stable code.
messagestringA human-readable explanation.
titlestring | nullThe headline, up to 240 characters.
descriptionstring | nullThe description the page declares, up to 300 characters.
published_atstring | nullPublication time, ISO 8601 in UTC.
sourcestring | nullThe publication.
excerptstring | nullA very short verbatim excerpt (up to 25 words), never from the first paragraph: the one about
querywhen one was sent.nullwhen the article can’t be quoted: it’s short, it’s paid, or its publisher asked for no snippets.highlightsstring[]A short verbatim excerpt, about
querywhen one was sent: up to 25 words, never from the first paragraph. None for short articles.relevancenumber | nullWith
query: the probability that the page is about it.
usageobjectWhat the request consumed.
Show child attributes
tokensintegerModel tokens. 0 when served from cache.
callsintegerModel calls.
cost_usdnumber | nullCost in US dollars, when known.
duration_msintegerTime on the server, in milliseconds.