curl --request POST \
--url https://api.spidra.io/api/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
{
"url": "https://books.toscrape.com"
}
]
}
'{
"status": "queued",
"jobId": "1027909f-f231-495b-9f9f-c5e0043c51b1",
"message": "Scrape job has been queued. Poll /api/scrape/1027909f-f231-495b-9f9f-c5e0043c51b1 to get the result."
}Start a scrape
Starts a job that reads 1 to 3 URLs and returns its jobId straight away. Poll Get a scrape until status is completed or failed.
All the URLs in one request go into one result. Without a prompt you get each page as Markdown, and with a prompt or schema you get one answer drawn from all of them. To get a separate result for each URL, or to scrape more than 3, use Batch scrape.
If you send the same URLs again within 5 seconds, you get the first job’s jobId back with deduplicated: true instead of a second job.
Credits: 1 per URL, plus AI credits for the tokens used when you send a prompt or schema (often 1 or 2 for a page), plus 5 per CAPTCHA solved. A URL that can’t be read costs nothing. See How credits work.
Rate limits: 60 requests a minute, and up to 10 unfinished scrapes at a time. Batch URLs count toward the 10.
curl --request POST \
--url https://api.spidra.io/api/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
{
"url": "https://books.toscrape.com"
}
]
}
'{
"status": "queued",
"jobId": "1027909f-f231-495b-9f9f-c5e0043c51b1",
"message": "Scrape job has been queued. Poll /api/scrape/1027909f-f231-495b-9f9f-c5e0043c51b1 to get the result."
}Authorizations
Body
A JSON Schema for the answer. You get exactly these fields and types, with null for anything the page doesn't show. The root must be "type": "object", at most 5 levels deep and 10 KB. Sending a schema sets output to "json".
markdown returns the page as Markdown, or the AI's answer as text when you send a prompt. json returns structured data: on popular sites with no prompt, the page's data; elsewhere, data the AI extracts. Lowercase only.
markdown, json default opens every page in a real browser. fast fetches the page directly and opens a browser only when the page needs one, which is quicker for static pages. fast doesn't run actions or take screenshots. crawlerMode is accepted as an older name for this field.
default, fast Turns on Stealth Mode, which sends the request through residential proxies. Billed by bandwidth, not credits. Not needed when you set proxyCountry. false keeps the proxy off, even with a country. When Stealth Mode can't be used because your proxy bandwidth ran out, the request runs without it and warnings says so.
The country to read pages from, as a two-letter code such as us, gb or de, or eu or asia. Setting a country turns Stealth Mode on (billed by bandwidth), and the response's warnings says so, unless useProxy is false: then the country isn't used, and warnings says that instead. global means any country.
"gb"
Cookies from your own signed-in browser session, to read pages that need an account. Either name=value; name2=value2 or rows pasted from your browser's DevTools. Never stored. See Logged-in pages.
Response
The job was queued. Poll GET /scrape/{jobId} for the result.
Was this page helpful?

