Get contents
Metadata and short verbatim excerpts for URLs you already have.
POST /v1/contents takes up to 10 URLs and returns, for each one, its title, the description its
publisher gives it, its publication date and its source. With a query, the model also picks a short
verbatim excerpt about it and scores each page’s relevance.
const res = await ts.contents(
['https://reddiaria.example/economia/…', 'https://diarioejemplo.example/politica/…'],
{ query: 'el Presupuesto 2027' },
);
for (const page of res.results) {
if (page.status === 'ok') console.log(page.relevance, page.title, page.highlights);
else console.log(page.url, page.error?.code);
}Per-URL status
Each URL has its own status. A page that fails — unreachable, not an article, blocked — comes back with
status: "error" and a reason, and never fails the rest of the request. A page from a source that isn’t
available right now comes back with source_unavailable: we don’t say why, and it may be temporary.
Price
Contents is billed per page read: $0.20 per 1,000 pages, or $0.40 with a query, when the
model reads each page to pick the excerpts and score it. A page that fails is not billed.
Never the full text
Like a search engine, we return metadata, a link and at most one short verbatim excerpt per article: up to 25 words, never from the first paragraph, and none for short articles. Never the full article. It keeps publishers’ content where it belongs, and your context window lean.