Skip to main content

POST /discovery

This endpoint starts a URL discovery job for a website. It returns a discoveryId that can be used to track the job’s progress and retrieve discovered URLs.

Request Body

url
string
required
The URL of the website to discover. Must be a valid URL with http/https protocol.
maxUrls
number
default:"50"
The maximum number of URLs to discover. Range: 1-1000.
discoveryType
string
default:"full"
The method to use for discovery:
  • full: Combines sitemap parsing and crawling for comprehensive discovery
  • sitemap: Only parses sitemap.xml files
  • crawl: Only crawls pages by following links

Response

id
string
A unique identifier for the discovery job.
url
string
The URL being discovered.
status
string
The status of the job: started, processing, completed, or failed.
discoveryType
string
The discovery method being used.
maxUrls
number
Maximum URLs to discover.
progress
string
Progress percentage.
totalUrlsFound
number
Number of URLs discovered so far.
createdAt
string
ISO 8601 timestamp of job creation.
estimatedCompletion
string
Estimated completion time.
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"
      }'
{
  "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"
}