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

# 参数

> /map 的请求参数和响应字段：站点地图、路径过滤、域名范围、JavaScript 渲染和地理定位。

## POST 端点

`https://data.decodo.com/v1/map`

/map 为同步调用——URL 列表会在同一响应中返回。

## 输入参数

| 参数 | 类型 | 必填 | 描述 |
| :- | :- | :- | :- |
| `url` | string | ✅ | 用于发现 URL 的页面。必须是有效且可访问的 URL。 |
| `sitemap` | string | | URL 的收集来源。<br />`include`——同时收集站点地图和页面上的链接。默认值。<br />`only`——仅收集站点地图中列出的 URL。<br />`skip`——仅收集页面上的链接。<br />仅读取顶层站点地图，不会跟踪嵌套的站点地图。如果网站的站点地图是站点地图索引（sitemap index），`only` 会返回 `400` 错误，而 `include` 会回退为仅收集页面上的链接。 |
| `select_paths` | array | | 正则表达式模式。仅返回路径至少匹配其中一个模式的 URL。示例：`["^/blog"]`。 |
| `exclude_paths` | array | | 正则表达式模式。路径匹配任一模式的 URL 将被排除。示例：`["^/use-cases"]`。 |
| `domain_filter` | string | | 要包含的域名范围。<br />`domain`——仅主域名。默认值。<br />`subdomain`——主域名及其子域名（例如 `example.com` → `blog.example.com`）。<br />`all`——主域名、子域名以及外部网站。 |
| `JS_rendering` | boolean | | 设置为 `true` 可在收集链接前先进行 JavaScript 渲染。适用于通过 JavaScript 加载导航的网站。按高级代理 + JS 费率计费。默认值为 `false`。 |
| `geo` | string | | 发送请求所用的国家/地区。接受完整的国家/地区名称或 2 位字母国家/地区代码。 |
| `locale` | string | | 请求页面时使用的语言和地区，例如 `en-US`。 |

### 请求示例

<CodeGroup>
  ```shellscript cURL theme={null}
  # 将 'TOKEN VALUE' 替换为您的 API 密钥
  curl --request 'POST' \
    --url 'https://data.decodo.com/v1/map' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer TOKEN VALUE' \
    --header 'Content-Type: application/json' \
    --data '
  {
    "url": "https://example.com",
    "sitemap": "include",
    "select_paths": ["^/blog"],
    "exclude_paths": ["^/use-cases"],
    "domain_filter": "subdomain",
    "geo": "United States"
  }
  '
  ```
</CodeGroup>

## 输出

来自站点地图和页面的 URL 会合并为一个列表。系统会先对 URL 进行规范化，再去除重复项——因此 `example.com/page/`、`example.com/page#section` 和 `example.com/page` 会被视为同一个 URL。

单次调用最多可返回 14.7 万个 URL。响应包含一个 `results` 数组，其中有一个对象，包含以下键：

| 键 | 描述 |
| :- | :- |
| `content.links` | 应用过滤条件后找到的所有 URL。每一项都是包含 `url` 键的对象。 |
| `status_code` | 只要至少有一个请求（页面或站点地图）成功，即为 `200`。 |
| `url` | 您提交的 URL。 |
| `sitemap_status` | 实际使用了哪些 URL 来源。取值见下文。 |
| `map_id` | 本次请求的唯一 ID。如需帮助，请将其提供给支持团队。 |
| `created_at` | 收到请求的时间（UTC）。 |
| `updated_at` | 响应完成的时间（UTC）。 |

### `sitemap_status` 取值

| 值 | 含义 |
| :- | :- |
| `include` | URL 同时收集自站点地图和页面上的链接。 |
| `only` | URL 仅收集自站点地图。 |
| `skip` | URL 仅收集自页面上的链接。如果网站没有可用的站点地图，即使设置了 `sitemap: "include"`，也会返回 `skip`。 |

### 响应示例

<CodeGroup>
  ```json Response theme={null}
  {
    "results": [
      {
        "content": {
          "links": [
            { "url": "https://decodo.com/blog" },
            { "url": "https://decodo.com/blog/asos-hacked" },
            { "url": "https://decodo.com/blog/topics/news" },
            { "url": "https://decodo.com/blog/how-to-scrape-bing-search" }
          ]
        },
        "status_code": 200,
        "url": "https://decodo.com",
        "sitemap_status": "skip",
        "map_id": "ad357923-0203-4677-87bd-2b2b69e78b1f",
        "created_at": "2026-10-07 11:09:54",
        "updated_at": "2026-10-07 11:09:54"
      }
    ]
  }
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.