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

# 获取映射 URL

> 获取站点在生成过程中处理的 URL 列表。

## GET /sites/{siteId}/urls

返回指定站点在生成时处理的全部 URL 及其元数据。

### 路径参数

<ParamField path="siteId" type="string" required>
  站点 ID。
</ParamField>

### 查询参数

<ParamField query="page" type="number" default="1">
  分页页码。
</ParamField>

<ParamField query="limit" type="number" default="50">
  每页条数（最大 100）。
</ParamField>

<ParamField query="status" type="string">
  按状态筛选：`pending`、`scraped` 或 `failed`。
</ParamField>

### 响应

<ResponseField name="urls" type="array">
  映射 URL 对象数组。

  <Expandable title="url 字段">
    <ResponseField name="id" type="string">
      映射记录唯一标识。
    </ResponseField>

    <ResponseField name="url" type="string">
      URL。
    </ResponseField>

    <ResponseField name="title" type="string">
      页面标题。
    </ResponseField>

    <ResponseField name="description" type="string">
      页面描述（增强模式可能经 AI 优化）。
    </ResponseField>

    <ResponseField name="status" type="string">
      处理状态：`pending`、`scraped` 或 `failed`。
    </ResponseField>

    <ResponseField name="lastModified" type="string">
      最近修改日期（若站点地图提供）。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  映射 URL 总数。
</ResponseField>

<ResponseField name="page" type="number">
  当前页码。
</ResponseField>

<ResponseField name="totalPages" type="number">
  总页数。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.llmgenerator.com/api/v1/sites/550e8400-e29b-41d4-a716-446655440000/urls?limit=20" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/sites/550e8400-e29b-41d4-a716-446655440000/urls',
    {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    }
  );

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "urls": [
      {
        "id": "url_abc123",
        "siteId": "550e8400-e29b-41d4-a716-446655440000",
        "url": "https://example.com/",
        "title": "Example Domain - Home",
        "description": "Welcome to Example Domain, your comprehensive resource for...",
        "status": "scraped",
        "lastModified": "2026-01-15T00:00:00.000Z"
      },
      {
        "id": "url_def456",
        "siteId": "550e8400-e29b-41d4-a716-446655440000",
        "url": "https://example.com/about",
        "title": "About Us",
        "description": "Learn about our mission and team.",
        "status": "scraped",
        "lastModified": null
      }
    ],
    "total": 47,
    "page": 1,
    "totalPages": 3
  }
  ```

  ```json Not Found (404) theme={null}
  {
    "message": "Site not found"
  }
  ```
</ResponseExample>
