Submit a Crawl Job
Start a crawl job that discovers and processes multiple pages from a website. Control which pages to visit, how deep to go, and what to extract from each one.
How It Works
Crawl jobs run asynchronously. You get ajobId immediately and poll GET /crawl/{jobId} until the job finishes.
- Submit — Send your request, receive a
jobId - Discover — Spidra loads your base URL and finds links matching your
crawlInstruction - Crawl — Visits each discovered page (up to
maxPages) - Solve — Handles any CAPTCHAs automatically
- Extract — Runs your
transformInstructionorschemaon each page. If neither is provided, returns raw page markdown with no AI step. - Poll — Check
GET /crawl/{jobId}untilstatusiscompleted
Request Fields
Required
Extraction (both optional)
Scope and depth
Delivery
Access and authentication
Proxy and Geo-Targeting
"proxyCountry": "global" (or omit it) for no country preference. Use "eu" to rotate across EU member states. For a specific country pass its two-letter ISO code.
Stealth Mode and Geo-Targeting
Scoped Crawling with Path Filters
CombineincludePaths and excludePaths to keep crawls focused on the content you actually need.
Structured Output with Schema
Useschema when you need every page to return the same fields in the same format — useful for feeding results directly into a database or downstream pipeline.
Raw Content (No Extraction)
Omit bothtransformInstruction and schema to get the raw page content without any AI processing. Each page’s data field contains the plain markdown of that page. No token credits are charged.
Webhook Events
WhenwebhookUrl is set, Spidra sends POST requests to that URL as the job runs. All requests have Content-Type: application/json.
crawl.page — Fired for each page that is successfully processed.
crawl.completed — Fired once when the entire job finishes.
crawl.failed — Fired if the job fails entirely (not for individual page failures).
Authenticated Crawling
Authenticated Scraping
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The starting URL for the crawl. Spidra begins here and follows links outward.
Plain-language instruction for which pages to follow (e.g., 'all product pages', 'blog posts only'). Spidra uses this to decide which links to visit and which to ignore.
Plain-language instruction for what to extract from each page (e.g., 'Extract title, author, and publish date'). When omitted and no schema is provided, each page's data field contains the raw page markdown — no AI is used and no token credits are charged.
A JSON Schema object that defines the exact structure of the extracted data. When provided, the AI returns JSON matching this schema for every page. Use this when you need consistent, queryable output across all pages. Root must be type 'object'. Takes precedence over transformInstruction for output shape.
Maximum number of pages to crawl.
1 <= x <= 50Maximum link depth from the base URL. 0 means only the base URL itself is visited. 1 means the base URL and pages directly linked from it. Omit for unlimited depth.
x >= 0URL path patterns to include. Only pages whose paths match at least one pattern will be crawled. Use glob-style patterns (e.g., '/blog/', '/products/'). Takes effect after crawlInstruction filtering.
URL path patterns to exclude. Pages matching any pattern are skipped entirely (e.g., '/admin/', '/login', '/tag/').
When true, the crawler follows links to subdomains of the base URL (e.g., docs.example.com when base is example.com).
When true, the crawler follows any link on the same root domain regardless of the starting path. Use with includePaths or excludePaths to keep it focused.
When true, URLs that differ only by query string are treated as the same page. Prevents duplicate crawling on sites that append tracking or session parameters to URLs.
A URL that receives a POST request each time a page finishes processing. Useful for streaming results into your own pipeline instead of polling at the end.
Route requests through residential proxies to reduce bot detection and access geo-restricted content.
Two-letter ISO country code (e.g., 'us', 'de'), 'eu' for EU rotation, or 'global' for no preference. Requires useProxy: true.
Session cookies for crawling pages that require authentication. Accepts standard cookie string format (name=value; name2=value2) or a raw Chrome DevTools paste.

