curl --request POST \
--url https://api.spidra.io/api/presets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "template",
"name": "Dentists in Lekki",
"template": "google-maps-leads",
"inputs": {
"query": "dentist",
"areas": [
"Lekki, Lagos"
]
}
}
'{
"status": "success",
"message": "Preset saved.",
"data": {
"uuid": "15415447-7680-4dc5-90a0-f7a900c7f418",
"id": "15415447-7680-4dc5-90a0-f7a900c7f418"
}
}Create a preset
Saves a job to run again with one call. There are two kinds:
- A template preset (
kind: "template") is a template and its inputs, such as Google Maps leads for dentists in Lekki. The inputs are checked the same way a run checks them, and defaults are filled in. - A tool preset (
kind: "tool") is the request body for scrape, batch, crawl, map, search or parse, exactly as you’d send it to that endpoint.configmust have what the tool requires:urlsfor scrape and batch,baseUrlfor crawl,urlfor map,queryfor search, andurlorfileIdfor parse.
cookies and wait are never stored, so a preset never keeps a login. Run a preset with Run a preset, or watch it for changes with a monitor.
curl --request POST \
--url https://api.spidra.io/api/presets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "template",
"name": "Dentists in Lekki",
"template": "google-maps-leads",
"inputs": {
"query": "dentist",
"areas": [
"Lekki, Lagos"
]
}
}
'{
"status": "success",
"message": "Preset saved.",
"data": {
"uuid": "15415447-7680-4dc5-90a0-f7a900c7f418",
"id": "15415447-7680-4dc5-90a0-f7a900c7f418"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The kind of preset.
template, tool A name for the preset.
255A note about the preset.
With kind: "template", the template's slug. templateSlug works too.
"google-maps-leads"
With kind: "template", the template's inputs by key, as listed by Get a template.
With kind: "template", the columns the dashboard table shows, as { key, label, format } objects, up to 60. Only the dashboard uses them; runs always return every field.
With kind: "tool", the tool to run.
scrape, batch, crawl, map, search, parse With kind: "tool", the request body for that tool, as you'd send it to its endpoint. Up to about 200 KB.
Was this page helpful?

