Skip to main content

POST /discovery

This endpoint starts a background job to discover URLs on a website. It returns a discoveryId that can be used to track the job’s progress.

Request Body

url
string
required
The URL of the website to discover.
maxUrls
number
The maximum number of URLs to discover. Defaults to 50.
discoveryType
string
The method to use for discovery. Can be full, sitemap, or crawl. Defaults to full.

Response

discoveryId
string
A unique identifier for the discovery job.
status
string
The initial status of the job (e.g., “queued”).
estimatedTime
string
An estimated time for completion.
cost
object
Information about the credit cost for the discovery.
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
      }'
{
  "discoveryId": "disc_xxxxxxxxxxxxx",
  "status": "queued",
  "estimatedTime": "approx. 2 minutes",
  "cost": {
    "credits": 10
  }
}