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

# 截图响应

> 网页数据 API 可以返回已渲染页面的截图

API 可以返回完整渲染后网页的桌面端截图。

将 `headless` 参数设置为 `png`，即可在响应负载中获取 base64 编码的截图（此设置也会自动启用 JavaScript 渲染）。

#### 请求示例

<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://www.githubstatus.com/",
  		"headless": "png"
      }
  '
  ```
</CodeGroup>

#### 响应示例

<CodeGroup>
  ```json JSON expandable theme={null}
  {
      "results": [
          {
              "content": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAdACAYAAAA+SlRyAAAgAElEQVR4XuydBbwV1RbGF49GuktQURAVFUVBBFRQuru7u7u7uxvpbkFKQELSwECkW7obeevb...",
              "headers": {
                  "nel": "{\"failure_fraction\": 0.001, \"include_subdomains\": true, \"max_age\": 600, \"report_to\": \"endpoint-1\"}",
                  "via": "1.1 6873f4a0be6528b5a618dcd775f26d96.cloudfront.net (CloudFront)",
                  "date": "Tue, 12 Aug 2025 06:00:20 GMT",
                  "etag": "W/\"9915fd65dc7034e378437c5838f4b4eb\"",
                  "link": "<https://dka575ofm4ao0.cloudfront.net/assets/register_subscription_form-589b657fec607087fc5c740c568270907310bc4f6aaa20256e70f01b103025ca.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/assets/status_common-c1b99d73ee7ab0fea796bd170723c1daac1381095a7dd7501a38ce6f333d86b3.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/0.076d36a21dada6e9b8ca.css>; rel=preload; as=style; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/191.076d36a21dada6e9b8ca.css>; rel=preload; as=style; nopush, <https://dka575ofm4ao0.cloudfront.net/assets/status/status_manifest-e5fd07250d5426b6c15214a184a78f72bd224c0f158f2ca1f35a3cf1ee9c1783.css>; rel=preload; as=style; nopush, <https://dka575ofm4ao0.cloudfront.net/assets/jquery-3.5.1.min-729e416557a365062a8a20f0562f18aa171da57298005d392312670c706c68de.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/assets/status_manifest-6a7ae3a8e2e1b1e1d9466495faa0851c3f5fff938743f6501c900aa2a8792e8c.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/common-4d053c18cbeef079deb0.chunk.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/globals-f39f1afbe40d8b149e0b.chunk.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/runtime-315523c15b4d55375eca.js>; rel=preload; as=script; nopush, <https://dka575ofm4ao0.cloudfront.net/packs/status-605cc5e06d8e861d8ea1.chunk.js>; rel=preload; as=script; nopush",
                  "vary": "Accept, Accept-Encoding",
                  "server": "AtlassianEdge",
                  "x-cache": "Miss from cloudfront",
                  "report-to": "{\"endpoints\": [{\"url\": \"https://dz8aopenkvv6s.cloudfront.net\"}], \"group\": \"endpoint-1\", \"include_subdomains\": true, \"max_age\": 600}",
                  "x-runtime": "0.095293",
                  "atl-traceid": "fb40dc44d3754193957cf5b3a94d1357",
                  "x-amz-cf-id": "DtIoPZbnZHyYakf-X1Tt1VcoxZyC-IkCY-OTA_2xZNAq5fwPzpAGfQ==",
                  "content-type": "text/html; charset=utf-8",
                  "x-amz-cf-pop": "LAX50-P1",
                  "accept-ranges": "bytes",
                  "cache-control": "max-age=3, public",
                  "server-timing": "atl-edge;dur=66, atl-edge-internal;dur=6, atl-edge-upstream;dur=64, atl-edge-pop;desc=\"aws-us-east-1\"",
                  "atl-request-id": "fb40dc44-d375-4193-957c-f5b3a94d1357",
                  "x-firefox-spdy": "h2",
                  "referrer-policy": "strict-origin-when-cross-origin",
                  "content-encoding": "br",
                  "x-xss-protection": "1; mode=block",
                  "x-download-options": "noopen",
                  "x-statuspage-version": "afd8fb74460a62fc5612aa6edbd1731244c94ccf",
                  "x-content-type-options": "nosniff",
                  "strict-transport-security": "max-age=259200",
                  "x-statuspage-skip-logging": "true",
                  "access-control-allow-origin": "*",
                  "x-pollinator-metadata-service": "status-page-web-pages",
                  "x-permitted-cross-domain-policies": "none"
              },
              "cookies": [
                  {
                      "key": "_octo",
                      "path": "/",
                      "value": "GH1.1.1580248311.1791377176",
                      "domain": ".www.githubstatus.com",
                      "secure": true,
                      "comment": "",
                      "expires": 1822913176,
                      "max-age": "",
                      "version": "",
                      "httponly": "",
                      "samesite": ""
                  }
              ]
          }
      ]
  }
  ```
</CodeGroup>

对响应中的 base64 字符串进行解码后，得到的 PNG 图片如下所示：

<Frame>
  <img src="https://mintcdn.com/decodo/7Hj3tfc-1rGMirwk/images/docs/ccf207432d9d4042ffc6a7613b20fdfc028287d0a9945beabb0613ed097be685-image.png?fit=max&auto=format&n=7Hj3tfc-1rGMirwk&q=85&s=aa934b19513d7121fd90c2ccfd023a76" alt="" width="1920" height="1856" data-path="images/docs/ccf207432d9d4042ffc6a7613b20fdfc028287d0a9945beabb0613ed097be685-image.png" />
</Frame>

<Note>
  并非所有目标模板都支持 `png` 输出。请查看各模板的文档以了解兼容性。
</Note>

***

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