> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Справочник по DeepSeek Web Fetch API

> Справочник и песочница DeepSeek Fetch API: /v1/tools/fetch преобразует любую веб-страницу в Markdown; описание параметров, структуры ответа и кодов ошибок.

> [!NOTE]
>
> Попробуйте в Playground справа: укажите `Bearer sk-your-api-key` (ключ из группы `default` или `svip`) в **Authorization**,
> введите любой URL и отправьте. Тарификация происходит только при успешном получении содержимого страницы.

> [!TIP]
>
> Тарифы, тестовые данные и всё, что необходимо знать, собраны в [Обзоре](/ru/api-capabilities/deepseek-search-fetch/overview).

## Справочник параметров

| Параметр | Тип | Обязательный | Описание |
| - | - | - | - |
| `url` | string | ✓ | HTTP / HTTPS URL с хостом, до 8192 символов, без имени пользователя и пароля |

В теле запроса не требуется поле `model`; неизвестные поля игнорируются.

## Ключевые особенности ответа

```json theme={null}
{
  "title": "APIYI Docs",
  "content": "# APIYI Docs\n\nBody converted to Markdown..."
}
```

* `content` — извлеченное основное содержимое в формате Markdown; навигация, реклама и другие элементы интерфейса страницы по большей части удалены
* `title` — пустая строка, если у страницы нет заголовка
* При тестировании страница документации объемом около 6 400 символов обрабатывалась 1,6 с; некоторые сайты работают медленнее, поэтому установите клиентский таймаут на 30 с или более

## Коды ошибок

| HTTP | Пример сообщения | Причина и решение | Тарифицируется |
| - | - | - | - |
| 400 | `'url' must be a valid HTTP or HTTPS URL` | Некорректный URL | Нет |
| 400 | `missing field 'url'` | Отсутствует `url` | Нет |
| 401 | `Invalid token.` | Недействительный API-ключ или отсутствует заголовок `Authorization` | Нет |
| 404 | `failed to fetch URL` | Нет полезного контента: целевая страница вернула 404, домен не существует, приватный адрес, сайт отклонил доступ, неподдерживаемый тип и т. д. Попробуйте другой URL | Нет |
| 429 | — | Превышен лимит запросов вышестоящего сервиса (25 QPS, плюс ограничение на домен); подождите и повторите попытку | Нет |
| 503 | `no available channels for model deepseek-fetch` | В группе ключа нет этого API (например, ClaudeCode); используйте ключ `default` / `svip` | Нет |
| 5xx / 504 | — | Внутренняя ошибка вышестоящего сервиса или таймаут получения данных; повторите попытку позже | Нет |

> [!WARNING]
>
> **Мягкие ошибки 404 (Soft 404) тарифицируются**: некоторые сайты в ответ на отсутствующую страницу возвращают главную страницу или страницу с уведомлением вместо 404,
> и Fetch расценивает это как успешное получение данных. Перед вызовом убедитесь, что URL действителен.

Поле `type` в теле ошибки всегда имеет значение `shell_api_error`; выполняйте ветвление по коду состояния HTTP.


## OpenAPI

````yaml api-reference/deepseek-fetch-openapi-en.yaml POST /v1/tools/fetch
openapi: 3.1.0
info:
  title: DeepSeek Web Fetch API
  description: >
    `deepseek-fetch` — DeepSeek's native web fetch API. Turns any web page into
    Markdown body text.


    - Not a chat model and consumes no tokens: **billed per successful request**

    - Fetch failures (404) and parameter errors (400) are not billed

    - Upstream rate limit: 25 QPS, plus a separate limit per target domain

    - Available in the `default` / `svip` groups; ClaudeCode group keys cannot
    call it


    **Authentication**: header `Authorization: Bearer YOUR_API_KEY`


    **Get an API key**: create one in the APIYI console at `api.apiyi.com/token`
  version: 1.0.0
servers:
  - url: https://api.apiyi.com
    description: Primary endpoint
security:
  - bearerAuth: []
paths:
  /v1/tools/fetch:
    post:
      tags:
        - Search & Fetch
      summary: 'Web fetch: deepseek-fetch'
      description: >
        Send a URL, get the page title and Markdown body. The request body does
        not need a `model` field.
      operationId: deepseekToolsFetch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchRequest'
            example:
              url: https://docs.apiyi.com/en
      responses:
        '200':
          description: Fetch succeeded (billed once)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchResponse'
              example:
                title: APIYI Docs
                content: |-
                  # APIYI Docs

                  Body converted to Markdown...
        '400':
          description: 'Invalid parameters, not billed: malformed or missing url'
        '401':
          description: Invalid API key
        '404':
          description: >-
            No usable content, not billed: target page 404, domain does not
            exist, private address, target site refused access, etc. Error
            message: failed to fetch URL
        '429':
          description: Upstream rate limit exceeded (25 QPS); wait and retry
        '503':
          description: >-
            This API is not enabled for the key's group (e.g. ClaudeCode); use a
            default / svip group key
      security:
        - bearerAuth: []
components:
  schemas:
    FetchRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: >-
            HTTP / HTTPS URL with a host, up to 8192 characters, no username or
            password
          example: https://docs.apiyi.com/en
    FetchResponse:
      type: object
      properties:
        title:
          type: string
          description: Page title; empty string if none
        content:
          type: string
          description: Extracted body text in Markdown
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Add Authorization: Bearer YOUR_API_KEY to the request headers'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.