spidra_run_template
Run a scraping template with supplied inputs to return result rows, estimate credit cost before running, and paginate results.
Instructions
Run a template and get its rows. Most runs finish in this call (it waits up to about 45 seconds). A longer one returns a "runId"; check it with spidra_get_job (type "template_run") every 10 to 15 seconds until "status" isn't "running".
Get the inputs from spidra_get_template first. Send them in "inputs" by key.
"estimate": true checks the inputs and returns the credits it should cost, for free, without running.
Rows come back with the template's columns. "detail": "full" returns every field. Rows page with "offset" and "limit" (default 50).
A "partial" run had some pages fail; its rows are still there, with the failures listed.
Cost: what the same job costs with the tool behind it, usually 1 credit per page read. Failed pages and failed runs cost nothing.
Example: {"slug": "google-maps-leads", "inputs": {"query": "dentist", "areas": ["Lekki, Lagos"]}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The template's slug, e.g. "google-maps-leads" | |
| limit | No | Rows to return (default 50) | |
| detail | No | "columns" (default) returns each row with just the template's table columns; "full" returns every field (Google Maps rows have about 50) | |
| inputs | Yes | The template's inputs by key | |
| offset | No | Rows to skip (default 0) | |
| estimate | No | Return the cost without running |