> ## 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.

# Status da descoberta

> Este endpoint retorna o status de um job de descoberta.

## GET /discovery/{discoveryId}

Este endpoint retorna o status atual e os detalhes de um job de descoberta de URLs.

### Parâmetros de caminho

<ParamField path="discoveryId" type="string" required>
  ID do job de descoberta.
</ParamField>

### Resposta

<ResponseField name="id" type="string">
  Identificador único do job.
</ResponseField>

<ResponseField name="url" type="string">
  URL alvo da descoberta.
</ResponseField>

<ResponseField name="type" type="string">
  Método usado: `full`, `sitemap` ou `crawl`.
</ResponseField>

<ResponseField name="status" type="string">
  Status atual: `pending`, `processing`, `completed` ou `failed`.
</ResponseField>

<ResponseField name="urlsFound" type="number">
  Quantidade de URLs já descobertas.
</ResponseField>

<ResponseField name="createdAt" type="string">
  Data de criação do job em ISO 8601.
</ResponseField>

<ResponseField name="completedAt" type="string">
  Data de conclusão em ISO 8601, quando aplicável.
</ResponseField>

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

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

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

<ResponseExample>
  ```json Processando theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com",
    "type": "full",
    "status": "processing",
    "urlsFound": 23,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": null
  }
  ```

  ```json Concluído theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com",
    "type": "sitemap",
    "status": "completed",
    "urlsFound": 47,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": "2026-01-20T10:05:00.000Z"
  }
  ```
</ResponseExample>
