> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firecrawl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Map（映射）

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


## OpenAPI

````yaml zh/api-reference/v2-openapi.json POST /map
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: 用于与 Firecrawl 服务交互，执行网页抓取和爬取任务的 API。
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /map:
    post:
      tags:
        - Mapping
      summary: 基于选项对多个 URL 进行映射
      operationId: mapUrls
      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:
                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
                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: []
components:
  schemas:
    MapResponse:
      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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````