# 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` 或更高版本。你可以使用 pip 安装 `oxylabs-ai-studio` 包：

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

### 代码示例（Python）

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

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

# 初始化授权
ai_map = AiMap(api_key="<API_KEY>")

# 定义请求载荷
payload = {
    "url": "https://career.oxylabs.io",
    "user_prompt": "招聘广告页面",
    "return_sources_limit": 10,
    "geo_location": None,
    "render_javascript": False,
}

# 开始映射
result = ai_map.map(**payload)

# 以 JSON 输出结果
print("URLs:")
print(json.dumps(result.data, indent=2))
```

在我们的 [PyPI repository](https://pypi.org/project/oxylabs-ai-studio/)中了解更多关于 AI-Crawler 和 Oxylabs AI Studio Python SDK 的信息。你也可以查看我们的 [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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
