---
title: "Fetch web pages"
method: POST
path: "/v1/fetch"
tags: ["Search"]
---

# Fetch web pages

`POST /v1/fetch`

## Request

- Base URL: `https://api.dexto.ai`
- URL: `https://api.dexto.ai/v1/fetch`
- Auth: HTTP bearer

Fetch the readable text of up to 10 web pages. Pages that could not be fetched are returned with an error and are not charged.

## Request body

- object
  - `max_age_hours` integer: Use cached pages only when younger than this; 0 always fetches live pages.
  - `max_characters` integer: Text characters per page.
  - `urls` string[], required: Absolute http or https URLs without credentials; duplicates are fetched once.

## Response `200`

Successful response.

- object
  - `id` string, uuid, required
  - `object` 'fetch', required
  - `results` object[], required
    - `error` object, nullable, required
      - `code` string, required
      - `http_status` integer, nullable, required
    - `status` 'ok' | 'error', required
    - `text` string, nullable, required
    - `title` string, nullable, required
    - `url` string, required
  - `usage` object, required
    - `charge_usd` number, required: What this request was charged.

## Other responses

- `400`: Invalid JSON or request fields.
- `401`: Missing or invalid API key.
- `402`: The account has insufficient credits.
- `403`: The account cannot perform this operation.
- `404`: The requested resource was not found.
- `409`: The request conflicts with existing resource state.
- `429`: The account exceeded this operation's request rate.
- `500`: Unexpected Dexto failure.
- `502`: The upstream model provider failed.
- `503`: A required Dexto service is temporarily unavailable.

---

[API](https://skmtc.dev/dexto/apis/dexto-api.md) - [All operations](https://skmtc.dev/dexto/apis/dexto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dexto/apis/dexto-api/revisions/47eb880cffa5?raw)
