Async mode lets you submit a scrape and get aDocumentation Index
Fetch the complete documentation index at: https://docs.scrapellm.com/llms.txt
Use this file to discover all available pages before exploring further.
job_id back immediately — no open connection required. The scrape runs in the background, is automatically retried up to 3 times on failure, and credits are restored if every attempt fails.
Use async when:
- You’re processing 10+ prompts and don’t need instant results
- Your prompts may take a long time and you don’t want to hold a connection open
- You’re running a background pipeline or cron job
- You need the result immediately in the same request cycle
- You’re processing a single prompt in response to a user action
How it works
Step 1 — Submit the job
POST https://api.scrapellm.com/scrapers/{scraper}/jobs
Replace {scraper} with any of: chatgpt, perplexity, grok, copilot, gemini, google_ai_mode, amazon_rufus.
Pass the same query parameters as the sync endpoint.
Step 2 — Poll for the result
GET https://api.scrapellm.com/jobs/{job_id} — no authentication required.
Poll every few seconds until status is "done" or "failed". Most scrapes complete in 5–30 seconds.
Job status response
| Field | Type | Description |
|---|---|---|
job_id | string | The unique job UUID |
status | string | pending · done · failed |
result | object | Full scrape response — present when status is "done" |
error | string | Error message — present when status is "failed" |
created_at | string | ISO 8601 UTC timestamp when the job was submitted |
completed_at | string | ISO 8601 UTC timestamp when the job finished. null while pending |
GET /jobs/{job_id} returns 404.
Job lifecycle
- Credits deducted at submit time. If all retry attempts fail, credits are automatically restored.
- Retries are automatic. Failed scrapes are retried up to 3 times before the job is marked
failed. - No cancellation. Once submitted, a job runs to completion. Avoid submitting jobs you don’t intend to use.
Batch processing
Submit all jobs first, then poll — don’t submit-and-wait serially.Cross-scraper batching
Submit the same prompt to multiple scrapers simultaneously to compare AI responses:Common questions
How long do jobs take?
Most complete in 5–30 seconds. Complex prompts with deep reasoning (e.g. GrokMODEL_MODE_EXPERT) may take up to 60 seconds. Set timeout up to 600 seconds on the job submit request if needed.
Do failed jobs consume credits?
No. Credits are deducted at submission but automatically restored if all 3 retry attempts fail.Can I cancel a submitted job?
No. Once submitted, a job runs to completion. Only submit jobs you intend to use.What polling interval should I use?
3 seconds is a reasonable default. Most scrapes complete in under 30 seconds, so you’d typically make 5–10 poll requests per job. Polling faster than 1 second provides no benefit.How long are jobs retained?
24 hours from submission. After that,GET /jobs/{job_id} returns HTTP 404.
What if the job returns failed after retries?
The scrape encountered an unrecoverable error after 3 attempts. Credits are restored automatically. Resubmit with a more specific prompt, or try bypass_cache=true. For persistent failures on the same prompt, contact [email protected] with the job_id.