> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/ai-studio/ai-map.md).

# AI-Map

## 概述

AI-Map 帮助您发现网站内的相关页面。它使用 AI 根据您的特定条件系统地探索域名，并返回符合您条件的 URL 列表。

您可以预览该工具 [**此处**](https://aistudio.oxylabs.io/apps/search) 并通过我们的 Python/JavaScript SDK、MCP 服务器或我们的第三方集成之一将其集成到您的工作流中。

## 如何使用

1. **输入一个 URL 或域名** 作为您要映射的对象。
2. **描述您的目标页面** 使用自然语言提示词。
3. **配置映射参数** 例如来源数量限制、映射深度和地理位置。
4. **运行 AI 映射任务** 以从该域名收集您的目标页面 URL。

### 安装

开始之前，请确保您拥有 API 密钥的访问权限（或 [获取免费试用](https://aistudio.oxylabs.io/register) 含 1000 点数）并且已安装 `Python 3.10` 或更高版本。您可以安装 `oxylabs-ai-studio` 软件包，使用 pip：

```
pip install oxylabs-ai-studio
```

### 代码示例（Python）

以下示例展示了如何使用 AI-Map 搜索代理执行一个简单的网站映射任务。

```python
from oxylabs_ai_studio.apps.ai_map import AiMap
import json

# Initialize authorization
ai_map = AiMap(api_key="<API_KEY>")

# Define the payload for request
payload = {
    "url": "https://career.oxylabs.io",
    "user_prompt": "job ad pages",
    "return_sources_limit": 10,
    "geo_location": None,
    "render_javascript": False,
}

# Start the mapping
result = ai_map.map(**payload)

# Output the results in JSON
print("URLs:")
print(json.dumps(result.data, indent=2))
```

在我们的 PyPI 存储库中了解有关 AI-Crawler 和 Oxylabs AI Studio Python SDK 的更多信息 [PyPI 存储库](https://pypi.org/project/oxylabs-ai-studio/)。您也可以查看我们的 [AI Studio JavaScript SDK](broken://pages/ead1e34cbd3e1c23f6a780d4c91acafd6250f709) 指南，适用于 JS 用户。

### 请求参数

| 参数                                                         | 说明                    | 默认值     |
| ---------------------------------------------------------- | --------------------- | ------- |
| <mark style="background-color:green;">`url`</mark>         | 用于映射的起始 URL 或域名       | –       |
| <mark style="background-color:green;">`user_prompt`</mark> | 用于查找页面的自然语言提示词        | –       |
| `output_format`                                            | 返回的最大来源数量             | `25`    |
| `render_javascript`                                        | 为动态内容启用 JavaScript 渲染 | `False` |
| `geo_location`                                             | ISO2 格式的代理位置          | –       |

&#x20;    – 必填参数

### 输出示例

```json
URLs:
[
  "https://career.oxylabs.io/job/247ac098/head-of-marketing",
  "https://career.oxylabs.io/job/2d9ae321/product-owner",
  "https://career.oxylabs.io/job/496841ed/php-developer-golang",
  "https://career.oxylabs.io/job/736ef009/talent-sourcer",
  "https://career.oxylabs.io/job/7a4a4415/senior-python-engineer-webshare-product",
  "https://career.oxylabs.io/job/88f7340c/devops-squad-lead",
  "https://career.oxylabs.io/job/9946db47/junior-project-manager",
  "https://career.oxylabs.io/job/b2e1397e/account-executive-north-america",
  "https://career.oxylabs.io/job/d72db15b/senior-event-marketing-manager",
  "https://career.oxylabs.io/job/e1efecf0/seo-and-growth-marketing-lead"
]
```

## 实际用例

* **映射产品类别** 在电子商务网站上。
* **列出所有博客文章** 来自公司的域名。
* **记录 API** 端点。
* **发现所有文档页面** 或帮助文章。
* **查找招聘信息** 在招聘门户网站上。
* **以及更多……**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/products/cn/ai-studio/ai-map.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
