curl --request POST \
--url https://api.spidra.io/api/presets/{presetId}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"status": "success",
"links": [
{
"url": "https://docs.python.org/3/library/asyncio.html",
"title": "asyncio"
},
{
"url": "https://docs.python.org/3/library/asyncio-threading.html",
"title": "asyncio and free-threaded Python"
},
{
"url": "https://docs.python.org/3/howto/a-conceptual-overview-of-asyncio.html",
"title": "A conceptual overview of asyncio"
},
"..."
],
"total": 21,
"scanned": 595,
"sources": {
"sitemap": 7,
"pages": 588
},
"creditsUsed": 1,
"durationMs": 8748,
"presetId": "a044216c-075e-4397-abdc-75d8b2a5593e",
"tool": "map"
}Run a preset
Runs a preset and answers the way the job behind it answers.
- A template preset starts a template run. The response is the same as Run a template, with
presetIdadded. Poll the run with Get a template run. - A tool preset sends its saved request to the tool. The response is exactly that tool’s response, with
presetIdandtooladded: a map answers with its links straight away, and a scrape or crawl with a job ID to poll at its own endpoint.
overrides replaces template inputs, or request fields of a tool preset, for this run only. The preset itself doesn’t change. Send wait: true to wait for a quick result, as with a template run or a batch scrape.
Credits: what the same job costs when you run the template or tool directly.
Rate limits: 30 preset runs a minute, plus the limits of the tool behind the preset.
curl --request POST \
--url https://api.spidra.io/api/presets/{presetId}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"status": "success",
"links": [
{
"url": "https://docs.python.org/3/library/asyncio.html",
"title": "asyncio"
},
{
"url": "https://docs.python.org/3/library/asyncio-threading.html",
"title": "asyncio and free-threaded Python"
},
{
"url": "https://docs.python.org/3/howto/a-conceptual-overview-of-asyncio.html",
"title": "A conceptual overview of asyncio"
},
"..."
],
"total": 21,
"scanned": 595,
"sources": {
"sitemap": 7,
"pages": 588
},
"creditsUsed": 1,
"durationMs": 8748,
"presetId": "a044216c-075e-4397-abdc-75d8b2a5593e",
"tool": "map"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The preset's id.
Body
Fields to change for this run only. For a template preset, inputs by key, merged over the saved inputs. For a tool preset, request fields, merged over the saved request body.
Waits for a quick result, the same way wait works on the template or tool behind the preset.
Response
The job finished straight away, such as a map, or within the wait window. For a tool preset, the tool's own response with presetId and tool added.
Was this page helpful?

