{
  "components": {
    "schemas": {
      "BaseScrapeOptions": {
        "properties": {
          "actions": {
            "description": "在抓取页面内容前需要执行的 actions",
            "items": {
              "oneOf": [
                {
                  "properties": {
                    "milliseconds": {
                      "description": "等待的时间（毫秒）",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "selector": {
                      "description": "用于定位该元素的查询选择器",
                      "example": "#my-element",
                      "type": "string"
                    },
                    "type": {
                      "description": "等待指定的毫秒数",
                      "enum": [
                        "wait"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "title": "Wait",
                  "type": "object"
                },
                {
                  "properties": {
                    "fullPage": {
                      "default": false,
                      "description": "是否截取整页截图，或仅截取当前视口。",
                      "type": "boolean"
                    },
                    "quality": {
                      "description": "截图质量，取值范围为 1 至 100，100 为最高质量。",
                      "type": "integer"
                    },
                    "type": {
                      "description": "进行截图。链接将位于响应的 `actions.screenshots` 数组中。",
                      "enum": [
                        "screenshot"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "title": "Screenshot",
                  "type": "object"
                },
                {
                  "properties": {
                    "all": {
                      "default": false,
                      "description": "点击所有匹配该选择器的元素，而不仅仅是第一个元素。如果没有元素匹配该选择器，也不会抛出错误。",
                      "type": "boolean"
                    },
                    "selector": {
                      "description": "用于查找元素的查询选择器",
                      "example": "#load-more-button",
                      "type": "string"
                    },
                    "type": {
                      "description": "单击元素",
                      "enum": [
                        "click"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "selector"
                  ],
                  "title": "Click",
                  "type": "object"
                },
                {
                  "properties": {
                    "text": {
                      "description": "输入文本",
                      "example": "Hello, world!",
                      "type": "string"
                    },
                    "type": {
                      "description": "在输入框、文本区域或 contenteditable 元素中写入文本。注意：在写入之前，必须先通过一次“click”操作使该元素获得焦点。文本将以逐字符输入的方式进行，以模拟键盘敲击。",
                      "enum": [
                        "write"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ],
                  "title": "Write text",
                  "type": "object"
                },
                {
                  "description": "请在页面上按下任意键。按键代码请参考：https://asawicki.info/nosense/doc/devices/keyboard/key_codes.html。",
                  "properties": {
                    "key": {
                      "description": "按键",
                      "example": "Enter",
                      "type": "string"
                    },
                    "type": {
                      "description": "在页面上按下任意键",
                      "enum": [
                        "press"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "key"
                  ],
                  "title": "Press a key",
                  "type": "object"
                },
                {
                  "properties": {
                    "direction": {
                      "default": "down",
                      "description": "滚动方向",
                      "enum": [
                        "up",
                        "down"
                      ],
                      "type": "string"
                    },
                    "selector": {
                      "description": "需要滚动的元素的查询选择器",
                      "example": "#my-element",
                      "type": "string"
                    },
                    "type": {
                      "description": "滚动页面或特定元素",
                      "enum": [
                        "scroll"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "title": "Scroll",
                  "type": "object"
                },
                {
                  "properties": {
                    "type": {
                      "description": "抓取当前页面内容，同时返回其 URL 和 HTML。",
                      "enum": [
                        "scrape"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "title": "Scrape",
                  "type": "object"
                },
                {
                  "properties": {
                    "script": {
                      "description": "待执行的 JavaScript 代码",
                      "example": "document.querySelector('.button').click();",
                      "type": "string"
                    },
                    "type": {
                      "description": "在页面上执行 JavaScript 代码",
                      "enum": [
                        "executeJavascript"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "script"
                  ],
                  "title": "Execute JavaScript",
                  "type": "object"
                },
                {
                  "properties": {
                    "format": {
                      "default": "Letter",
                      "description": "生成的 PDF 的页面大小",
                      "enum": [
                        "A0",
                        "A1",
                        "A2",
                        "A3",
                        "A4",
                        "A5",
                        "A6",
                        "Letter",
                        "Legal",
                        "Tabloid",
                        "Ledger"
                      ],
                      "type": "string"
                    },
                    "landscape": {
                      "default": false,
                      "description": "是否以横向页面方向生成 PDF 文件",
                      "type": "boolean"
                    },
                    "scale": {
                      "default": 1,
                      "description": "生成的 PDF 的缩放比例",
                      "type": "number"
                    },
                    "type": {
                      "description": "生成当前页面的 PDF。该 PDF 将在响应中的 `actions.pdfs` 数组里返回。",
                      "enum": [
                        "pdf"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "title": "Generate PDF",
                  "type": "object"
                }
              ]
            },
            "type": "array"
          },
          "blockAds": {
            "default": true,
            "description": "启用广告拦截和 Cookie 弹窗屏蔽。",
            "type": "boolean"
          },
          "excludeTags": {
            "description": "在输出结果中要排除的标签。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "headers": {
            "description": "随请求发送的请求头。可用于携带 cookies、user-agent 等信息。",
            "type": "object"
          },
          "includeTags": {
            "description": "需要包含在输出中的标签。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "jsonOptions": {
            "description": "JSON 配置对象",
            "properties": {
              "checkPromptInjection": {
                "default": false,
                "description": "启用后，会在执行提取前扫描已抓取的页面内容，以检测 prompt 注入尝试。如果检测到注入，请求将失败，并返回 403 状态码和错误代码 SCRAPE_PROMPT_INJECTION_DETECTED。执行此检查会增加 4 个额度。默认值为 false。",
                "type": "boolean"
              },
              "prompt": {
                "description": "在无 schema 情况下用于抽取的数据提示词（可选）",
                "type": "string"
              },
              "schema": {
                "description": "用于提取的数据模式（可选）。必须符合 [JSON Schema](https://json-schema.org/) 规范。",
                "type": "object"
              },
              "systemPrompt": {
                "description": "用于抽取的系统提示（可选）",
                "type": "string"
              }
            },
            "type": "object"
          },
          "location": {
            "description": "请求的地理位置设置。指定后，如果可用，将使用合适的代理服务器，并模拟相应的语言和时区设置。如果未指定，默认值为“US”。",
            "properties": {
              "country": {
                "default": "US",
                "description": "ISO 3166-1 alpha-2 两位字母国家代码（例如：“US”、“AU”、“DE”、“JP”）",
                "pattern": "^[A-Z]{2}$",
                "type": "string"
              },
              "languages": {
                "description": "按照优先级为本次请求指定首选语言和区域设置。默认使用所指定地区的语言。详见：https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language",
                "items": {
                  "example": "en-US",
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "maxAge": {
            "default": 0,
            "description": "如果页面的缓存版本的生成时间距现在小于此值（毫秒），则返回该缓存版本；如果缓存版本早于此值，则会重新抓取页面。如果你不需要极其实时的数据，启用此选项可以将抓取速度最多提升 5 倍。默认值为 0，表示禁用缓存。",
            "type": "integer"
          },
          "mobile": {
            "default": false,
            "description": "若要模拟移动端抓取，请将其设置为 true。适用于测试响应式页面并获取移动端截图。",
            "type": "boolean"
          },
          "onlyMainContent": {
            "default": true,
            "description": "仅返回页面的主体内容，不包括页眉、导航、页脚等。",
            "type": "boolean"
          },
          "parsePDF": {
            "default": true,
            "description": "控制在爬取过程中如何处理 PDF 文件。为 true 时，会提取 PDF 内容并转换为 Markdown 格式，按页数计费（每页 1 个积分）。为 false 时，会返回以 base64 编码的 PDF 文件，统一按 1 个积分计费。",
            "type": "boolean"
          },
          "proxy": {
            "description": "指定要使用的代理类型。\n\n - **basic**：适用于抓取没有或仅有基础防爬机制网站的代理。速度快，通常足够好用。\n - **enhanced**：适用于抓取具有高级防爬机制网站的增强型代理。速度较慢，但在某些网站上更可靠。额度成本与 basic 相同。\n - **auto**：当使用 basic 代理抓取失败时，Firecrawl 会自动使用 enhanced 代理重试。增强型代理不额外消耗额度，因此无论哪种情况，都只收取常规费用。\n\n如果未指定代理类型，Firecrawl 将默认使用 basic。",
            "enum": [
              "basic",
              "enhanced",
              "auto"
            ],
            "type": "string"
          },
          "removeBase64Images": {
            "default": true,
            "description": "从输出中移除所有 Base64 图片，以避免内容过于冗长。图片的替代文本（alt 文本）会保留在输出中，但其 URL 会被占位符替换。",
            "type": "boolean"
          },
          "skipTlsVerification": {
            "default": false,
            "description": "在发送请求时跳过 TLS 证书校验",
            "type": "boolean"
          },
          "storeInCache": {
            "default": true,
            "description": "如果为 true，该页面将被存储到 Firecrawl 的索引和缓存中。若你的抓取活动可能涉及数据保护方面的问题，将其设置为 false 会更合适。使用某些与敏感抓取相关的参数（如 actions、headers）时，该参数会被强制设为 false。",
            "type": "boolean"
          },
          "threatProtection": {
            "$ref": "#/components/schemas/ThreatProtectionOverride"
          },
          "timeout": {
            "default": 30000,
            "description": "请求超时时间（毫秒）",
            "type": "integer"
          },
          "waitFor": {
            "default": 0,
            "description": "设置在获取内容前的延迟时间（毫秒），以便页面有足够时间加载完成。",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BatchScrapeResponseObj": {
        "properties": {
          "id": {
            "type": "string"
          },
          "invalidURLs": {
            "description": "如果 ignoreInvalidURLs 为 true，则该字段是一个数组，包含请求中指定的无效 URL。若没有无效 URL，则该数组为空。若 ignoreInvalidURLs 为 false，则该字段为 undefined。",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "success": {
            "type": "boolean"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "BatchScrapeStatusResponseObj": {
        "properties": {
          "completed": {
            "description": "已成功抓取的页面数量。",
            "type": "integer"
          },
          "creditsUsed": {
            "description": "该批量抓取所使用的积分数量。",
            "type": "integer"
          },
          "data": {
            "description": "批量爬取的数据。",
            "items": {
              "properties": {
                "html": {
                  "description": "`includeHtml` 为 true 时，页面内容的 HTML 版本",
                  "nullable": true,
                  "type": "string"
                },
                "links": {
                  "description": "如果 `includeLinks` 为 true，则包含页面上的链接列表",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "markdown": {
                  "type": "string"
                },
                "metadata": {
                  "properties": {
                    "<any other metadata> ": {
                      "description": "从 HTML 中提取的其他元数据，可以是字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "description": {
                      "description": "从页面中提取的描述，可以是一个字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "error": {
                      "description": "页面错误信息",
                      "nullable": true,
                      "type": "string"
                    },
                    "keywords": {
                      "description": "从页面提取的关键词，可以为字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "language": {
                      "description": "从页面提取的语言，可以是一个字符串或字符串数组",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "numPages": {
                      "description": "对于 PDF 输入，表示已解析的页数（受 parser 的 maxPages 选项上限限制）。",
                      "type": "integer"
                    },
                    "ogLocaleAlternate": {
                      "description": "此页面的其他语言版本",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "sourceURL": {
                      "format": "uri",
                      "type": "string"
                    },
                    "statusCode": {
                      "description": "页面状态码",
                      "type": "integer"
                    },
                    "title": {
                      "description": "从页面中提取的标题，可以是字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "totalPages": {
                      "description": "对于 PDF 输入，表示文档在未受 maxPages 限制前的实际总页数。若无法确定则省略；如果 totalPages 大于 numPages，则表示结果已被截断。",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "rawHtml": {
                  "description": "如果 `includeRawHtml` 为 true，则为页面的原始 HTML 内容",
                  "nullable": true,
                  "type": "string"
                },
                "screenshot": {
                  "description": "当 `includeScreenshot` 为 true 时的页面截图",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "expiresAt": {
            "description": "批量抓取任务的到期时间。",
            "format": "date-time",
            "type": "string"
          },
          "next": {
            "description": "用于获取后续 10MB 数据的 URL。如果批量抓取任务尚未完成，或响应数据大于 10MB，则会返回此 URL。",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "批量抓取的当前状态。状态可能为 `scraping`、`completed` 或 `failed`。",
            "type": "string"
          },
          "total": {
            "description": "尝试抓取的页面总数。",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CrawlErrorsResponseObj": {
        "properties": {
          "errors": {
            "description": "抓取任务错误及其详情",
            "items": {
              "properties": {
                "error": {
                  "description": "错误信息",
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "timestamp": {
                  "description": "失败时间的 ISO 时间戳",
                  "nullable": true,
                  "type": "string"
                },
                "url": {
                  "description": "已爬取 URL",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "robotsBlocked": {
            "description": "在抓取时尝试访问但被 robots.txt 阻止的 URL 列表",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "CrawlResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CrawlStatusResponseObj": {
        "properties": {
          "completed": {
            "description": "成功爬取的页面数量。",
            "type": "integer"
          },
          "creditsUsed": {
            "description": "本次爬取所消耗的额度数。",
            "type": "integer"
          },
          "data": {
            "description": "爬取数据。",
            "items": {
              "properties": {
                "html": {
                  "description": "当 `includeHtml` 为 true 时，页面内容的 HTML 格式版本",
                  "nullable": true,
                  "type": "string"
                },
                "links": {
                  "description": "当 `includeLinks` 为 true 时，页面上的链接列表",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "markdown": {
                  "type": "string"
                },
                "metadata": {
                  "properties": {
                    "<any other metadata> ": {
                      "description": "从 HTML 中提取的其他元数据，可以为字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "description": {
                      "description": "从页面提取的描述信息，可以是字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "error": {
                      "description": "页面错误信息",
                      "nullable": true,
                      "type": "string"
                    },
                    "keywords": {
                      "description": "从页面提取的关键词，可以是字符串或字符串数组。",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "language": {
                      "description": "从页面中提取的语言，可以是字符串或字符串数组",
                      "nullable": true,
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "numPages": {
                      "description": "对于 PDF 输入，表示已解析的页数（受 parser 的 maxPages 选项上限限制）。",
                      "type": "integer"
                    },
                    "ogLocaleAlternate": {
                      "description": "页面的其他语言版本",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "sourceURL": {
                      "format": "uri",
                      "type": "string"
                    },
                    "statusCode": {
                      "description": "页面状态码",
                      "type": "integer"
                    },
                    "title": {
                      "description": "从页面中提取的标题，可以是一个字符串或字符串数组",
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      ]
                    },
                    "totalPages": {
                      "description": "对于 PDF 输入，表示文档在未受 maxPages 限制前的实际总页数。若无法确定则省略；如果 totalPages 大于 numPages，则表示结果已被截断。",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "rawHtml": {
                  "description": "如果 `includeRawHtml` 为 true，则返回页面的原始 HTML 内容",
                  "nullable": true,
                  "type": "string"
                },
                "screenshot": {
                  "description": "`includeScreenshot` 为 true 时的页面截图",
                  "nullable": true,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "expiresAt": {
            "description": "抓取任务到期的日期和时间。",
            "format": "date-time",
            "type": "string"
          },
          "next": {
            "description": "用于获取后续 10MB 数据的 URL。如果抓取尚未完成或响应大小超过 10MB，则会返回该字段。",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "当前爬取任务的状态。可能为 `scraping`、`completed` 或 `failed` 之一。",
            "type": "string"
          },
          "total": {
            "description": "尝试爬取的页面总数。",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ExtractResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "invalidURLs": {
            "description": "如果 ignoreInvalidURLs 为 true，则此字段是一个数组，包含请求中指定的无效 URL。若没有无效 URL，则该数组为空。若 ignoreInvalidURLs 为 false，则此字段为 undefined。",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExtractStatusResponse": {
        "properties": {
          "data": {
            "type": "object"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "提取作业的当前状态",
            "enum": [
              "completed",
              "processing",
              "failed",
              "cancelled"
            ],
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "MapResponse": {
        "properties": {
          "links": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ScrapeOptions": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseScrapeOptions"
          },
          {
            "properties": {
              "changeTrackingOptions": {
                "description": "变更追踪的选项（Beta）。仅当在 formats 中包含 'changeTracking' 时才适用。使用变更追踪时，还必须同时指定 'markdown' 格式。",
                "properties": {
                  "modes": {
                    "description": "用于更改跟踪的模式。`git-diff` 提供详细的差异对比，而 `json` 用于比较提取的 JSON 数据。",
                    "items": {
                      "enum": [
                        "git-diff",
                        "json"
                      ],
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "prompt": {
                    "description": "在使用 JSON 模式进行变更跟踪时要使用的提示。如果未提供，则会使用默认提示。",
                    "type": "string"
                  },
                  "schema": {
                    "description": "在使用 `json` 模式时用于 JSON 提取的 schema。用于定义要提取和对比的数据结构。必须符合 [JSON Schema](https://json-schema.org/) 规范。",
                    "type": "object"
                  },
                  "tag": {
                    "default": null,
                    "description": "用于变更跟踪的标签。标签可以将变更跟踪历史划分为不同的「分支」，使用特定标签的变更跟踪只会与同一标签下的抓取结果进行比较。如果未提供，则会使用默认标签（null）。",
                    "nullable": true,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "formats": {
                "default": [
                  "markdown"
                ],
                "description": "输出中要包含的formats。",
                "items": {
                  "enum": [
                    "markdown",
                    "html",
                    "rawHtml",
                    "links",
                    "screenshot",
                    "screenshot@fullPage",
                    "json",
                    "changeTracking"
                  ],
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "ScrapeResponse": {
        "properties": {
          "data": {
            "properties": {
              "actions": {
                "description": "`actions` 参数中各项 actions 的执行结果。仅当请求中提供了 `actions` 参数时才会包含此字段。",
                "nullable": true,
                "properties": {
                  "javascriptReturns": {
                    "description": "JavaScript 的返回值，其顺序与提供的 executeJavascript actions 相同。",
                    "items": {
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "value": {}
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "pdfs": {
                    "description": "生成的 PDF，其顺序与提供的 pdf actions 保持一致。",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "scrapes": {
                    "description": "按照提供的 scrape actions 的顺序抓取内容。",
                    "items": {
                      "properties": {
                        "html": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "screenshots": {
                    "description": "截图 URL，与提供的截图 actions 顺序一致。截图将在 24 小时后过期，之后将无法再下载。",
                    "items": {
                      "format": "url",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "changeTracking": {
                "description": "当 `formats` 中包含 `changeTracking` 时，会返回变更追踪信息。仅在请求 `changeTracking` 格式时才会提供。",
                "nullable": true,
                "properties": {
                  "changeStatus": {
                    "description": "两个页面版本比较的结果。`new` 表示该页面之前不存在，`same` 表示内容没有变化，`changed` 表示内容发生了变化，`removed` 表示该页面已被移除。",
                    "enum": [
                      "new",
                      "same",
                      "changed",
                      "removed"
                    ],
                    "type": "string"
                  },
                  "diff": {
                    "description": "在使用“git-diff”模式时生成的 Git 风格差异（diff）。仅在模式设置为“git-diff”时才会出现。",
                    "nullable": true,
                    "type": "string"
                  },
                  "json": {
                    "description": "在使用 `json` 模式时的 JSON 比较结果。仅在模式设置为 `json` 时可用。它会根据 `schema` 中定义的类型，返回 `previous` 和 `current` 抓取结果中所有键及其对应值的列表。示例参见[这里](/features/change-tracking)",
                    "nullable": true,
                    "type": "object"
                  },
                  "previousScrapeAt": {
                    "description": "用于与当前页面进行比较的上一次抓取时间戳。如果不存在之前的抓取记录，则为 null。",
                    "format": "date-time",
                    "nullable": true,
                    "type": "string"
                  },
                  "visibility": {
                    "description": "当前页面/URL 的可见性。\"visible\" 表示该 URL 是通过自然路径（链接或 sitemap）发现的，\"hidden\" 表示该 URL 是通过之前抓取结果的记忆发现的。",
                    "enum": [
                      "visible",
                      "hidden"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "html": {
                "description": "当 `formats` 中包含 `html` 时，返回页面的已清理 HTML：会移除 `<script>`、`<style>`、`<noscript>`、`<meta>` 和 `<head>` 标签；将相对 URL 转换为绝对 URL；并将响应式图片的 `srcset` 解析为尺寸最大的版本。同时会应用 `onlyMainContent`、`includeTags` 和 `excludeTags` 过滤器。",
                "nullable": true,
                "type": "string"
              },
              "links": {
                "description": "当 `formats` 中包含 `links` 时，页面上的链接列表",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "llm_extraction": {
                "description": "在使用 LLM 提取时显示。根据定义的 schema 从页面中提取的数据。",
                "nullable": true,
                "type": "object"
              },
              "markdown": {
                "type": "string"
              },
              "metadata": {
                "properties": {
                  "<any other metadata> ": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "error": {
                    "description": "页面错误信息",
                    "nullable": true,
                    "type": "string"
                  },
                  "keywords": {
                    "description": "从页面中提取的关键词，可以为字符串或字符串数组",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    ]
                  },
                  "language": {
                    "nullable": true,
                    "type": "string"
                  },
                  "numPages": {
                    "description": "对于 PDF 输入，表示已解析的页数（受 parser 的 maxPages 选项上限限制）。",
                    "type": "integer"
                  },
                  "ogLocaleAlternate": {
                    "description": "此页面的其他语言版本",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "sourceURL": {
                    "format": "uri",
                    "type": "string"
                  },
                  "statusCode": {
                    "description": "页面状态码",
                    "type": "integer"
                  },
                  "title": {
                    "type": "string"
                  },
                  "totalPages": {
                    "description": "对于 PDF 输入，表示文档在未受 maxPages 限制前的实际总页数。若无法确定则省略；如果 totalPages 大于 numPages，则表示结果已被截断。",
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "rawHtml": {
                "description": "当 `formats` 中包含 `rawHtml` 时，将返回从页面获取的原始、未处理的 HTML，不会执行任何清洗或过滤操作。",
                "nullable": true,
                "type": "string"
              },
              "screenshot": {
                "description": "如果在 `formats` 中包含 `screenshot`，将返回该页面的截图。截图将在 24 小时后失效，之后将无法再下载。",
                "nullable": true,
                "type": "string"
              },
              "warning": {
                "description": "在使用 LLM Extraction 时显示。警告信息会提示你提取过程中的任何问题。",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ThreatProtectionOverride": {
        "description": "此请求的 [威胁防护](https://docs.firecrawl.dev/features/threat-protection) 单次请求覆盖配置。你提供的字段只会替换本次请求中组织策略里的对应字段；未提供的字段将保留组织级别的值。你的团队必须已启用威胁防护（企业版功能），否则该请求将被 403 拒绝。如果你的组织已禁用单次请求覆盖，任何包含此对象的请求都会被 403 拒绝。如果你的团队强制启用了威胁防护，则不能将 `mode` 设为 `off`。",
        "properties": {
          "blacklist": {
            "description": "始终封禁的域名，可为普通域名（`example.com`）或通配 glob（`*.example.com`）。不包含协议、路径或端口。",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "type": "array"
          },
          "blockedTlds": {
            "description": "要直接封禁的顶级域名，使用不带前导点的小写形式（例如 `zip`）。",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "type": "array"
          },
          "failurePolicy": {
            "description": "当无法访问分类器时的处理方式：`closed` 会封禁该请求，`open` 则会允许该请求。",
            "enum": [
              "open",
              "closed"
            ],
            "type": "string"
          },
          "mode": {
            "description": "此请求的 URL 扫描模式。`normal` 会根据 Google Web Risk 检查 URL（每扫描一个 URL 额外消耗 2 点额度）。",
            "enum": [
              "off",
              "normal"
            ],
            "type": "string"
          },
          "riskScoreThreshold": {
            "description": "标准化风险分数阈值（0–100）：当分类器判定结果达到或超过该值时，URL 会被封禁。值越低，限制越严格。",
            "example": 75,
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "whitelist": {
            "description": "始终允许的域名，可为普通域名或通配 glob。其优先级高于其他所有规则。",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "type": "array"
          }
        },
        "title": "Threat Protection Override",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "support@firecrawl.dev",
      "name": "Firecrawl Support",
      "url": "https://firecrawl.dev/support"
    },
    "description": "用于与 Firecrawl 服务交互，以进行网页抓取和爬取任务的 API。",
    "title": "Firecrawl API",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/batch/scrape": {
      "post": {
        "operationId": "scrapeAndExtractFromUrls",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "properties": {
                      "ignoreInvalidURLs": {
                        "default": false,
                        "description": "如果在 urls 数组中指定了无效 URL，这些 URL 会被忽略。它们不会导致整个请求失败，而是会基于剩余的有效 URL 创建一个批量抓取任务，并在响应的 invalidURLs 字段中返回这些无效 URL。",
                        "type": "boolean"
                      },
                      "maxConcurrency": {
                        "description": "最大并发抓取数量。此参数用于为本次批量抓取设置并发上限。若未指定，则本次批量抓取将遵循你的团队并发限制。",
                        "type": "integer"
                      },
                      "urls": {
                        "items": {
                          "description": "要爬取的 URL",
                          "format": "uri",
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "webhook": {
                        "description": "Webhook 规范对象。",
                        "properties": {
                          "events": {
                            "description": "要发送到 webhook URL 的事件类型（默认：全部）",
                            "items": {
                              "enum": [
                                "completed",
                                "page",
                                "failed",
                                "started"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "headers": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "发送到 webhook URL 的请求头。",
                            "type": "object"
                          },
                          "metadata": {
                            "additionalProperties": true,
                            "description": "将包含在此次抓取的所有 webhook 负载中的自定义元数据",
                            "type": "object"
                          },
                          "url": {
                            "description": "用于接收 webhook 的 URL。该 webhook 会在批量抓取开始时触发（batch_scrape.started）、每个页面被抓取时触发（batch_scrape.page），以及在批量抓取完成时触发（batch_scrape.completed 或 batch_scrape.failed）。其响应与 `/scrape` 端点相同。",
                            "type": "string"
                          }
                        },
                        "required": [
                          "url"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "urls"
                    ],
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/ScrapeOptions"
                  },
                  {
                    "properties": {
                      "zeroDataRetention": {
                        "default": false,
                        "description": "若为 true，则此次批量抓取任务将不保留任何数据。要启用此功能，请联系 help@firecrawl.dev",
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchScrapeResponseObj"
                }
              }
            },
            "description": "成功响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求过于频繁"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "抓取多个 URL，并可选用 LLM 提取信息",
        "tags": [
          "Scraping"
        ]
      }
    },
    "/batch/scrape/{id}": {
      "delete": {
        "operationId": "cancelBatchScrape",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "enum": [
                        "cancelled"
                      ],
                      "example": "cancelled",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "取消成功"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Batch scrape job not found.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到批量抓取任务"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "取消批量抓取作业",
        "tags": [
          "Scraping"
        ]
      },
      "get": {
        "operationId": "getBatchScrapeStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchScrapeStatusResponseObj"
                }
              }
            },
            "description": "成功响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求次数过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取批量抓取作业的状态",
        "tags": [
          "Scraping"
        ]
      },
      "parameters": [
        {
          "description": "批量抓取作业的 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/batch/scrape/{id}/errors": {
      "get": {
        "operationId": "getBatchScrapeErrors",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlErrorsResponseObj"
                }
              }
            },
            "description": "成功响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求过于频繁"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取批量抓取作业的错误信息",
        "tags": [
          "Scraping"
        ]
      },
      "parameters": [
        {
          "description": "批量抓取任务 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/crawl": {
      "post": {
        "operationId": "crawlUrls",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "allowBackwardLinks": {
                    "default": false,
                    "deprecated": true,
                    "description": "⚠️ 已弃用：请改用“crawlEntireDomain”。此选项允许爬虫跟踪指向同级或父级 URL 的内部链接，而不仅限于子路径。",
                    "type": "boolean"
                  },
                  "allowExternalLinks": {
                    "default": false,
                    "description": "允许爬虫跟随链接访问外部网站。",
                    "type": "boolean"
                  },
                  "allowSubdomains": {
                    "default": false,
                    "description": "允许爬虫跟随指向主域子域的链接。",
                    "type": "boolean"
                  },
                  "crawlEntireDomain": {
                    "default": false,
                    "description": "允许爬虫跟踪到同级或父级的站内链接，而不仅仅是子路径。\n\nfalse：只爬取更深层（子级）URL。\n→ 例如 /features/feature-1 → /features/feature-1/tips ✅\n→ 不会跟踪 /pricing 或 / ❌\n\ntrue：爬取任意站内链接，包括同级和父级。\n→ 例如 /features/feature-1 → /pricing、/ 等 ✅\n\n当需要在嵌套路径之外更广泛地覆盖站内链接时，将其设置为 true。",
                    "type": "boolean"
                  },
                  "delay": {
                    "description": "每次抓取之间的延迟时间（秒）。有助于遵守网站的速率限制。",
                    "type": "number"
                  },
                  "excludePaths": {
                    "description": "将匹配的 URL 排除在抓取之外的 URL 路径名正则表达式模式。例如，如果你为基础 URL firecrawl.dev 设置 `\"excludePaths\": [\"blog/.*\"]`，则所有匹配该模式的结果都会被排除，例如：https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap。模式使用 Rust 正则表达式（RE2 风格）语法：不支持环视和反向引用，无法编译的模式会被拒绝并返回 400。每个字段最多接受 1000 个模式，每个模式最多 2000 个字符；includePaths 和 excludePaths 合计最多可包含 1000 个模式和 100,000 个字符。对于关键词式过滤，请为每个术语发送一个简短模式，而不是将多个术语合并为一个很长的交替模式。",
                    "items": {
                      "maxLength": 2000,
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "ignoreQueryParameters": {
                    "default": false,
                    "description": "请勿对同一路径使用不同（或无）查询参数进行重复抓取",
                    "type": "boolean"
                  },
                  "ignoreSitemap": {
                    "default": false,
                    "description": "爬取时忽略网站的 sitemap",
                    "type": "boolean"
                  },
                  "includePaths": {
                    "description": "用于在抓取中包含匹配 URL 的 URL 路径名正则表达式模式。只有与指定模式匹配的路径才会包含在响应中。例如，如果你为基础 URL firecrawl.dev 设置 `\"includePaths\": [\"blog/.*\"]`，则只有与该模式匹配的结果会被包含，例如：https://www.firecrawl.dev/blog/firecrawl-launch-week-1-recap。模式使用 Rust 正则表达式（RE2 风格）语法：不支持环视和反向引用，无法编译的模式会被拒绝并返回 400。每个字段最多接受 1000 个模式，每个模式最多 2000 个字符；includePaths 和 excludePaths 合计最多可包含 1000 个模式和 100,000 个字符。对于关键词式过滤，请为每个术语发送一个简短模式，而不是将多个术语合并为一个很长的交替模式。",
                    "items": {
                      "maxLength": 2000,
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "limit": {
                    "default": 10000,
                    "description": "要抓取的最大页面数。默认上限为 10000。",
                    "type": "integer"
                  },
                  "maxConcurrency": {
                    "description": "最大抓取并发数。该参数用于为本次抓取任务设置并发上限；如果未指定，将沿用你团队的并发限制。",
                    "type": "integer"
                  },
                  "maxDepth": {
                    "default": 10,
                    "description": "从输入 URL 的基础路径开始可爬取的最大绝对深度。简单来说，就是被抓取 URL 的路径名中允许包含的斜杠数量上限。",
                    "type": "integer"
                  },
                  "maxDiscoveryDepth": {
                    "description": "基于发现顺序的最大抓取深度。根站点及站点地图中的页面的发现深度为 0。比如，如果你将其设置为 1，并启用 ignoreSitemap，你只会抓取输入的 URL，以及该页面上所有被链接到的 URL。",
                    "type": "integer"
                  },
                  "regexOnFullURL": {
                    "default": false,
                    "description": "如果为 true，includePaths 和 excludePaths 的正则表达式模式将匹配整个 URL（包括查询参数），而不仅仅是 URL 的路径名。当你需要基于查询字符串来过滤 URL 时，这会非常有用。",
                    "type": "boolean"
                  },
                  "scrapeOptions": {
                    "$ref": "#/components/schemas/ScrapeOptions"
                  },
                  "url": {
                    "description": "开始爬取时使用的起始 URL",
                    "format": "uri",
                    "type": "string"
                  },
                  "webhook": {
                    "description": "Webhook 规范对象。",
                    "properties": {
                      "events": {
                        "description": "要发送到 webhook URL 的事件类型。（默认：全部）",
                        "items": {
                          "enum": [
                            "completed",
                            "page",
                            "failed",
                            "started"
                          ],
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "headers": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "要发送到 webhook URL 的 HTTP 请求头。",
                        "type": "object"
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "将包含在本次抓取所有 webhook 负载中的自定义元数据",
                        "type": "object"
                      },
                      "url": {
                        "description": "用于接收 webhook 的 URL。该 webhook 会在以下事件中触发：当爬取开始时（crawl.started）、每完成一页爬取时（crawl.page），以及爬取结束时（crawl.completed 或 crawl.failed）。响应将与 `/scrape` 端点相同。",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url"
                    ],
                    "type": "object"
                  },
                  "zeroDataRetention": {
                    "default": false,
                    "description": "如果为 true，则本次爬取将不会保留任何数据。若要启用此功能，请联系 help@firecrawl.dev",
                    "type": "boolean"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlResponse"
                }
              }
            },
            "description": "成功的响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求次数过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "根据选项爬取多个 URL",
        "tags": [
          "Crawling"
        ]
      }
    },
    "/crawl/active": {
      "get": {
        "operationId": "getActiveCrawls",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "crawls": {
                      "items": {
                        "properties": {
                          "id": {
                            "description": "爬取任务的唯一标识符",
                            "format": "uuid",
                            "type": "string"
                          },
                          "options": {
                            "description": "本次抓取使用的爬虫配置",
                            "properties": {
                              "scrapeOptions": {
                                "$ref": "#/components/schemas/ScrapeOptions"
                              }
                            },
                            "type": "object"
                          },
                          "teamId": {
                            "description": "拥有此抓取任务的团队 ID",
                            "type": "string"
                          },
                          "url": {
                            "description": "爬取的起始 URL",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "teamId",
                          "url",
                          "status",
                          "options"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "成功的响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付款"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取当前已认证团队的所有活跃抓取任务",
        "tags": [
          "Crawling"
        ]
      }
    },
    "/crawl/{id}": {
      "delete": {
        "operationId": "cancelCrawl",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "enum": [
                        "cancelled"
                      ],
                      "example": "cancelled",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "已成功取消"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Crawl job not found.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到抓取任务"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "取消抓取作业",
        "tags": [
          "Crawling"
        ]
      },
      "get": {
        "operationId": "getCrawlStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlStatusResponseObj"
                }
              }
            },
            "description": "成功的响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取爬取任务状态",
        "tags": [
          "Crawling"
        ]
      },
      "parameters": [
        {
          "description": "抓取任务 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/crawl/{id}/errors": {
      "get": {
        "operationId": "getCrawlErrors",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrawlErrorsResponseObj"
                }
              }
            },
            "description": "成功的响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付款"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求次数过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取爬取任务的错误信息",
        "tags": [
          "Crawling"
        ]
      },
      "parameters": [
        {
          "description": "抓取任务的 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/deep-research": {
      "post": {
        "operationId": "startDeepResearch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "analysisPrompt": {
                    "description": "用于最终分析的提示词。可用于按特定方式格式化最终分析的 Markdown。",
                    "type": "string"
                  },
                  "formats": {
                    "default": [
                      "markdown"
                    ],
                    "items": {
                      "enum": [
                        "markdown",
                        "json"
                      ],
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "jsonOptions": {
                    "description": "JSON 输出选项",
                    "properties": {
                      "prompt": {
                        "description": "用于生成 JSON 输出的提示",
                        "type": "string"
                      },
                      "schema": {
                        "description": "用于 JSON 输出的模式定义。必须符合 [JSON Schema](https://json-schema.org/) 规范。",
                        "type": "object"
                      },
                      "systemPrompt": {
                        "description": "用于生成 JSON 输出的系统提示",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "maxDepth": {
                    "default": 7,
                    "description": "研究迭代最大深度",
                    "maximum": 12,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "maxUrls": {
                    "default": 20,
                    "description": "要分析的 URL 数量上限",
                    "maximum": 1000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "query": {
                    "description": "需要研究的查询",
                    "type": "string"
                  },
                  "systemPrompt": {
                    "description": "供研究代理使用的系统提示词，可用于将其引导到特定的研究方向。",
                    "type": "string"
                  },
                  "timeLimit": {
                    "default": 300,
                    "description": "时间限制（秒）",
                    "maximum": 600,
                    "minimum": 30,
                    "type": "integer"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "description": "研究任务的 ID",
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "研究任务已成功开始"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Invalid parameters provided",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求参数无效"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "针对查询启动深度研究操作",
        "tags": [
          "Research"
        ]
      }
    },
    "/deep-research/{id}": {
      "get": {
        "operationId": "getDeepResearchStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "activities": {
                          "items": {
                            "properties": {
                              "depth": {
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "timestamp": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "currentDepth": {
                          "type": "integer"
                        },
                        "error": {
                          "type": "string"
                        },
                        "expiresAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "finalAnalysis": {
                          "type": "string"
                        },
                        "json": {
                          "description": "仅在使用 JSON 格式时显示",
                          "nullable": true,
                          "type": "object"
                        },
                        "maxDepth": {
                          "type": "integer"
                        },
                        "sources": {
                          "items": {
                            "properties": {
                              "description": {
                                "description": "从页面中提取的描述，可以是字符串或字符串数组",
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                ]
                              },
                              "favicon": {
                                "type": "string"
                              },
                              "title": {
                                "description": "从页面提取的标题，类型可以是字符串或字符串数组",
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                ]
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "status": {
                          "enum": [
                            "processing",
                            "completed",
                            "failed"
                          ],
                          "type": "string"
                        },
                        "totalUrls": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功的响应"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Research job not found",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到研究作业"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取深度研究任务的状态和结果",
        "tags": [
          "Research"
        ]
      },
      "parameters": [
        {
          "description": "研究任务 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/extract": {
      "post": {
        "operationId": "extractData",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "enableWebSearch": {
                    "default": false,
                    "description": "当设为 true 时，提取过程会通过网页搜索获取更多数据",
                    "type": "boolean"
                  },
                  "ignoreInvalidURLs": {
                    "default": false,
                    "description": "如果在 urls 数组中指定了无效 URL，这些 URL 会被忽略。请求不会因此整体失败，而是会使用剩余的有效 URL 执行提取操作，并在响应的 invalidURLs 字段中返回这些无效 URL。",
                    "type": "boolean"
                  },
                  "ignoreSitemap": {
                    "default": false,
                    "description": "为 true 时，网站扫描过程中会忽略 sitemap.xml 文件",
                    "type": "boolean"
                  },
                  "includeSubdomains": {
                    "default": true,
                    "description": "设为 true 时，还会扫描所提供 URL 的子域名",
                    "type": "boolean"
                  },
                  "prompt": {
                    "description": "用于引导抽取过程的提示词",
                    "type": "string"
                  },
                  "schema": {
                    "description": "用于定义提取后数据结构的模式。必须符合 [JSON Schema](https://json-schema.org/) 规范。",
                    "type": "object"
                  },
                  "scrapeOptions": {
                    "$ref": "#/components/schemas/ScrapeOptions"
                  },
                  "showSources": {
                    "default": false,
                    "description": "如果为 true，用于提取数据的来源将会包含在响应的 `sources` 字段中",
                    "type": "boolean"
                  },
                  "threatProtection": {
                    "$ref": "#/components/schemas/ThreatProtectionOverride"
                  },
                  "urls": {
                    "items": {
                      "description": "用于提取数据的 URL。URL 应采用 glob 格式。",
                      "format": "uri",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "urls"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractResponse"
                }
              }
            },
            "description": "提取成功"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Invalid input data.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "无效请求"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "利用 LLM 从网页中提取结构化数据",
        "tags": [
          "Extraction"
        ]
      }
    },
    "/extract/{id}": {
      "get": {
        "operationId": "getExtractStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractStatusResponse"
                }
              }
            },
            "description": "成功响应"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取提取任务的状态",
        "tags": [
          "Extraction"
        ]
      },
      "parameters": [
        {
          "description": "提取任务的 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/llmstxt": {
      "post": {
        "operationId": "generateLLMsTxt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "maxUrls": {
                    "default": 2,
                    "description": "要分析的 URL 最大数量",
                    "type": "integer"
                  },
                  "showFullText": {
                    "default": false,
                    "description": "在响应中包含全文内容",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "用于生成 LLMs.txt 的源 URL",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "description": "LLMs.txt 生成作业的 ID",
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "LLMs.txt 生成任务已成功启动"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Invalid parameters provided",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "无效的请求参数"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "为网站生成 LLMs.txt 文件",
        "tags": [
          "LLMs.txt"
        ]
      }
    },
    "/llmstxt/{id}": {
      "get": {
        "operationId": "getLLMsTxtStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "llmsfulltxt": {
                          "description": "当 showFullText 为 true 时的完整文本内容",
                          "type": "string"
                        },
                        "llmstxt": {
                          "description": "生成的 LLMs.txt 文件内容",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "expiresAt": {
                      "description": "生成内容何时过期",
                      "format": "date-time",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功响应"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "LLMs.txt generation job not found",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到 LLMs.txt 生成作业"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取 LLMs.txt 生成作业的状态和结果",
        "tags": [
          "LLMs.txt"
        ]
      },
      "parameters": [
        {
          "description": "LLMs.txt 生成作业的 ID",
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "format": "uuid",
            "type": "string"
          }
        }
      ]
    },
    "/map": {
      "post": {
        "operationId": "mapUrls",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ignoreSitemap": {
                    "default": true,
                    "description": "抓取网站时忽略其 sitemap。",
                    "type": "boolean"
                  },
                  "includeSubdomains": {
                    "default": true,
                    "description": "包含该网站子域名",
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 5000,
                    "description": "要返回的最大链接数",
                    "maximum": 30000,
                    "type": "integer"
                  },
                  "location": {
                    "description": "请求的地理位置设置。指定后（如果可用），将使用相应的代理，并模拟对应的语言和时区设置。如果未指定，默认值为“US”。",
                    "properties": {
                      "country": {
                        "default": "US",
                        "description": "ISO 3166-1 alpha-2 国家代码（例如：US、AU、DE、JP）",
                        "pattern": "^[A-Z]{2}$",
                        "type": "string"
                      },
                      "languages": {
                        "description": "请求中按优先级排序的首选语言和区域设置。默认使用指定位置的语言。参见 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language",
                        "items": {
                          "example": "en-US",
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "search": {
                    "description": "用于映射的搜索查询。在 Alpha 阶段，搜索功能中的「智能」部分最多只会处理 500 条搜索结果。不过，如果 Map 找到更多结果，则不会对这些结果施加任何限制。",
                    "type": "string"
                  },
                  "sitemapOnly": {
                    "default": false,
                    "description": "仅返回网站站点地图中包含的链接",
                    "type": "boolean"
                  },
                  "threatProtection": {
                    "$ref": "#/components/schemas/ThreatProtectionOverride"
                  },
                  "timeout": {
                    "description": "超时时间（毫秒）。默认情况下没有超时限制。",
                    "type": "integer"
                  },
                  "url": {
                    "description": "开始爬取时使用的基础 URL",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapResponse"
                }
              }
            },
            "description": "成功响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付款"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求过于频繁"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "基于选项对多个 URL 进行映射",
        "tags": [
          "Mapping"
        ]
      }
    },
    "/scrape": {
      "post": {
        "operationId": "scrapeAndExtractFromUrl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "properties": {
                      "url": {
                        "description": "要爬取的 URL",
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url"
                    ],
                    "type": "object"
                  },
                  {
                    "$ref": "#/components/schemas/ScrapeOptions"
                  },
                  {
                    "properties": {
                      "zeroDataRetention": {
                        "default": false,
                        "description": "如果为 true，将对本次抓取启用零数据保留策略。要开启此功能，请联系 help@firecrawl.dev",
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScrapeResponse"
                }
              }
            },
            "description": "成功响应"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Payment required to access this resource.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "需要付费"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request rate limit exceeded. Please wait and try again later.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求次数过多"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "抓取单个 URL，并可选择使用 LLM 提取信息",
        "tags": [
          "Scraping"
        ]
      }
    },
    "/search": {
      "post": {
        "operationId": "searchAndScrape",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ignoreInvalidURLs": {
                    "default": false,
                    "description": "会从搜索结果中排除对其他 Firecrawl 端点无效的 URL。这样当你将搜索结果数据传递到其他 Firecrawl API 端点时，可以减少出错。",
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 5,
                    "description": "返回的最大结果数",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "location": {
                    "description": "搜索结果的 location 参数",
                    "type": "string"
                  },
                  "query": {
                    "description": "搜索查询",
                    "type": "string"
                  },
                  "scrapeOptions": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BaseScrapeOptions"
                      },
                      {
                        "properties": {
                          "formats": {
                            "default": [],
                            "items": {
                              "enum": [
                                "markdown",
                                "html",
                                "rawHtml",
                                "links",
                                "screenshot",
                                "screenshot@fullPage",
                                "json",
                                "extract"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      }
                    ],
                    "default": {},
                    "description": "搜索结果抓取选项"
                  },
                  "tbs": {
                    "description": "基于时间的搜索参数。支持预定义时间范围（`qdr:h`、`qdr:d`、`qdr:w`、`qdr:m`、`qdr:y`）以及自定义日期范围（`cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY`）。",
                    "type": "string"
                  },
                  "threatProtection": {
                    "$ref": "#/components/schemas/ThreatProtectionOverride"
                  },
                  "timeout": {
                    "default": 60000,
                    "description": "超时时间（毫秒）",
                    "type": "integer"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "description": {
                            "description": "搜索结果中的描述",
                            "type": "string"
                          },
                          "html": {
                            "description": "若在 formats 中指定，则返回 HTML 内容",
                            "nullable": true,
                            "type": "string"
                          },
                          "links": {
                            "description": "如果在 formats 中有请求，则返回发现的链接",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "markdown": {
                            "description": "在请求抓取时返回的 Markdown 内容",
                            "nullable": true,
                            "type": "string"
                          },
                          "metadata": {
                            "properties": {
                              "description": {
                                "description": "从页面提取的描述，可以是字符串或字符串数组",
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                ]
                              },
                              "error": {
                                "nullable": true,
                                "type": "string"
                              },
                              "numPages": {
                                "description": "对于 PDF 输入，表示已解析的页数（受 parser 的 maxPages 选项上限限制）。",
                                "type": "integer"
                              },
                              "sourceURL": {
                                "type": "string"
                              },
                              "statusCode": {
                                "type": "integer"
                              },
                              "title": {
                                "description": "从页面中提取的标题，可以是字符串或字符串数组。",
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  }
                                ]
                              },
                              "totalPages": {
                                "description": "对于 PDF 输入，表示文档在未受 maxPages 限制前的实际总页数。若无法确定则省略；如果 totalPages 大于 numPages，则表示结果已被截断。",
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "rawHtml": {
                            "description": "如果在 formats 中请求，则会返回原始 HTML 内容",
                            "nullable": true,
                            "type": "string"
                          },
                          "screenshot": {
                            "description": "如果在 formats 中请求了截图，将返回截图的 URL。截图在 24 小时后过期，之后将无法再下载。",
                            "nullable": true,
                            "type": "string"
                          },
                          "title": {
                            "description": "来自搜索结果的标题",
                            "type": "string"
                          },
                          "url": {
                            "description": "搜索结果的URL",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "id": {
                      "description": "搜索任务的 ID",
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "warning": {
                      "description": "出现问题时显示的警告信息",
                      "nullable": true,
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功响应"
          },
          "408": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Request timed out",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "请求超时"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "An unexpected error occurred on the server.",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "搜索并按需抓取搜索结果",
        "tags": [
          "Search"
        ]
      }
    },
    "/team/credit-usage": {
      "get": {
        "operationId": "getCreditUsage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "billing_period_end": {
                          "description": "当前计费周期的结束日期。",
                          "example": "2025-01-31T23:59:59Z",
                          "format": "date-time",
                          "nullable": true,
                          "type": "string"
                        },
                        "billing_period_start": {
                          "description": "当前计费周期的开始日期。",
                          "example": "2025-01-01T00:00:00Z",
                          "format": "date-time",
                          "nullable": true,
                          "type": "string"
                        },
                        "plan_credits": {
                          "description": "当前套餐内的基础积分数量。本数值不包括优惠券积分或通过按量付费添加的积分。",
                          "example": 500000,
                          "type": "number"
                        },
                        "remaining_credits": {
                          "description": "团队剩余额度",
                          "example": 1000,
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功的响应"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Could not find credit usage information",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到额度使用情况信息"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Internal server error while fetching credit usage",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取当前团队的剩余额度",
        "tags": [
          "Billing"
        ]
      }
    },
    "/team/credit-usage/historical": {
      "get": {
        "operationId": "getHistoricalCreditUsage",
        "parameters": [
          {
            "description": "按 API 密钥获取历史额度使用记录",
            "in": "query",
            "name": "byApiKey",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "periods": {
                      "items": {
                        "properties": {
                          "apiKey": {
                            "description": "计费周期中使用的 API 密钥名称。如果 byApiKey 为 false（默认值），则为 null。",
                            "nullable": true,
                            "type": "string"
                          },
                          "endDate": {
                            "description": "账单周期结束日期",
                            "example": "2025-01-31T23:59:59Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "startDate": {
                            "description": "计费周期开始日期",
                            "example": "2025-01-01T00:00:00Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "totalCredits": {
                            "description": "计费周期内已使用的总额度",
                            "example": 1000,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功响应"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Internal server error while fetching historical credit usage",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取已认证团队的历史额度使用记录",
        "tags": [
          "Billing"
        ]
      }
    },
    "/team/queue-status": {
      "get": {
        "operationId": "getQueueStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "activeJobsInQueue": {
                      "description": "当前正在运行的任务数",
                      "type": "number"
                    },
                    "jobsInQueue": {
                      "description": "当前队列中的任务数量",
                      "type": "number"
                    },
                    "maxConcurrency": {
                      "description": "根据你的套餐可同时运行的最大并发任务数",
                      "type": "number"
                    },
                    "mostRecentSuccess": {
                      "description": "最近一次成功作业的时间戳",
                      "format": "date-time",
                      "nullable": true,
                      "type": "string"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    },
                    "waitingJobsInQueue": {
                      "description": "当前排队中的任务数",
                      "type": "number"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功的响应"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "团队抓取队列指标",
        "tags": [
          "Miscellaneous"
        ]
      }
    },
    "/team/token-usage": {
      "get": {
        "operationId": "getTokenUsage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "billing_period_end": {
                          "description": "当前计费周期的结束日期。",
                          "example": "2025-01-31T23:59:59Z",
                          "format": "date-time",
                          "nullable": true,
                          "type": "string"
                        },
                        "billing_period_start": {
                          "description": "当前计费周期的开始日期。",
                          "example": "2025-01-01T00:00:00Z",
                          "format": "date-time",
                          "nullable": true,
                          "type": "string"
                        },
                        "plan_tokens": {
                          "description": "方案中包含的 Token 数量。不包括优惠券提供的 Token。",
                          "example": 500000,
                          "type": "number"
                        },
                        "remaining_tokens": {
                          "description": "团队剩余 Token 数量",
                          "example": 1000,
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功的响应"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Could not find token usage information",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "未找到 Token 使用情况"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Internal server error while fetching token usage",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取当前已认证团队的剩余 Token（仅限 Extract）",
        "tags": [
          "Billing"
        ]
      }
    },
    "/team/token-usage/historical": {
      "get": {
        "operationId": "getHistoricalTokenUsage",
        "parameters": [
          {
            "description": "按 API 密钥获取历史 Token 使用量",
            "in": "query",
            "name": "byApiKey",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "periods": {
                      "items": {
                        "properties": {
                          "apiKey": {
                            "description": "在该计费周期内使用的 API 密钥名称。若 byApiKey 为 false（默认），则为 null",
                            "nullable": true,
                            "type": "string"
                          },
                          "endDate": {
                            "description": "计费周期结束日期",
                            "example": "2025-01-31T23:59:59Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "startDate": {
                            "description": "计费周期开始日期",
                            "example": "2025-01-01T00:00:00Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "totalTokens": {
                            "description": "计费周期内消耗的 Token 总数",
                            "example": 1000,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "成功响应"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "example": "Internal server error while fetching historical token usage",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "服务器错误"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "获取已认证团队的历史 Token 用量（仅限 Extract）",
        "tags": [
          "Billing"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.firecrawl.dev/v1"
    }
  ]
}