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

# Markdown 响应

> 网页数据 API 可以返回 Markdown 格式的响应

/scrape 和 /crawl 端点支持自动将 HTML 输出转换为 Markdown。此格式提供简洁、易读的输出，便于将结果集成到您的内容工作流和应用程序中，尤其适合将抓取结果输入大型语言模型，因为这类模型的令牌上下文通常有限。

### /scrape

**请求示例：**

<CodeGroup>
  ```shellscript cURL theme={null}
  # 将 'TOKEN VALUE' 替换为您的 API 密钥
  curl --request 'POST' \
          --url 'https://data.decodo.com/v1/scrape' \
          --header 'Accept: application/json' \
          --header 'Authorization: Bearer TOKEN VALUE' \
          --header 'Content-Type: application/json' \
          --data '
      {
        "url": "https://example.com",
        "markdown": true
      }
  '
  ```
</CodeGroup>

**示例输出：**

```text wrap theme={null}
This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.
```

### /crawl

/crawl 默认返回 Markdown。您可以将 [`output`](/docs/cn/web-data-api-crawl-parameters) 设置为 `markdown` 以明确指定，或设置为 `html` 以获取原始 HTML。

**请求示例：**

<CodeGroup>
  ```shellscript cURL theme={null}
  # 将 'TOKEN VALUE' 替换为您的 API 密钥
  curl --request 'POST' \
          --url 'https://data.decodo.com/v1/crawl' \
          --header 'Accept: application/json' \
          --header 'Authorization: Bearer TOKEN VALUE' \
          --header 'Content-Type: application/json' \
          --data '
      {
        "url": "https://example.com",
        "limit": 1,
        "output": "markdown"
      }
  '
  ```
</CodeGroup>

使用 `?type=content` 获取结果时，每个页面的 Markdown 内容位于其 `content` 字段中。详情请参阅[状态、结果与取消](/docs/cn/web-data-api-crawl-status-results-cancellation)。

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>


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