---
title: "Retrieve page contents"
method: POST
path: "/web_search/contents"
tags: ["Contents"]
---

# Retrieve page contents

`POST /web_search/contents`

Retrieves clean HTML or Markdown content from a list of URLs. Supports up to 20 URLs per request (public API limit). Specify which formats to return: `html`, `markdown`, `metadata`.

## Request body

- ContentsRequest
  - `crawl_timeout` integer — Timeout for crawling each URL, in seconds (1-60).
  - `formats` string[] — Content formats to return. If omitted, `html` and `metadata` are returned by default. Retrieval is best-effort per URL: a format field appears only when that content could be produced, and a freshly crawled page may also include `html` even when not requested.
  - `max_age` integer, nullable — Maximum age of cached content in seconds. `null` means no limit.
  - `urls` string[], required — List of URLs to retrieve content from (max 20 for public API).

## Response `200`

Successful content retrieval response.

- object
  - `data` ContentsResponse
    - `results` ContentResult[]
      - `html` string — Cleaned HTML content (if `html` format requested; may also be present on freshly crawled pages).
      - `markdown` string — Markdown content (if `markdown` format requested).
      - `metadata` object — Page metadata (if `metadata` format requested).
        - `favicon_url` string, uri — Favicon URL (if available).
        - `site_name` string — Site name. Often empty.
      - `title` string — Page title (if available).
      - `url` string, uri, required — The source URL.

## Other responses

- `400` — Invalid request — validation error or invalid parameters.
- `401` — Unauthorized — missing or invalid API key. The API Gateway returns this response before the request reaches the backend service. The error format follows the standard Telnyx JSON:API error envelope with `errors[]`, not the backend-level `WebSearchError` shape.
- `500` — Internal server error.
- `502` — The upstream search provider returned an error.
- `504` — The upstream search provider timed out.

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
