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

# 创建地图

> 此端点允许用户获取某个网站上的所有网址。对于复杂的网站，可能需要长达 120 秒。对于大型网站，结果使用基于游标的分页进行分页



## OpenAPI

````yaml zh/openapi/maps.json POST /v1/maps
openapi: 3.0.3
info:
  title: 地图 API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/maps:
    post:
      summary: 获取某个网站上的所有 URL
      description: 此端点允许用户获取某个网站上的所有 URL。对于复杂的网站，可能需要长达 120 秒。对于大型网站，结果使用基于游标的分页进行分页。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: 你想要获取链接的网站的 URL
                search_query:
                  type: string
                  description: 一个可选的搜索查询，用于按搜索相关性排序链接。
                top_n:
                  type: number
                  description: 一个可选的数字，用于限制搜索查询的前 n 个链接。
                include_subdomain:
                  type: boolean
                  description: 包含给定 URL 的子域。默认值为 `true`。
                include_urls:
                  type: array
                  items:
                    type: string
                  description: >-
                    使用 glob 语法包含的 URL 路径模式。例如：`/blog/**` 仅包含博客 URL。只有匹配这些模式的 URL
                    才会被返回。
                exclude_urls:
                  type: array
                  items:
                    type: string
                  description: 使用 glob 语法排除的 URL 路径模式。例如：`/careers/**`。排除的 URL 将优先于包含的 URL。
                cursor:
                  type: string
                  description: 可选：来自先前响应的分页游标。当提供时，将从上一个请求由于响应大小限制而停止的地方返回下一组 URL。
              required:
                - url
            examples:
              basic:
                value:
                  url: https://docs.olostep.com
              withFilters:
                value:
                  url: https://docs.olostep.com
                  include_urls:
                    - /api-reference/**
                  exclude_urls:
                    - /api-reference/deprecated/**
              withCursor:
                value:
                  cursor: abc123_xyz456
      responses:
        '200':
          description: 成功响应包含页面上找到的 URL。
          content:
            application/json:
              schema:
                type: object
                required:
                  - urls_count
                  - urls
                properties:
                  id:
                    type: string
                    description: 此地图的唯一标识符
                  urls_count:
                    type: integer
                    description: 当前响应中的 URL 数量
                  urls:
                    type: array
                    items:
                      type: string
                    description: 页面上找到的 URL 数组
                  cursor:
                    type: string
                    description: 分页游标用于获取由于10MB大小限制而受限的下一组URL。如果为null或不存在，则表示所有URL已被检索。
                  credits_consumed:
                    type: integer
                    nullable: true
                    description: 此请求消耗的积分数量。在执行完成后填充。积分是计费的真实来源。
                  cost_usd:
                    type: number
                    nullable: true
                    description: >-
                      此请求的估计成本（以美元计）。在执行完成后填充。根据消耗的积分和你的计划费率计算——99% 准确，但
                      credits_consumed 是权威值。
              examples:
                basicResponse:
                  value:
                    id: map_abc123
                    urls_count: 22
                    urls:
                      - https://docs.olostep.com/api-reference/batches/create
                      - https://docs.olostep.com/api-reference/batches/info
                      - https://docs.olostep.com/api-reference/batches/items
                cursorResponse:
                  value:
                    id: map_abc123
                    urls_count: 15
                    urls:
                      - https://docs.olostep.com/api-reference/crawls/create
                      - https://docs.olostep.com/api-reference/crawls/info
                      - https://docs.olostep.com/api-reference/crawls/pages
                    cursor: abc123_def789
                allRetrievedResponse:
                  value:
                    id: map_abc123
                    urls_count: 10
                    urls:
                      - https://docs.olostep.com/features/maps
                      - https://docs.olostep.com/get-started/authentication
                      - https://docs.olostep.com/get-started/welcome
                    cursor: null
        '400':
          description: 由于参数错误或缺失导致的错误请求。
        '401':
          description: 未授权访问，缺少或无效的API令牌。
        '500':
          description: 内部服务器错误。
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: Bearer认证头格式为Bearer <token>，其中<token>是你的认证令牌。

````