Skip to main content
New to Corsair? See API access, authentication, and error handling.

Agent

createScraper

agent.createScraper Create an empty agentic scraper Risk: write
Input: empty object Output

deleteScraper

agent.deleteScraper Delete an agentic scraper Risk: destructive · Irreversible
Input The API answers a message string the operation validates and returns. Output

extract

agent.extract Start a one-shot agentic extraction; answers a task_id to poll, stop or wait on Risk: read
Input Answers 202 Accepted with a task_id and status pending; poll agent.getTask, stop with agent.stopTask, or get a callback at callback_url.
Output

generateScraper

agent.generateScraper Build or regenerate an agentic scraper from a page and an instruction Risk: destructive
Input Answers 202 with template_id and status generating; agent.getScraper reports ready or failed when the build ends. Omitting template_id creates a new scraper.
Output

getScraper

agent.getScraper Read one agentic scraper with its build status and parameters schema Risk: read
Input Status is one of generating, ready, failed; parameters_schema lists what each run accepts. Output

getTask

agent.getTask Read one agentic extraction task with its status and results Risk: read
Input Status is one of pending, running, completed, failed, stopped; data arrives when completed. Output

stopTask

agent.stopTask Cancel a running agentic extraction Risk: write
Input Cancels a running extraction; the task reports stopped. Output

Extractor

createScraper

extractor.createScraper Create an empty extractor scraper Risk: write
Input: empty object Output

deleteScraper

extractor.deleteScraper Delete an extractor scraper Risk: destructive · Irreversible
Input The API answers a message string the operation validates and returns. Output

extract

extractor.extract Extract structured data from a URL with the LLM extractor; each call charges credits Risk: read
Input Minimal payload is url plus an attributes list (a prompt alone answers 422); the prompt adds context; mode and proxy_country are optional, cookies take the documented name-value records with an optional sameSite.
Output: Record<string, any>

getScraper

extractor.getScraper Read one extractor scraper Risk: read
Input Output

parse

extractor.parse Parse data from HTML or text content you already have; each call charges credits Risk: read
Input Parses content you already have instead of fetching a URL.
Output: Record<string, any>

Scrapers

getRun

scrapers.getRun Read one async scraper run with its progress and results Risk: read
Input Status is one of running, completed, completed_partial, failed; data is keyed by scraped URL once done. Output

run

scrapers.run Run a scraper and wait for results; the API defers past five minutes to a pollable run Risk: read
Input Waits up to five minutes; past that the API answers 202 with a run_id, which scrapers.getRun polls. Output

runAsync

scrapers.runAsync Run a scraper asynchronously; answers a run_id to poll Risk: read
Input Extractor scrapers accept up to 100 URLs and fan out into one aggregated run; agentic scrapers take a single URL. Output