A run takes the template’s inputs, reads the pages it needs and returns one row per result. Find a template’s slug and inputs with List Templates and Get a Template, or on its page in the dashboard (the API tab there shows the exact request).
Add "wait": true and a quick run comes back complete, with its rows, in the same response (200). Templates that read up to 10 pages wait up to 45 seconds; search-based templates wait up to 20 seconds. Anything longer answers 202 as above and you poll it as usual. Templates that run several searches (such as rank trackers), and runs with a second step switched on, always answer 202.
A run costs what the same job costs with the tool behind it, usually 1 credit per page read. Most templates use no AI. Estimate a Template Run gives the number before you run it, for free. Pages that fail aren’t charged, and a run whose site can’t be read fails without charging.
Wait for a quick run to finish: up to 45 seconds for templates that read up to 10 pages, 20 seconds for search-based ones. Templates that run several searches, or have a second step on, ignore it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Spidra","description":"Spidra documentation — REST API reference, SDK guides, browser automation, CAPTCHA solving, and proxy scraping for AI-powered web data extraction.","colors":{"primary":"#007AFF","light":"#007AFF","dark":"#007AFF"},"logo":{"light":"https://mintcdn.com/spidra/tjYTncBEy2qwqvSx/logo/logo-light.png?fit=max\u0026auto=format\u0026n=tjYTncBEy2qwqvSx\u0026q=85\u0026s=9ee4bb079b87d8aea61a7d42bfecf118","dark":"https://mintcdn.com/spidra/tjYTncBEy2qwqvSx/logo/logo-dark.png?fit=max\u0026auto=format\u0026n=tjYTncBEy2qwqvSx\u0026q=85\u0026s=3633ab236061c0e8200d4d9e0f1a9c05"},"favicon":"https://mintcdn.com/spidra/47EJpglRIcFOVcnQ/favicon.ico?fit=max\u0026auto=format\u0026n=47EJpglRIcFOVcnQ\u0026q=85\u0026s=3c0c6b781fffaaa0dd242f4b886d8917","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.spidra.io"}},"footer":{"socials":{"x":"https://x.com/spidra_io","github":"https://github.com/spidra-io","linkedin":"https://www.linkedin.com/company/spidra-io"}},"seo":{"indexing":"all"},"interaction":{"drilldown":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"book-open-cover","href":"https://app.spidra.io"},{"anchor":"GitHub","icon":"github","href":"https://github.com/spidra-io"},{"anchor":"Blog","icon":"newspaper","href":"https://spidra.io/blog"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"https://spidra.io/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"spidra","hasAudioNarration":false,"actualSubdomain":"spidra","customDomains":["docs.spidra.io"],"gitSource":{"type":"github","owner":"spidra-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad4495f7ccf34937951f5ee","collectionId":"ec3770cf-22c0-4667-883c-7fa72b946637","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad4495f7ccf34937951f5ee"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6add84bd4a5b340ece6cb7c9","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Documentation","count":37},{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Core Features","count":14},{"language":"default","tag":"SDKs","count":13},{"language":"default","tag":"Crawl Endpoints","count":10},{"language":"default","tag":"Official SDKs","count":10},{"language":"default","tag":"Scrape Endpoints","count":9},{"language":"default","tag":"Automation","count":6},{"language":"default","tag":"Search Endpoints","count":5},{"language":"default","tag":"Billing \u0026 Usage","count":5}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"table{width:100%!important;display:table!important}td,th{white-space:normal}"}],"page":{"pagePath":"api-reference/templates/run","slug":"/api-reference/templates/run","pageMetadata":{"title":"Run a Template","description":"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.","openapi":"POST /templates/{slug}/runs","keywords":["run template","POST /templates/slug/runs","scraper template API","google maps leads API"],"href":"/api-reference/templates/run"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A run takes the template’s inputs, reads the pages it needs and returns one row per result. Find a template’s slug and inputs with `,_jsx(_components.a,{href:`/api-reference/templates/list`,children:`List Templates`}),` and `,_jsx(_components.a,{href:`/api-reference/templates/get`,children:`Get a Template`}),`, or on its page in the dashboard (the `,_jsx(_components.strong,{children:`API`}),` tab there shows the exact request).`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.spidra.io/api/templates/google-maps-leads/runs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SPIDRA_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"inputs\": { \"query\": \"dentist\", \"areas\": [\"Lekki, Lagos\"] }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.spidra.io/api/templates/google-maps-leads/runs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`SPIDRA_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inputs:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dentist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`areas:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lekki, Lagos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] } }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`res `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.spidra.io/api/templates/google-maps-leads/runs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'SPIDRA_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inputs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dentist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"areas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lekki, Lagos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]}},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`run `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` res.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"run\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`The run starts and the response is `,_jsx(_components.code,{children:`202`}),` with `,_jsx(_components.code,{children:`status: \"running\"`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"run\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"runId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dfefa844-ad1f-4400-b127-dc17a186d9c2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"template\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google-maps-leads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"templateVersion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"presetId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"running\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inputs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dentist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"areas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lekki, Lagos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"pages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"findContacts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-24T18:46:01.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"creditsUsed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"urlCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rowCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"job\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a566e5de-c46a-476c-a095-b26bd5cc38cf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failures\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`inputs`}),` comes back with the defaults filled in. Poll `,_jsx(_components.a,{href:`/api-reference/templates/get-run`,children:`GET /template-runs/{runId}`}),` every few seconds until `,_jsx(_components.code,{children:`status`}),` isn’t `,_jsx(_components.code,{children:`running`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`wait-for-a-quick-result`,children:`Wait for a quick result`}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`\"wait\": true`}),` and a quick run comes back complete, with its rows, in the same response (`,_jsx(_components.code,{children:`200`}),`). Templates that read up to 10 pages wait up to 45 seconds; search-based templates wait up to 20 seconds. Anything longer answers `,_jsx(_components.code,{children:`202`}),` as above and you poll it as usual. Templates that run several searches (such as rank trackers), and runs with a second step switched on, always answer `,_jsx(_components.code,{children:`202`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.spidra.io/api/templates/product-hunt-leaderboard/runs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SPIDRA_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"inputs\": { \"period\": \"weekly\", \"week\": \"2026-W42\" }, \"wait\": true }'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`statuses`,children:`Statuses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`running`})}),_jsx(_components.td,{children:`Still reading pages.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsxs(_components.td,{children:[`Every page was read. `,_jsx(_components.code,{children:`rows`}),` holds the results.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`partial`})}),_jsxs(_components.td,{children:[`Some pages couldn’t be read. They’re listed in `,_jsx(_components.code,{children:`failures`}),` and aren’t charged; `,_jsx(_components.code,{children:`rows`}),` holds the rest.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsxs(_components.td,{children:[`Nothing could be read. `,_jsx(_components.code,{children:`error`}),` says why. A failed run costs nothing.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`cost`,children:`Cost`}),`\n`,_jsxs(_components.p,{children:[`A run costs what the same job costs with the tool behind it, usually 1 credit per page read. Most templates use no AI. `,_jsx(_components.a,{href:`/api-reference/templates/estimate`,children:`Estimate a Template Run`}),` gives the number before you run it, for free. Pages that fail aren’t charged, and a run whose site can’t be read fails without charging.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[`An input is missing or wrong. `,_jsx(_components.code,{children:`errors`}),` lists each one, for example `,_jsx(_components.code,{children:`{ \"field\": \"areas\", \"message\": \"Areas is required.\" }`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Not enough credits for the run.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`No template with this slug.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:`More than 20 template runs a minute.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsxs(_components.td,{children:[`The template is paused for maintenance (`,_jsx(_components.code,{children:`TEMPLATE_PAUSED`}),`). Nothing was charged.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Run a Template","description":"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.","openapi":"POST /templates/{slug}/runs","keywords":["run template","POST /templates/slug/runs","scraper template API","google maps leads API"],"href":"/api-reference/templates/run"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Wait for a quick result","slug":"wait-for-a-quick-result","depth":2,"children":[]},{"title":"Statuses","slug":"statuses","depth":2,"children":[]},{"title":"Cost","slug":"cost","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Run a Template","tags":["Templates"],"description":"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.","parameters":["c1902796-1e50-43de-9225-40f80dfa8a51"],"requestBody":"3c1ca0db-9eb6-4877-80f9-49511001380d","responses":{"200":"5ac995d8-4f68-402a-97f7-d3a2d078b8cd","202":"0d06f446-3eb8-40b4-8d71-833c1c66f55a","401":"29af6303-f2a4-46f4-b067-3527765ec319","403":"ac18b3ba-8381-4499-844e-c3df319ec456","404":"9381386b-84d4-4505-869f-544a6b50c3f9","422":"e38157a0-66b1-482c-b8e0-1028164b6107","429":"5ae3862f-4d40-4d5a-bf29-f749dc41e0f9","503":"a8d7dab7-c553-4700-b668-f428c1cf2045"},"method":"post","type":"path","servers":["2c40fa78-f4e2-4a16-b7ad-d0626c5c0048"],"security":["9e90f399-408f-4b1d-8e77-7d8632f63d86","c2e073a5-989f-4b10-9399-eafbc0a86ab4"],"path":"/templates/{slug}/runs","baseUrlOptions":["https://api.spidra.io/api"],"title":"Run a Template","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"c1902796-1e50-43de-9225-40f80dfa8a51":{"name":"slug","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"The template's slug.","uniqueKey":"","typeLabel":"string"},"description":"The template's slug."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"object","description":"The template's inputs, by key. [GET /templates/{slug}](/api-reference/templates/get) lists them.","uniqueKey":"inputs","typeLabel":"object"},"wait":{"type":"boolean","default":false,"description":"Wait for a quick run to finish: up to 45 seconds for templates that read up to 10 pages, 20 seconds for search-based ones. Templates that run several searches, or have a second step on, ignore it.","uniqueKey":"wait","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"example":{"inputs":{"query":"dentist","areas":["Lekki, Lagos"]}},"examples":{"Example":{"title":"Example","value":{"inputs":{"query":"dentist","areas":["Lekki, Lagos"]}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"5ac995d8-4f68-402a-97f7-d3a2d078b8cd":{"description":"The run finished within `wait`.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"run":{"type":"object","properties":{"runId":{"type":"string","uniqueKey":"run.runId","typeLabel":"string"},"template":{"type":"string","description":"The template's slug.","uniqueKey":"run.template","typeLabel":"string"},"templateVersion":{"type":"integer","uniqueKey":"run.templateVersion","typeLabel":"integer"},"presetId":{"oneOf":[{"type":"string","description":"Set when the run came from a preset.","uniqueKey":"run.presetId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when the run came from a preset.","uniqueKey":"run.presetId.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.presetId","typeLabel":"string | null"},"tool":{"type":"string","uniqueKey":"run.tool","typeLabel":"string"},"status":{"type":"string","enum":["running","completed","partial","failed","cancelled"],"description":"`partial`: some pages failed (they aren't charged) and the rest came back.","uniqueKey":"run.status","typeLabel":"enum\u003cstring>"},"inputs":{"type":"object","description":"The inputs the run used, with defaults filled in.","uniqueKey":"run.inputs","typeLabel":"object"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"run.createdAt","typeLabel":"string\u003cdate-time>"},"finishedAt":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"run.finishedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"run.finishedAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.finishedAt","typeLabel":"string\u003cdate-time> | null"},"creditsUsed":{"oneOf":[{"type":"number","description":"Null while running.","uniqueKey":"run.creditsUsed.oneOf.0","typeLabel":"number"},{"type":"null","description":"Null while running.","uniqueKey":"run.creditsUsed.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.creditsUsed","typeLabel":"number | null"},"urlCount":{"oneOf":[{"type":"integer","description":"Pages the run reads.","uniqueKey":"run.urlCount.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Pages the run reads.","uniqueKey":"run.urlCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.urlCount","typeLabel":"integer | null"},"rowCount":{"oneOf":[{"type":"integer","uniqueKey":"run.rowCount.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"run.rowCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.rowCount","typeLabel":"integer | null"},"progress":{"type":"object","properties":{"completed":{"type":"integer","uniqueKey":"run.progress.completed","typeLabel":"integer"},"failed":{"type":"integer","uniqueKey":"run.progress.failed","typeLabel":"integer"},"total":{"type":"integer","uniqueKey":"run.progress.total","typeLabel":"integer"}},"uniqueKey":"run.progress","typeLabel":"object"},"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"run.rows.items.[INDEX]","typeLabel":"object"},"description":"The results, one object per row, with every field the site returned. Present once the run has finished (leave out with `?rows=false`).","uniqueKey":"run.rows","typeLabel":"object[]"},"failures":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","uniqueKey":"run.failures.items.[INDEX].url","typeLabel":"string"},"error":{"type":"string","uniqueKey":"run.failures.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"run.failures.items.[INDEX]","typeLabel":"object"},"description":"Pages that couldn't be read. Not charged.","uniqueKey":"run.failures","typeLabel":"object[]"},"error":{"type":"string","description":"Why the run failed.","uniqueKey":"run.error","typeLabel":"string"},"followStep":{"type":"object","description":"Templates with a second step switched on (such as finding emails and social links on each business's website).","properties":{"status":{"type":"string","enum":["waiting","running","completed","failed"],"uniqueKey":"run.followStep.status","typeLabel":"enum\u003cstring>"},"sites":{"type":"integer","uniqueKey":"run.followStep.sites","typeLabel":"integer"},"pagesLoaded":{"type":"integer","uniqueKey":"run.followStep.pagesLoaded","typeLabel":"integer"},"pagesFailed":{"type":"integer","uniqueKey":"run.followStep.pagesFailed","typeLabel":"integer"},"pagesWaiting":{"type":"integer","uniqueKey":"run.followStep.pagesWaiting","typeLabel":"integer"},"creditsUsed":{"type":"number","uniqueKey":"run.followStep.creditsUsed","typeLabel":"number"},"error":{"type":"string","uniqueKey":"run.followStep.error","typeLabel":"string"}},"uniqueKey":"run.followStep","typeLabel":"object"},"summary":{"type":"object","description":"Rank trackers only: how many keywords or points ranked, and the average position.","uniqueKey":"run.summary","typeLabel":"object"},"job":{"type":"object","properties":{"tool":{"type":"string","uniqueKey":"run.job.tool","typeLabel":"string"},"id":{"oneOf":[{"type":"string","uniqueKey":"run.job.id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"run.job.id.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.job.id","typeLabel":"string | null"}},"description":"The tool job behind the run, for that tool's own endpoints.","uniqueKey":"run.job","typeLabel":"object"}},"uniqueKey":"run","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"success","run":{"runId":"\u003cstring>","template":"\u003cstring>","templateVersion":123,"presetId":"\u003cstring>","tool":"\u003cstring>","status":"running","inputs":{},"createdAt":"2023-11-07T05:31:56Z","finishedAt":"2023-11-07T05:31:56Z","creditsUsed":123,"urlCount":123,"rowCount":123,"progress":{"completed":123,"failed":123,"total":123},"rows":[{}],"failures":[{"url":"\u003cstring>","error":"\u003cstring>"}],"error":"\u003cstring>","followStep":{"status":"waiting","sites":123,"pagesLoaded":123,"pagesFailed":123,"pagesWaiting":123,"creditsUsed":123,"error":"\u003cstring>"},"summary":{},"job":{"tool":"\u003cstring>","id":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"0d06f446-3eb8-40b4-8d71-833c1c66f55a":{"description":"The run started.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"run":{"type":"object","properties":{"runId":{"type":"string","uniqueKey":"run.runId","typeLabel":"string"},"template":{"type":"string","description":"The template's slug.","uniqueKey":"run.template","typeLabel":"string"},"templateVersion":{"type":"integer","uniqueKey":"run.templateVersion","typeLabel":"integer"},"presetId":{"oneOf":[{"type":"string","description":"Set when the run came from a preset.","uniqueKey":"run.presetId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when the run came from a preset.","uniqueKey":"run.presetId.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.presetId","typeLabel":"string | null"},"tool":{"type":"string","uniqueKey":"run.tool","typeLabel":"string"},"status":{"type":"string","enum":["running","completed","partial","failed","cancelled"],"description":"`partial`: some pages failed (they aren't charged) and the rest came back.","uniqueKey":"run.status","typeLabel":"enum\u003cstring>"},"inputs":{"type":"object","description":"The inputs the run used, with defaults filled in.","uniqueKey":"run.inputs","typeLabel":"object"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"run.createdAt","typeLabel":"string\u003cdate-time>"},"finishedAt":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"run.finishedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"run.finishedAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.finishedAt","typeLabel":"string\u003cdate-time> | null"},"creditsUsed":{"oneOf":[{"type":"number","description":"Null while running.","uniqueKey":"run.creditsUsed.oneOf.0","typeLabel":"number"},{"type":"null","description":"Null while running.","uniqueKey":"run.creditsUsed.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.creditsUsed","typeLabel":"number | null"},"urlCount":{"oneOf":[{"type":"integer","description":"Pages the run reads.","uniqueKey":"run.urlCount.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Pages the run reads.","uniqueKey":"run.urlCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.urlCount","typeLabel":"integer | null"},"rowCount":{"oneOf":[{"type":"integer","uniqueKey":"run.rowCount.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"run.rowCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.rowCount","typeLabel":"integer | null"},"progress":{"type":"object","properties":{"completed":{"type":"integer","uniqueKey":"run.progress.completed","typeLabel":"integer"},"failed":{"type":"integer","uniqueKey":"run.progress.failed","typeLabel":"integer"},"total":{"type":"integer","uniqueKey":"run.progress.total","typeLabel":"integer"}},"uniqueKey":"run.progress","typeLabel":"object"},"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"run.rows.items.[INDEX]","typeLabel":"object"},"description":"The results, one object per row, with every field the site returned. Present once the run has finished (leave out with `?rows=false`).","uniqueKey":"run.rows","typeLabel":"object[]"},"failures":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","uniqueKey":"run.failures.items.[INDEX].url","typeLabel":"string"},"error":{"type":"string","uniqueKey":"run.failures.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"run.failures.items.[INDEX]","typeLabel":"object"},"description":"Pages that couldn't be read. Not charged.","uniqueKey":"run.failures","typeLabel":"object[]"},"error":{"type":"string","description":"Why the run failed.","uniqueKey":"run.error","typeLabel":"string"},"followStep":{"type":"object","description":"Templates with a second step switched on (such as finding emails and social links on each business's website).","properties":{"status":{"type":"string","enum":["waiting","running","completed","failed"],"uniqueKey":"run.followStep.status","typeLabel":"enum\u003cstring>"},"sites":{"type":"integer","uniqueKey":"run.followStep.sites","typeLabel":"integer"},"pagesLoaded":{"type":"integer","uniqueKey":"run.followStep.pagesLoaded","typeLabel":"integer"},"pagesFailed":{"type":"integer","uniqueKey":"run.followStep.pagesFailed","typeLabel":"integer"},"pagesWaiting":{"type":"integer","uniqueKey":"run.followStep.pagesWaiting","typeLabel":"integer"},"creditsUsed":{"type":"number","uniqueKey":"run.followStep.creditsUsed","typeLabel":"number"},"error":{"type":"string","uniqueKey":"run.followStep.error","typeLabel":"string"}},"uniqueKey":"run.followStep","typeLabel":"object"},"summary":{"type":"object","description":"Rank trackers only: how many keywords or points ranked, and the average position.","uniqueKey":"run.summary","typeLabel":"object"},"job":{"type":"object","properties":{"tool":{"type":"string","uniqueKey":"run.job.tool","typeLabel":"string"},"id":{"oneOf":[{"type":"string","uniqueKey":"run.job.id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"run.job.id.oneOf.1","typeLabel":"null"}],"uniqueKey":"run.job.id","typeLabel":"string | null"}},"description":"The tool job behind the run, for that tool's own endpoints.","uniqueKey":"run.job","typeLabel":"object"}},"uniqueKey":"run","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"success","run":{"runId":"\u003cstring>","template":"\u003cstring>","templateVersion":123,"presetId":"\u003cstring>","tool":"\u003cstring>","status":"running","inputs":{},"createdAt":"2023-11-07T05:31:56Z","finishedAt":"2023-11-07T05:31:56Z","creditsUsed":123,"urlCount":123,"rowCount":123,"progress":{"completed":123,"failed":123,"total":123},"rows":[{}],"failures":[{"url":"\u003cstring>","error":"\u003cstring>"}],"error":"\u003cstring>","followStep":{"status":"waiting","sites":123,"pagesLoaded":123,"pagesFailed":123,"pagesWaiting":123,"creditsUsed":123,"error":"\u003cstring>"},"summary":{},"job":{"tool":"\u003cstring>","id":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"29af6303-f2a4-46f4-b067-3527765ec319":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"ac18b3ba-8381-4499-844e-c3df319ec456":{"description":"Not enough credits.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"9381386b-84d4-4505-869f-544a6b50c3f9":{"description":"No template with this slug.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"e38157a0-66b1-482c-b8e0-1028164b6107":{"description":"Some inputs need fixing. `errors` lists each field.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["INVALID_INPUT"],"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"One entry per field that needs fixing.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","code":"INVALID_INPUT","message":"\u003cstring>","errors":[{"field":"\u003cstring>","message":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"5ae3862f-4d40-4d5a-bf29-f749dc41e0f9":{"description":"More than 20 template runs a minute.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a8d7dab7-c553-4700-b668-f428c1cf2045":{"description":"The template is paused (`TEMPLATE_PAUSED`). Nothing was charged.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["status","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"9e90f399-408f-4b1d-8e77-7d8632f63d86":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"BearerAuth"}},"c2e073a5-989f-4b10-9399-eafbc0a86ab4":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"2c40fa78-f4e2-4a16-b7ad-d0626c5c0048":{"url":"https://api.spidra.io/api"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"spidra","siteName":"Spidra","title":"Run a Template - Spidra","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T04:25:46.258Z","originalFileLocation":"api-reference/templates/run.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Spidra\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run a Template - Spidra\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Spidra\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.spidra.io/api-reference/templates/run\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://spidra.mintlify.app/_mintlify/api/og/v2?division=Templates\u0026amp;title=Run+a+Template\u0026amp;description=Run+a+template+with+its+inputs+and+get+its+rows%3A+Google+Maps+leads%2C+Amazon+products%2C+LinkedIn+jobs%2C+Google+Trends+and+more.\u0026amp;theme=fd0fe7fea6781527f1876f07\u0026amp;signature=8c656c6496dffe3a215393a1584f87b430510e16d21257efbd07f5d6bb11137e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Run a Template - Spidra\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://spidra.mintlify.app/_mintlify/api/og/v2?division=Templates\u0026amp;title=Run+a+Template\u0026amp;description=Run+a+template+with+its+inputs+and+get+its+rows%3A+Google+Maps+leads%2C+Amazon+products%2C+LinkedIn+jobs%2C+Google+Trends+and+more.\u0026amp;theme=fd0fe7fea6781527f1876f07\u0026amp;signature=8c656c6496dffe3a215393a1584f87b430510e16d21257efbd07f5d6bb11137e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/spidra/JYxAUddv93IVFozP/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Spidra\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007AFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.spidra.io/api-reference/templates/run\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/templates/run.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.spidra.io/#organization\",\"name\":\"Spidra\",\"url\":\"https://docs.spidra.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/spidra/tjYTncBEy2qwqvSx/logo/logo-light.png?fit=max\u0026auto=format\u0026n=tjYTncBEy2qwqvSx\u0026q=85\u0026s=9ee4bb079b87d8aea61a7d42bfecf118\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.spidra.io#website\",\"name\":\"Spidra\",\"url\":\"https://docs.spidra.io\",\"publisher\":{\"@id\":\"https://docs.spidra.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.spidra.io/api-reference/templates/run#webpage\",\"url\":\"https://docs.spidra.io/api-reference/templates/run\",\"name\":\"Run a Template\",\"description\":\"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\",\"dateModified\":\"2026-10-25T04:25:46.258Z\",\"isPartOf\":{\"@id\":\"https://docs.spidra.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.spidra.io/api-reference/templates/run#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.spidra.io/api-reference/templates/run#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Templates\",\"item\":\"https://docs.spidra.io/api-reference/templates/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run a Template\",\"item\":\"https://docs.spidra.io/api-reference/templates/run\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.spidra.io/api-reference/templates/run#apireference\",\"headline\":\"Run a Template\",\"name\":\"Run a Template\",\"description\":\"Run a template with its inputs and get its rows: Google Maps leads, Amazon products, LinkedIn jobs, Google Trends and more.\",\"url\":\"https://docs.spidra.io/api-reference/templates/run\",\"mainEntityOfPage\":{\"@id\":\"https://docs.spidra.io/api-reference/templates/run#webpage\"},\"dateModified\":\"2026-10-25T04:25:46.258Z\",\"keywords\":\"run template, POST /templates/slug/runs, scraper template API, google maps leads API\",\"publisher\":{\"@id\":\"https://docs.spidra.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.spidra.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Spidra\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Spidra","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"book-open-cover","href":"https://app.spidra.io"},{"anchor":"GitHub","icon":"github","href":"https://github.com/spidra-io"},{"anchor":"Blog","icon":"newspaper","href":"https://spidra.io/blog"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"https://spidra.io/changelog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"SDKs and AI","pages":[{"title":"SDKs and AI","href":"/sdks/overview"}]},{"tab":"API Reference","groups":[{"group":"Using the API","pages":[{"title":"API introduction","icon":"book","href":"/api-reference/introduction"},{"title":"Errors","icon":"triangle-exclamation","href":"/api-reference/errors"},{"title":"Rate limits","icon":"gauge","href":"/api-reference/rate-limits"},{"title":"Webhooks","icon":"webhook","href":"/api-reference/webhooks"}]},{"group":"Scrape","pages":[{"title":"Scrape","openapi":"POST /scrape","href":"/api-reference/scraping/scrape"},{"title":"Get a scrape","openapi":"GET /scrape/{jobId}","href":"/api-reference/scraping/scrape-status"}]},{"group":"Batch scrape","pages":[{"title":"Batch scrape","openapi":"POST /batch/scrape","href":"/api-reference/scraping/batch-scrape"},{"title":"Get a batch","openapi":"GET /batch/scrape/{batchId}","href":"/api-reference/scraping/batch-scrape-status"},{"title":"List batches","openapi":"GET /batch/scrape","href":"/api-reference/scraping/batch-scrape-list"},{"title":"Retry a batch","openapi":"POST /batch/scrape/{batchId}/retry","href":"/api-reference/scraping/batch-scrape-retry"},{"title":"Cancel a batch","openapi":"DELETE /batch/scrape/{batchId}","href":"/api-reference/scraping/batch-scrape-cancel"}]},{"group":"Crawl","pages":[{"title":"Crawl","openapi":"POST /crawl","href":"/api-reference/crawling/crawl"},{"title":"Get a crawl","openapi":"GET /crawl/{jobId}","href":"/api-reference/crawling/crawl-status"},{"title":"Get crawl pages","openapi":"GET /crawl/{jobId}/pages","href":"/api-reference/crawling/crawl-pages"},{"title":"Get a crawl report","openapi":"GET /crawl/{jobId}/report","href":"/api-reference/crawling/crawl-report"},{"title":"Extract from a crawl","openapi":"POST /crawl/{jobId}/extract","href":"/api-reference/crawling/crawl-extract"},{"title":"Retry a crawl page","openapi":"POST /crawl/{jobId}/retry/{pageId}","href":"/api-reference/crawling/crawl-retry-page"},{"title":"Download a crawl","openapi":"GET /crawl/{jobId}/download","href":"/api-reference/crawling/crawl-download"},{"title":"Get crawl details","openapi":"GET /crawl/job/{jobId}","href":"/api-reference/crawling/crawl-details"},{"title":"List crawls","openapi":"GET /crawl/history","href":"/api-reference/crawling/crawl-history"},{"title":"Cancel a crawl","openapi":"DELETE /crawl/{jobId}","href":"/api-reference/crawling/crawl-cancel"}]},{"group":"Map","pages":[{"title":"Map","openapi":"POST /map","href":"/api-reference/crawling/map"}]},{"group":"Search","pages":[{"title":"Search","openapi":"POST /search","href":"/api-reference/search/search"},{"title":"Get a search","openapi":"GET /search/{jobId}","href":"/api-reference/search/search-status"},{"title":"Cancel a search","openapi":"DELETE /search/{jobId}","href":"/api-reference/search/search-cancel"}]},{"group":"Parse","pages":[{"title":"Parse","openapi":"POST /parse","href":"/api-reference/parse/parse"},{"title":"Get a parse job","openapi":"GET /parse/{jobId}","href":"/api-reference/parse/parse-status"},{"title":"Parse a batch","openapi":"POST /parse/batch","href":"/api-reference/parse/parse-batch"},{"title":"Get a parse batch","openapi":"GET /parse/batch/{batchId}","href":"/api-reference/parse/parse-batch-status"},{"title":"Prepare a large upload","openapi":"POST /parse/uploads","href":"/api-reference/parse/parse-uploads"},{"title":"Delete a document","openapi":"DELETE /parse/files/{fileId}","href":"/api-reference/parse/parse-delete-file"},{"title":"List formats","openapi":"GET /parse/formats","href":"/api-reference/parse/parse-formats"}]},{"group":"Templates","pages":[{"title":"List Templates","openapi":"GET /templates","href":"/api-reference/templates/list"},{"title":"Get a Template","openapi":"GET /templates/{slug}","href":"/api-reference/templates/get"},{"title":"Estimate a Template Run","description":"Check inputs and see what a template run will cost, without running it.","openapi":"POST /templates/{slug}/estimate","href":"/api-reference/templates/estimate"},{"title":"Run a Template","openapi":"POST /templates/{slug}/runs","href":"/api-reference/templates/run"},{"title":"Get a Template Run","description":"Check a template run and get its rows once it has finished.","openapi":"GET /template-runs/{runId}","href":"/api-reference/templates/get-run"},{"title":"List Template Runs","openapi":"GET /template-runs","href":"/api-reference/templates/list-runs"},{"title":"Look Up Airports","openapi":"GET /templates/lookups/airports","href":"/api-reference/templates/airports"}]},{"group":"Presets","pages":[{"title":"Create a Preset","openapi":"POST /presets","href":"/api-reference/presets/create"},{"title":"List Presets","openapi":"GET /presets","href":"/api-reference/presets/list"},{"title":"Get a Preset","openapi":"GET /presets/{presetId}","href":"/api-reference/presets/get"},{"title":"Update a Preset","openapi":"PATCH /presets/{presetId}","href":"/api-reference/presets/update"},{"title":"Delete a Preset","openapi":"DELETE /presets/{presetId}","href":"/api-reference/presets/delete"},{"title":"Run a Preset","openapi":"POST /presets/{presetId}/runs","href":"/api-reference/presets/run"}]},{"group":"Monitors","pages":[{"title":"Create a Monitor","openapi":"POST /monitors","href":"/api-reference/monitors/create"},{"title":"List Monitors","openapi":"GET /monitors","href":"/api-reference/monitors/list"},{"title":"Get a Monitor","openapi":"GET /monitors/{monitorId}","href":"/api-reference/monitors/get"},{"title":"Update a Monitor","openapi":"PATCH /monitors/{monitorId}","href":"/api-reference/monitors/update"},{"title":"Delete a Monitor","openapi":"DELETE /monitors/{monitorId}","href":"/api-reference/monitors/delete"},{"title":"Check a Monitor Now","openapi":"POST /monitors/{monitorId}/check","href":"/api-reference/monitors/check-now"},{"title":"Pause a Monitor","openapi":"POST /monitors/{monitorId}/pause","href":"/api-reference/monitors/pause"},{"title":"Resume a Monitor","openapi":"POST /monitors/{monitorId}/resume","href":"/api-reference/monitors/resume"},{"title":"List Monitor Checks","openapi":"GET /monitors/{monitorId}/checks","href":"/api-reference/monitors/list-checks"},{"title":"Get a Monitor Check","openapi":"GET /monitors/{monitorId}/checks/{checkId}","href":"/api-reference/monitors/get-check"},{"title":"Estimate a Monitor","openapi":"POST /monitors/estimate","href":"/api-reference/monitors/estimate"},{"title":"Get Monitor Limits","openapi":"GET /monitors/limits","href":"/api-reference/monitors/limits"},{"title":"Send a Test Notification","openapi":"POST /monitors/test-notification","href":"/api-reference/monitors/test-notification"}]},{"group":"Logs","pages":[{"title":"List scrape logs","openapi":"GET /scrape-logs","href":"/api-reference/scraping/scrape-logs"},{"title":"Get a scrape log","openapi":"GET /scrape-logs/{uuid}","href":"/api-reference/scraping/scrape-logs-detail"},{"title":"List search logs","openapi":"GET /search-logs","href":"/api-reference/search/search-logs"},{"title":"Get a search log","openapi":"GET /search-logs/{uuid}","href":"/api-reference/search/search-logs-detail"},{"title":"List map logs","openapi":"GET /map-logs","href":"/api-reference/logs/map-logs"},{"title":"Get a map log","openapi":"GET /map-logs/{uuid}","href":"/api-reference/logs/map-logs-detail"},{"title":"List parse logs","openapi":"GET /parse-logs","href":"/api-reference/logs/parse-logs"}]},{"group":"Account","pages":[{"title":"Account","openapi":"GET /account","href":"/api-reference/account/account"},{"title":"Usage stats","openapi":"GET /usage-stats","href":"/api-reference/account/usage-stats"},{"title":"Usage by tool","openapi":"GET /usage-stats/breakdown","href":"/api-reference/account/usage-breakdown"}]}]}]},"title":"Run a Template - Spidra","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}