> ## 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 发现任务。

## GET /discovery

返回当前认证用户发起的所有 URL 发现任务。

### 查询参数

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

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

### 响应

<ResponseField name="jobs" type="array">
  发现任务对象数组。

  <Expandable title="job 字段">
    <ResponseField name="id" type="string">
      任务唯一标识。
    </ResponseField>

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

    <ResponseField name="type" type="string">
      发现方式：`full`、`sitemap` 或 `crawl`。
    </ResponseField>

    <ResponseField name="status" type="string">
      当前状态。
    </ResponseField>

    <ResponseField name="urlsFound" type="number">
      已发现 URL 数量。
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      创建时间（ISO 8601）。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  任务总数。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/discovery \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```bash cURL (Filtered) theme={null}
  curl -X GET "https://api.llmgenerator.com/api/v1/discovery?status=completed&limit=10" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "jobs": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "url": "https://example.com",
        "type": "full",
        "status": "completed",
        "urlsFound": 47,
        "createdAt": "2026-01-20T10:00:00.000Z"
      },
      {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "url": "https://another-example.com",
        "type": "sitemap",
        "status": "processing",
        "urlsFound": 12,
        "createdAt": "2026-01-21T11:00:00.000Z"
      }
    ],
    "total": 2
  }
  ```
</ResponseExample>
