- Every call spends credits. A request costs 1 credit with neither browser nor rendering, 2 with the browser but no JavaScript, 10 with full JavaScript rendering, and 25, 50 or 125 with the residential proxy. A Google domain costs 10 even without the browser. Each result carries
credits_costfrom theAnt-credits-costheader.account.usagecosts nothing. - The API answers 200 whatever the target page did. Read
page_status(fromAnt-page-status-code) onscrape.html, orstatus_codeonscrape.extended, before trusting the content. Only those two expose it:scrape.markdownandextract.dataconvert a target 404 as if it were a page. - The provider’s defaults are not the cheapest ones.
browserdefaults to true at 10 credits. Sendbrowser: falsefor a plain HTTP fetch at 1. - Browser-only options are rejected here, not ignored.
return_page_source,js_snippet,wait_for_selectorandblock_resourcedo nothing without the browser, so sending one withbrowser: falsefails before the request instead of silently applying nothing.return_page_source: truereturns the server HTML without running browser actions, sojs_snippetorwait_for_selectorbeside it fails the same way. js_snippetis base64. ScrapingAnt runs the decoded JavaScript; sending raw source is a422.Buffer.from('window.scrollTo(0,0)').toString('base64')is the shape expected.- A 403 has three meanings. The token is wrong, the plan’s credits are exhausted, or the caller’s IP is not on the account allowlist. The message tells them apart and the error exposes
isAuthError,isQuotaExhaustedandisIpBlocked, so a failure does not send you to re-enter a working key. - Retries. A 423 (the target detected the browser), a 404 (the site was unreachable or a worker timed out) and a 500 are retried a bounded number of times; a 409 on the free plan waits and retries; an exhausted balance, a bad token, an IP block and a
422are not retried. ScrapingAnt sends noRetry-After, so the delays are fixed rather than header-driven. extract.datais free-form.extract_propertiesis the prompt, and the answer is an object keyed by camelCased property names. A property the model cannot find comes back asnullrather than failing the call.- Chaining a session.
scrape.extendedreturns the page cookies incookies; pass that string to the next call’scookiesto keep the session. - No webhooks. ScrapingAnt does not send them.
- 5 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Convert a page to Markdown for an LLMWhat’s next
API reference
Every
scrapingant.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.