> ## 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.

# 快速入门

> Decodo 网页数据 API 首次请求指南，涵盖获取凭据、cURL 调用示例，以及同步、异步和批量模式。

Decodo 网页数据 API 是一套全面的数据采集解决方案，适用于电商平台、搜索引擎结果页面、社交媒体平台及其他各类网站。

## 获取 API 凭据

首先创建账户以获取 API 凭据。登录仪表盘后，购买免费试用或订阅（定价详情请参阅[**此处**](/docs/cn/web-data-api-introduction)）。然后从[仪表盘](https://dashboard.decodo.com/)复制您的 API 密钥，并在 `Authorization` 请求头中以 `Bearer` 加密钥的形式发送。

<img alt="网页数据 API 密钥信息" lightAlt="Group427323676" darkAlt="Group427323676" src="https://mintcdn.com/decodo/r1bLs4Ydyt8q99aY/images/web-data-api-key-info.png?fit=max&auto=format&n=r1bLs4Ydyt8q99aY&q=85&s=8c99506b76cfe2587508390891072635" width="1830" height="681" data-path="images/web-data-api-key-info.png" />

## 第一个请求

通过一个简单的请求测试您的设置：

<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://ip.decodo.com"
      }
  '
  ```
</CodeGroup>

请记得将 `TOKEN VALUE` 替换为您的 API 密钥。

<Note>
  此请求不会渲染 JavaScript。仪表盘游乐场在每个 /scrape 请求中都会发送 `"headless": "html"`，因此您自行编写的请求返回的内容可能少于在游乐场中发送的相同请求。如果页面需要 JavaScript 才能加载内容，请在请求体中添加 [`headless`](/docs/cn/web-data-api-scrape-javascript-rendering)。
</Note>

您将收到一个 JSON 响应，页面内容位于 `content` 中。位置是随机分配的，可能与示例不同：

<CodeGroup>
  ```json JSON expandable theme={null}
  {
      "results": [
          {
              "content": "{\n    \"browser\": {\n        \"name\": \"Firefox\",\n        \"version\": \"123.0\"\n    },\n    \"platform\": {\n        \"name\": \"Windows\",\n        \"os\": \"Windows 10\",\n        \"type\": \"desktop\"\n    },\n    \"engine\": {\n        \"name\": \"Gecko\",\n        \"version\": \"20100101\"\n    },\n    \"isp\": {\n        \"isp\": \"Cogent Communications\",\n        \"asn\": 174,\n        \"domain\": \"\",\n        \"organization\": \"Cogent Communications\"\n    },\n    \"city\": {\n        \"name\": \"New York\",\n        \"code\": \"NY\",\n        \"state\": \"New York\",\n        \"time_zone\": \"America/New_York\",\n        \"zip_code\": \"10118\",\n        \"latitude\": 40.7126,\n        \"longitude\": -74.0066\n    },\n    \"proxy\": {\n        \"ip\": \"149.115.134.88\"\n    },\n    \"country\": {\n        \"code\": \"US\",\n        \"name\": \"United States\",\n        \"continent\": \"North America\"\n    }\n}\n",
              "headers": {
                  "content-length": "813",
                  "content-type": "application/json",
                  "date": "Wed, 28 Jan 2026 14:06:35 GMT",
                  "server": "nginx"
              },
              "cookies": [],
              "status_code": 200,
              "task_id": "7422278918918391809",
              "created_at": "2026-01-28 14:06:33",
              "updated_at": "2026-01-28 14:06:35"
          }
      ]
  }
  ```
</CodeGroup>

## 了解更多

我们的 API 提供了许多您可能感兴趣的功能，以下是几个主要主题。

支持三种**集成类型**：

* 同步（实时）请求，详情请参阅[**此处**](/docs/cn/web-data-api-scrape-real-time-requests)。
* 异步请求，详情请参阅[**此处**](/docs/cn/web-data-api-scrape-asynchronous-requests)。
* 批量请求，详情请参阅[**此处**](/docs/cn/web-data-api-scrape-asynchronous-requests)。

我们支持众多**参数**，例如 JS 渲染、浏览器操作、设备类型等。详情请参阅[**此处**](/docs/cn/web-data-api-scrape-parameters)。

我们还为 Google、Amazon、ChatGPT 等平台提供了丰富的**目标模板**，详情请参阅[**此处**](/docs/cn/web-scraping-api-targets)。

***

<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.