---
title: "Get metadata and short excerpts for up to 10 URLs"
method: POST
path: "/v1/contents"
---

# Get metadata and short excerpts for up to 10 URLs

`POST /v1/contents`

## Request

- Base URL: `https://api.typesearch.ai`
- URL: `https://api.typesearch.ai/v1/contents`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

## Request body

- ContentsRequest
  - `urls` string[], required
  - `query` string: With a query, the model picks the excerpt about it and says how much each article covers it.
  - `highlights` boolean
  - `max_tokens` integer, nullable: Cap on model tokens. If it is reached, the response comes back with incomplete: true.

## Response `200`

One entry per URL, each with its own status.

- ContentsResponse
  - `id` string, required
  - `object` 'contents', required
  - `results` object[], required
    - `url` string, required
    - `status` 'ok' | 'error', required
    - `error` object, nullable, required
      - `code` string, required
      - `message` string, required
    - `title` string, nullable, required
    - `description` string, nullable, required
    - `published_at` string, nullable, required
    - `source` string, nullable, required
    - `excerpt` string, nullable, required: A very short verbatim excerpt (up to 25 words), never from the first paragraph: the one about the query if there is one. Null when the article can’t be quoted (short, paid, or the publisher asked for no snippets).
    - `highlights` string[], required
    - `relevance` number, nullable, required: With query: probability that the article is about it.
  - `usage` object, required
    - `tokens` integer, required: Model tokens used by this request. 0 when it came from the cache.
    - `calls` integer, required
    - `cost_usd` number, nullable, required: What this request was billed, in USD: the list price of its mode (see `pricing` in GET /v1/usage), per query. 0 when it came from the cache. Null in partial results.
    - `duration_ms` integer, required

## Other responses

- `402`: Payment required: `insufficient_credits` (no credit left), `spend_limit_reached` (the key hit its monthly limit) or `budget_too_small`.
- `default`: Error (RFC 9457). In English unless the request sends `Accept-Language: es`.

---

[API](https://skmtc.dev/typesearch/apis/typesearch-news-search-api.md) · [All operations](https://skmtc.dev/typesearch/apis/typesearch-news-search-api/llms.txt) · [OpenAPI document](https://skmtc.dev/typesearch/apis/typesearch-news-search-api/revisions/b270b9a9c6a5?raw)
