> ## 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]
>
> 오른쪽 플레이그라운드에서 직접 사용해 보세요: **Authorization**에 `Bearer sk-your-api-key`(`default` 또는 `svip` 그룹의 키)를 입력하고,
> 임의의 URL을 입력한 후 전송합니다. 페이지 콘텐츠를 성공적으로 가져왔을 때만 과금됩니다.

> [!TIP]
>
> 요금, 테스트 데이터 및 알아두어야 할 사항은 [개요](/ko/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, 도메인 미존재, 사설 IP 주소, 사이트 접근 거부, 지원되지 않는 유형 등. 다른 URL을 시도하십시오 | 아니요 |
| 429 | — | 업스트림 요청 제한(25 QPS 및 도메인별 제한) 초과. 잠시 기다린 후 다시 시도하십시오 | 아니요 |
| 503 | `no available channels for model deepseek-fetch` | 키의 그룹에 해당 API(예: ClaudeCode)가 없습니다. `default` / `svip` 키를 사용하십시오 | 아니요 |
| 5xx / 504 | — | 업스트림 내부 오류 또는 가져오기 시간 초과. 나중에 다시 시도하십시오 | 아니요 |

> [!WARNING]
>
> **소프트 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.