# 设置 OnPage 任务

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/on_page/task_post`

**Tags:** DataForSEO

开始对 `target` 进行爬取，并在 `tasks[0].id` 中返回任务 `id`——**该 id 是本系列其他所有工具都需要的句柄**，请保留它。`max_crawl_pages` 限制爬取规模，`start_url`、`max_crawl_depth`、`priority_urls` 和 `crawl_delay` 塑造爬取方式，`store_raw_html` 决定 `post_dataforseo_on_page_raw_html` 之后是否有内容可提供。采用 DataForSEO 的信封结构：数据位于 `tasks[0].result`，结果状态位于 `tasks[0].status_code`——被拒绝的请求仍会返回 HTTP 200。⚠️ 这不是常见的提交/获取配对：爬取是一个会话，随后由十几个其他工具按 id 查询。轮询 `get_dataforseo_on_page_summary` 直到 `crawl_progress` 显示 `finished`；对 example.com 的单页爬取用时远不到一分钟。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.003 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "<em>目标域名</em><br><strong>必填字段</strong><br>域名不应包含 <code>https://</code> 和 <code>www.</code><br>如果指定页面 URL，将返回该 URL 中所含域名的结果"
          },
          "max_crawl_pages": {
            "type": "integer",
            "description": "<em>爬取页面数上限</em><br><strong>必填字段</strong><br>在指定域名上要爬取的页面数量<br><strong>注意：</strong><br>如果将 <code>max_crawl_pages</code> 设为 1 且未指定 <code>start_url</code> 或将其设为首页，以下全站检查将被禁用：<br><code>test_canonicalization</code>、<code>enable_www_redirect_check</code>、<code>test_hidden_server_signature</code>、<code>test_page_not_found</code>、<code>test_directory_browsing</code>、<code>test_https_redirect</code><br>要强制启用它们，请将 <code>force_sitewide_checks</code> 设为 <code>true</code>。如果 <code>max_crawl_pages</code> 设为 1 且 <code>start_url</code> 指定的不是首页，所有全站检查都将被禁用；<br>要强制启用它们，请将 <code>force_sitewide_checks</code> 设为 <code>true</code>"
          },
          "start_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>要爬取的第一个 URL</em><br>可选字段<br><strong>注意：</strong>应指定绝对 URL<br>如果只想爬取单个页面，请在此字段中指定其 URL，并将 <code>max_crawl_pages</code> 参数设为 <code>1</code><br>也可以使用<a href=\"/v3/on_page/instant_pages/?bash\" target=\"_blank\" rel=\"noopener noreferrer\">实时 Instant Pages 端点</a>获取特定页面的数据"
          },
          "force_sitewide_checks": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>爬取单个页面时启用全站检查</em><br>可选字段<br>如果希望在爬取单个页面时获取全站检查数据，请设为 <code>true</code>；<br>默认值：<code>false</code>"
          },
          "priority_urls": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>绕过队列优先爬取的 URL</em><br>可选字段<br>此数组中指定的 URL 将优先爬取，绕过爬取队列；<br><strong>注意：</strong>应指定绝对 URL；<br>最多可指定 <strong>20 个 URL</strong>；<br>数组中的所有 URL 必须属于 <code>target</code> 域名；<br>除非 <code>allow_subdomains</code> 参数设为 <code>true</code>，否则子域名将被忽略。示例：<br>`\"priority_urls\": [<br>\"https://dataforseo.com/apis/serp-api\",<br>\"https://dataforseo.com/contact\"<br>]`"
          },
          "max_crawl_depth": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>爬取深度</em><br>可选字段<br>要爬取页面的链接深度；<br>例如，爬取的起始页面为第 0 层，与该页面存在链接的页面为第 1 层，依此类推。"
          },
          "crawl_delay": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>命中间隔，毫秒</em><br>可选字段<br>爬虫对服务器的多次命中之间的自定义延迟<br>默认值：<code>2000</code>"
          },
          "store_raw_html": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>存储爬取页面的 HTML</em><br>可选字段<br>如果希望通过<a href=\"/v3/on_page/raw_html/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage Raw HTML 端点</a>获取页面的 HTML，请设为 <code>true</code><br>默认值：<code>false</code>"
          },
          "enable_content_parsing": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>解析爬取页面的内容</em><br>可选字段<br>设为 <code>true</code> 以使用<a href=\"/v3/on_page/content_parsing/live/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage Content Parsing 端点</a><br>默认值：<code>false</code>"
          },
          "support_cookies": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>支持爬取页面的 Cookie</em><br>可选字段<br>设为 <code>true</code> 以在爬取页面时支持 Cookie<br>默认值：<code>false</code>"
          },
          "accept_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>访问网站的语言标头</em><br>可选字段<br>支持所有语言区域格式（xx、xx-XX、xxx-XX 等）<br><strong>注意：</strong>如果你不指定此参数，某些网站可能会拒绝访问；此时响应数组中的页面将带有 <code>\"type\":\"broken</code>"
          },
          "custom_robots_txt": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>自定义 robots.txt 设置</em><br>可选字段<br>示例：<code>Disallow: /directory1/</code>"
          },
          "robots_txt_merge_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>合并或覆盖 robots.txt 设置</em><br>可选字段<br>可能的值：<code>merge</code>、<code>override</code>；<br>如果希望忽略网站爬取限制及其他 robots.txt 设置，请设为 <code>override</code><br>默认值：<code>merge</code>；<br><strong>注意：</strong>如果设为 <code>override</code>，请指定 <code>custom_robots_txt</code> 参数"
          },
          "custom_user_agent": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>自定义用户代理</em><br>可选字段<br>用于抓取网站的自定义用户代理<br>示例： <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36<br></code><br>默认值：<code>Mozilla/5.0 (compatible; RSiteAuditor)</code>"
          },
          "browser_preset": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>浏览器屏幕参数预设</em><br>可选字段<br>如果使用此字段，则无需指定 <code>browser_screen_width</code>、<code>browser_screen_height</code>、<code>browser_screen_scale_factor</code>可选值：<br><code>desktop</code>、<code>mobile</code>、<code>tablet</code><code>desktop</code> 预设将应用以下值：<code>browser_screen_width: 1920</code><br><code>browser_screen_height: 1080</code><br><code>browser_screen_scale_factor: 1</code><code>mobile</code> 预设将应用以下值：<code>browser_screen_width: 390</code><br><code>browser_screen_height: 844</code><br><code>browser_screen_scale_factor: 3</code><code>tablet</code> 预设将应用以下值：<code>browser_screen_width: 1024</code><br><code>browser_screen_height: 1366</code><br><code>browser_screen_scale_factor: 2</code><br><strong>注意：</strong>要使用此参数，请将 <code>enable_javascript</code> 或 <code>enable_browser_rendering</code> 设为 <code>true</code>"
          },
          "browser_screen_width": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>浏览器屏幕宽度</em><br>可选字段<br>你可以设置自定义的浏览器屏幕宽度，以便针对特定设备进行审计；<br>如果使用此字段，则无需指定 <code>browser_preset</code>，它将被忽略；<br><strong>注意：</strong>要使用此参数，请将 <code>enable_javascript</code> 或 <code>enable_browser_rendering</code> 设为 <code>true</code>最小值（像素）：<code>240</code><br>最大值（像素）：<code>9999</code>",
            "format": "int64"
          },
          "browser_screen_height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>浏览器屏幕高度</em><br>可选字段<br>你可以设置自定义的浏览器屏幕高度，以便针对特定设备进行审计；<br>如果使用此字段，则无需指定 <code>browser_preset</code>，它将被忽略；<br><strong>注意：</strong>要使用此参数，请将 <code>enable_javascript</code> 或 <code>enable_browser_rendering</code> 设为 <code>true</code>最小值（像素）：<code>240</code><br>最大值（像素）：<code>9999</code>"
          },
          "browser_screen_scale_factor": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>浏览器屏幕缩放比例</em><br>可选字段<br>你可以设置自定义的浏览器屏幕分辨率比例，以便针对特定设备进行审计；<br>如果使用此字段，则无需指定 <code>browser_preset</code>，它将被忽略；<br><strong>注意：</strong>要使用此参数，请将 <code>enable_javascript</code> 或 <code>enable_browser_rendering</code> 设为 <code>true</code>最小值：<code>0.5</code><br>最大值：<code>3</code>"
          },
          "respect_sitemap": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>爬取时遵循站点地图</em><br>可选字段<br>如果希望在爬取时按主站点地图中指示的页面顺序进行，请设为 <code>true</code>；<br>默认值：<code>false</code><br><strong>注意：</strong>如果设为 <code>true</code>，API 响应中的 <code>click_depth</code> 值将等于 <code>0</code>；<br>请求中的 <code>max_crawl_depth</code> 字段将被忽略，你可以使用 <code>max_crawl_pages</code> 参数指定要爬取的页面数量"
          },
          "custom_sitemap": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>自定义站点地图 URL</em><br>可选字段<br>替代站点地图所在页面的 URL<br><strong>注意：</strong>如果要使用此参数，<code>respect_sitemap</code> 应为 <code>true</code>"
          },
          "crawl_sitemap_only": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>仅爬取站点地图中指示的页面</em><br>可选字段<br>如果只想爬取站点地图中指示的页面，请设为 <code>true</code><br>如果将此参数设为 <code>true</code> 且未指定 <code>custom_sitemap</code>，将爬取默认站点地图<br>默认值：<code>false</code><br><strong>注意：</strong>如果要使用此参数，<code>respect_sitemap</code> 应为 <code>true</code>"
          },
          "load_resources": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>加载资源</em><br>可选字段<br>如果希望加载图片、样式表、脚本和损坏的资源，请设为 <code>true</code><br>默认值：<code>false</code><br><strong>注意：</strong>使用此参数将产生额外费用；有关使用此参数的任务费用，请参阅<a href=\"https://dataforseo.com/help-center/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">帮助文章</a>；费用可在<a href=\"https://dataforseo.com/pricing/on-page/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">价格页面</a>计算"
          },
          "enable_www_redirect_check": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>检查域名是否实现了 www 重定向</em><br>可选字段<br>如果希望检查所请求的域名是否实现了 www 到非 www 或非 www 到 www 的重定向，请设为 <code>true</code>；<br>默认值：<code>false</code>"
          },
          "enable_javascript": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>在页面中加载 JavaScript</em><br>可选字段<br>如果希望加载页面上可用的脚本，请设为 <code>true</code><br>默认值：<code>false</code><br><strong>注意：</strong>使用此参数将产生额外费用；有关使用此参数的任务费用，请参阅<a href=\"https://dataforseo.com/help-center/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">帮助文章</a>；费用可在<a href=\"https://dataforseo.com/pricing/on-page/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">价格页面</a>计算"
          },
          "enable_xhr": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>在页面中启用 XMLHttpRequest</em><br>可选字段<br>如果希望我们的爬虫使用 XMLHttpRequest 对象从 Web 服务器请求数据，请设为 <code>true</code><br>默认值：<code>false</code>；如果使用此字段，<code>enable_javascript</code> 必须设为 <code>true</code>；"
          },
          "enable_browser_rendering": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>模拟浏览器渲染以测量 Core Web Vitals</em><br>可选字段<br>使用此参数可以在加载网页时模拟浏览器；<br><code>enable_browser_rendering</code> 会加载页面上的样式、图片、字体、动画、视频和其他资源；<br>默认值：<code>false</code><br>设为 <code>true</code> 以在响应中获取 Core Web Vitals（FID、CLS、LCP）指标；<br><strong>如果使用此字段，<code>enable_javascript</code> 和 <code>load_resources</code> 参数必须设为 <code>true</code></strong><br><strong>注意：</strong>使用此参数将产生额外费用；有关使用此参数的任务费用，请参阅<a href=\"https://dataforseo.com/help-center/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">帮助文章</a>；费用可在<a href=\"https://dataforseo.com/pricing/on-page/onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">价格页面</a>计算"
          },
          "disable_cookie_popup": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>禁用 Cookie 弹窗</em><br>可选字段<br>如果希望禁用向用户请求 Cookie 同意的弹窗，请设为 <code>true</code>；<br>默认值：<br><code>false</code>"
          },
          "custom_js": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>自定义 JavaScript</em><br>可选字段<br><strong>注意</strong>：此处输入的脚本执行时间最长应为 700 ms。例如，可以使用以下 JS 片段检查网站是否以 <code>scr</code> 属性包含 Google Tag Manager：<br><code>let meta = { haveGoogleAnalytics: false, haveTagManager: false };rnfor (var i = 0; i &lt; document.scripts.length; i++) {rn let src = document.scripts[i].getAttribute(\"src\");rn if (src != undefined) {rn if (src.indexOf(\"analytics.js\") &gt;= 0)rn      meta.haveGoogleAnalytics = true;rntif (src.indexOf(\"gtm.js\") &gt;= 0)rn      meta.haveTagManager = true;rn  }rn}rnmeta;</code>返回值取决于你在此字段中指定的内容。例如，如果指定以下脚本：<br>`meta = {}; meta.url = document.URL; meta.test = 'test'; meta;`<br>你将收到以下数据作为响应：<br>`\"custom_js_response\": {<br>\"url\": \"https://dataforseo.com/\",<br>\"test\": \"test\"<br>}`<br><strong>注意：</strong>输入的脚本长度不得超过 2000 个字符"
          },
          "validate_micromarkup": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>启用微数据验证</em><br>可选字段<br>如果希望使用<a href=\"/v3/on_page/microdata/\" target=\"_blank\" rel=\"noopener noreferrer\">OnPage API Microdata 端点</a>，请设为 <code>true</code><br>默认值：<code>false</code>"
          },
          "allow_subdomains": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>包含子域名上的页面</em><br>可选字段<br>如果要抓取目标网站的所有子域名，请设为 <code>true</code><br>默认值：<code>false</code>"
          },
          "allowed_subdomains": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>要抓取的子域名</em><br>可选字段<br>指定你想抓取的子域名<br>示例：<code>[\"blog.site.com\", \"my.site.com\", \"shop.site.com\"]</code><br><strong>注意：</strong>要使用此参数，<code>allow_subdomains</code> 参数应设为 <code>false</code>；<br>否则，<code>allowed_subdomains</code> 字段的内容将被忽略，结果将针对所有子域名返回"
          },
          "disallowed_subdomains": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>不爬取的子域名</em><br>可选字段<br>指定不希望爬取的子域名<br>示例：<code>[\"status.site.com\", \"docs.site.com\"]</code><br><strong>注意：</strong>要使用此参数，<code>allow_subdomains</code> 参数应设为 <code>true</code>"
          },
          "check_spell": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>检查拼写</em><br>可选字段<br>设为 <code>true</code> 可使用 <a href=\"http://hunspell.github.io/\" target=\"_blank\" rel=\"noopener noreferrer\">Hunspell</a> 库检查网站上的拼写<br>默认值：<code>false</code>"
          },
          "check_spell_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>拼写检查的语言</em><br>可选字段<br>支持的语言：'hy', 'eu', 'bg', 'ca', 'hr', 'cs', 'da', 'nl', 'en', 'eo', 'et', 'fo', 'fa', 'fr', 'fy', 'gl', 'ka', 'de', 'el', 'he', 'hu', 'is', 'ia', 'ga', 'it', 'rw', 'la', 'lv', 'lt', 'mk', 'mn', 'ne', 'nb', 'nn', 'pl', 'pt', 'ro', 'gd', 'sr', 'sk', 'sl', 'es', 'sv', 'tr', 'tk', 'uk', 'vi'<br><strong>注意：</strong>如果未指定语言，将根据页面内容自动设置"
          },
          "check_spell_exceptions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>从拼写检查中排除的单词</em><br>可选字段<br>指定你想从拼写检查中排除的单词<br>单词最大长度：100 个字符<br>单词数量上限：1000<br>示例： <code>\"SERP\", \"minifiers\", \"JavaScript\"</code>"
          },
          "calculate_keyword_density": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>计算目标域名的关键词密度</em><br>可选字段<br>如果要计算网站页面的关键词密度，请设为 <code>true</code><br>默认值：<code>false</code><br><strong>注意：</strong>使用此参数将产生额外费用；请在我们的<a href=\"https://dataforseo.com/help-center/cost-of-onpage-api-parameters\" target=\"_blank\" rel=\"noopener noreferrer\">帮助文章</a>中了解带有此参数的任务费用<br>抓取完成后，你可以通过<a href=\"/v3/on_page/keyword_density?bash\" target=\"_blank\" rel=\"noopener noreferrer\">Keyword Density 端点</a>获取关键词密度值"
          },
          "checks_threshold": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            },
            "description": "<em>自定义检查阈值</em><br>可选字段<br>你可以为 OnPage API 响应的 <code>checks</code> 对象中的参数指定自定义阈值；<br><strong>注意：</strong>只能修改整数阈值；<br>例如，<code>high_loading_time</code> 和 <code>large_page_size</code> 参数默认分别设为 3 秒和 1 兆字节；<br>如果要将这些阈值改为 1 秒和 1000 KB，请使用以下代码片段：<br>`\"checks_threshold\": {<br>\"high_loading_time\": 1,<br>\"large_page_size\": 1000<br>}`<br>可自定义的参数及默认值：<br>`\"title_too_short\", default value: 30, type: \"int\"<br>\"title_too_long\", default value: 65, type: \"int\"<br>\"small_page_size\", default value: 1024, type: \"int\"<br>\"large_page_size\", default value: 1048576 (1024 * 1024), type: \"int\"<br>\"low_character_count\", default value: 1024, type: \"int\"<br>\"high_character_count\", default value: 256000 (250 * 1024), type: \"int\"<br>\"low_content_rate\", default value: 0.1, type: \"float\"<br>\"high_content_rate\", default value: 0.9, type: \"float\"<br>\"high_loading_time\", default value: 3000, type: \"int\"<br>\"high_waiting_time\", default value: 1500, type: \"int\"<br>\"low_readability_rate\", default value: 15.0, type: \"float\"<br>\"irrelevant_description\", default value: 0.2, type: \"float\"<br>\"irrelevant_title\", default value: 0.3, type: \"float\"<br>\"irrelevant_meta_keywords\", default value: 0.6, type: \"float\"`"
          },
          "disable_sitewide_checks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>阻止某些全站检查运行</em><br>可选字段<br>指定以下 <code>checks</code>，以阻止它们在 <code>target</code> 网站上运行：<br><code>\"test_page_not_found\"</code><br><code>\"test_canonicalization\"</code><br><code>\"test_https_redirect\"</code><br><code>\"test_directory_browsing\"</code>示例：<br><code>\"disable_sitewide_checks\": [\"test_directory_browsing\", \"test_page_not_found\"]</code>在<a href=\"https://dataforseo.com/help-center/how-to-disable-sitewide-checks-in-onpage-api\" target=\"_blank\" rel=\"noopener noreferrer\">帮助中心</a>了解更多"
          },
          "disable_page_checks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "<em>阻止某些页面检查运行</em><br>可选字段<br>指定某些 <code>checks</code>，以阻止其运行并影响 <code>onpage_score</code>。示例：<br><code>\"disable_page_checks\": [\"is_5xx_code\", \"is_4xx_code\"]</code>"
          },
          "switch_pool": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>切换代理池</em><br>可选字段<br>如果为 <code>true</code>，将使用其他代理池获取所请求的数据；<br>如果同时设置大量任务，导致偶尔出现 <code>rate-limit</code> 和/或 <code>site_unreachable</code> 错误，可以使用此参数"
          },
          "return_despite_timeout": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>即使超时也返回页面数据</em><br>可选字段<br>如果为 <code>true</code>，将提供在 120 秒内加载失败并返回超时错误的页面的数据；<br>默认值：<code>false</code>"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>用户自定义任务标识符</em><br>可选字段<br><em>字符数上限为 255</em><br>可使用此参数标识任务，并将其与结果对应<br>可在响应的 <code>data</code> 对象中找到指定的 <code>tag</code> 值"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>任务完成通知 URL</em><br>可选字段<br>任务完成后，我们会向你指定的 URL 发送 GET 请求进行通知<br>可将 ‘$id’ 字符串用作 <code>$id</code> 变量，将 ‘$tag’ 用作经 URL 编码的 <code>$tag</code> 变量。发送请求前我们会设置必要的值。<br>示例：<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>注意：</strong><code>pingback_url</code> 中的特殊字符会进行 URL 编码；<br>例如，<code>#</code> 字符会被编码为 <code>%23</code><p>详情请参阅我们的 <a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">帮助中心</a>"
          }
        },
        "example": [
          {
            "target": "dataforseo.com",
            "max_crawl_pages": 10,
            "load_resources": true,
            "enable_javascript": true,
            "custom_js": "meta = {}; meta.url = document.URL; meta;",
            "tag": "some_string_123",
            "pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "target": "dataforseo.com",
      "max_crawl_pages": 10,
      "load_resources": true,
      "enable_javascript": true,
      "custom_js": "meta = {}; meta.url = document.URL; meta;",
      "tag": "some_string_123",
      "pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag"
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_OnPageTaskPostResponseInfo"
    }
  ]
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API 的当前版本"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "通用状态码\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "通用信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "总执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中的任务数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 数组中返回错误的任务数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务标识符\n我们系统中 UUID 格式的唯一任务标识符"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "任务的状态码\n由 DataForSEO 生成，范围如下：10000-60000\n完整响应码列表见此处"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "任务的信息性消息\n完整的一般信息性消息列表见此处"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "执行时间，秒"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "任务总费用，美元",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 数组中的元素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL 路径"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "包含你在 POST 请求中指定的相同参数"
    }
  }
}
```

### Response36Afe1097B20_OnPageTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_OnPageTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_OnPageTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>任务数组</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_OnPageTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_OnPageTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>结果数组</em><br>在本例中，该值将为 <code>null</code>"
        }
      }
    }
  ]
}
```
