# Map（映射） (/zh/api-reference/endpoint/map)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 2061 · updated: 2026-07-30 -->
Related: [Search（搜索）](/zh/api-reference/endpoint/search.md), [搜索反馈](/zh/api-reference/endpoint/search-feedback.md), [Scrape](/zh/api-reference/endpoint/scrape.md), [批量抓取](/zh/api-reference/endpoint/batch-scrape.md), [获取批量抓取状态](/zh/api-reference/endpoint/batch-scrape-get.md), [取消批量抓取](/zh/api-reference/endpoint/batch-scrape-delete.md)

> 您是需要 Firecrawl API 密钥的 AI 代理吗？请参见 [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) 了解自动化入门说明。

`POST /map`

基于选项对多个 URL 进行映射

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "example1": {
            "summary": "示例 1",
            "value": {
              "ignoreCache": false,
              "ignoreQueryParameters": true,
              "includeSubdomains": true,
              "limit": 5000,
              "location": {
                "country": "US",
                "languages": [
                  "en-US"
                ]
              },
              "search": "<string>",
              "sitemap": "include",
              "timeout": 60000,
              "url": "<string>"
            }
          }
        },
        "schema": {
          "properties": {
            "auditMetadata": {
              "additionalProperties": false,
              "description": "为组织启用 SIEM Logging 后，SIEM 日志事件中会包含用户归属信息。",
              "properties": {
                "username": {
                  "description": "与该请求关联的用户名。",
                  "maxLength": 1024,
                  "type": "string"
                }
              },
              "required": [
                "username"
              ],
              "type": "object"
            },
            "ignoreCache": {
              "default": false,
              "description": "跳过站点地图缓存以获取最新的 URL。站点地图数据最多会被缓存 7 天；如果你刚更新了站点地图，请使用该参数。",
              "type": "boolean"
            },
            "ignoreQueryParameters": {
              "default": true,
              "description": "不要返回包含查询参数的 URL",
              "type": "boolean"
            },
            "includeSubdomains": {
              "default": true,
              "description": "包含此网站的子域名",
              "type": "boolean"
            },
            "limit": {
              "default": 5000,
              "description": "返回的最大链接数量",
              "maximum": 100000,
              "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": "指定搜索查询，以按相关性对结果排序。示例：使用“blog”将返回在 URL 中包含单词“blog”的网址，并按相关性排序。",
              "type": "string"
            },
            "sitemap": {
              "default": "include",
              "description": "用于映射（mapping）时的 sitemap 模式。若设置为 `skip`，则不会使用 sitemap 来发现 URL。若设置为 `only`，则只会返回出现在 sitemap 中的 URL。默认值为 `include`，此时会同时使用 sitemap 和其他方式来发现 URL。",
              "enum": [
                "skip",
                "include",
                "only"
              ],
              "type": "string"
            },
            "threatProtection": {
              "description": "此请求的[威胁防护](https://docs.firecrawl.dev/features/threat-protection)按请求覆盖配置。你提供的字段仅会替换此次请求中你所在组织策略的对应字段；未提供的字段则保留组织级配置值。你的团队必须已启用威胁防护（企业版功能），否则该请求会因 403 被拒绝。如果你的组织已禁用请求级覆盖，任何包含此对象的请求都会因 403 被拒绝。如果你的团队强制启用了威胁防护，则不得将 `mode` 设为 `off`。",
              "properties": {
                "blacklist": {
                  "description": "始终封禁的域名，可使用普通域名（`example.com`）或通配符模式（`*.example.com`）。不包含协议、路径或端口。",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 1000,
                  "type": "array"
                },
                "blockedTlds": {
                  "description": "直接封禁的顶级域名，使用不带前导点的小写形式（例如 `zip`）。",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 1000,
                  "type": "array"
                },
                "failurePolicy": {
                  "description": "当无法访问 classifier 时的处理方式：`closed` 会封禁该请求，`open` 则允许该请求。",
                  "enum": [
                    "open",
                    "closed"
                  ],
                  "type": "string"
                },
                "mode": {
                  "description": "此次请求的 URL 扫描模式。`normal` 使用 Google Web Risk 检查 URL（每扫描 1 个 URL 额外消耗 2 个额度）。",
                  "enum": [
                    "off",
                    "normal"
                  ],
                  "type": "string"
                },
                "riskScoreThreshold": {
                  "description": "归一化风险评分（0–100）阈值。达到或超过该值时，分类器判定会封禁该 URL。值越低，限制越严格。",
                  "example": 75,
                  "maximum": 100,
                  "minimum": 0,
                  "type": "integer"
                },
                "whitelist": {
                  "description": "始终允许的域名，可使用普通域名或通配符模式。优先级高于其他所有规则。",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 1000,
                  "type": "array"
                }
              },
              "title": "Threat Protection Override",
              "type": "object"
            },
            "timeout": {
              "description": "以毫秒为单位的超时时间。默认情况下不设置超时。",
              "type": "integer"
            },
            "url": {
              "description": "用于开始爬取的起始 URL",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "url"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "links": {
                "items": {
                  "properties": {
                    "description": {
                      "description": "页面描述（如有）。",
                      "type": "string"
                    },
                    "title": {
                      "description": "页面标题（如有）。",
                      "type": "string"
                    },
                    "url": {
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "success": {
                "type": "boolean"
              }
            },
            "type": "object"
          }
        }
      },
      "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": "服务器错误"
    }
  }
}
```
