> ## 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-Discovery starten

> Dieser Endpunkt startet einen URL-Discovery-Job für eine Website.

## POST /discovery

Dieser Endpunkt startet einen URL-Discovery-Job für eine Website. Er liefert eine `discoveryId`, mit der Sie den Fortschritt verfolgen und entdeckte URLs abrufen können.

### Anfragetext

<ParamField body="url" type="string" required>
  URL der zu durchsuchenden Website. Muss eine gültige URL mit http/https sein.
</ParamField>

<ParamField body="maxUrls" type="number" default="50">
  Maximale Anzahl zu entdeckender URLs. Bereich: 1–1000.
</ParamField>

<ParamField body="discoveryType" type="string" default="full">
  Methode für die Discovery:

  * `full`: Kombiniert Sitemap-Parsing und Crawling für umfassende Discovery
  * `sitemap`: Parst nur sitemap.xml-Dateien
  * `crawl`: Crawlt nur durch Folgen von Links
</ParamField>

### Antwort

<ResponseField name="id" type="string">
  Eindeutige Kennung des Discovery-Jobs.
</ResponseField>

<ResponseField name="url" type="string">
  URL, die durchsucht wird.
</ResponseField>

<ResponseField name="status" type="string">
  Jobstatus: `started`, `processing`, `completed` oder `failed`.
</ResponseField>

<ResponseField name="discoveryType" type="string">
  Verwendete Discovery-Methode.
</ResponseField>

<ResponseField name="maxUrls" type="number">
  Maximale Anzahl zu entdeckender URLs.
</ResponseField>

<ResponseField name="progress" type="string">
  Fortschritt in Prozent.
</ResponseField>

<ResponseField name="totalUrlsFound" type="number">
  Bisher entdeckte URLs.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO-8601-Zeitstempel der Job-Erstellung.
</ResponseField>

<ResponseField name="estimatedCompletion" type="string">
  Geschätzter Abschlusszeitpunkt.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/discovery \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
          "url": "https://www.example.com",
          "maxUrls": 100,
          "discoveryType": "full"
        }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.llmgenerator.com/api/v1/discovery', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://www.example.com',
      maxUrls: 100
    })
  });

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

<ResponseExample>
  ```json Success (201) theme={null}
  {
    "id": "disc_1706540000_abc123xyz",
    "url": "https://www.example.com",
    "status": "started",
    "discoveryType": "full",
    "maxUrls": 100,
    "progress": "0",
    "totalUrlsFound": 0,
    "createdAt": "2026-01-29T12:00:00.000Z",
    "estimatedCompletion": "2026-01-29T12:05:00.000Z"
  }
  ```
</ResponseExample>
