> ## 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 は任意の Web ページを Markdown に変換します。パラメータ、レスポンス構造、エラーコードを掲載しています。

> [!NOTE]
>
> 右側のPlaygroundでお試しいただけます：**Authorization**に`Bearer sk-your-api-key`（`default`または`svip`グループのキー）を設定し、任意のURLを入力して送信してください。ページコンテンツの取得に成功した場合にのみ課金されます。

> [!TIP]
>
> 料金、テストデータ、注意事項については[概要](/ja/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は課金対象となります**：一部のサイトでは、存在しないページに対して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.