ScraperAPI Credit Cost Pre-Flight for AI Agents: The Cost Lookup Endpoint, the Cost Header, and the Ultra Premium Cache

Last fact-checked: November 17, 2026

Advertising disclosure: we may receive a commission if you sign up through the ScraperAPI † links marked † in this article, at no extra cost to you. We have not run production workloads on ScraperAPI; everything below comes from its official documentation. See our Advertising Disclosure.

Note on experience: we have not called ScraperAPI, read a real sa-credit-cost header or measured any bill. The documentation pages were fetched as raw page text on November 17, 2026. Check the live docs before relying on any statement. "Not stated" means the page we read did not say.

An AI agent that calls ScraperAPI † decides, request by request, whether to add render, premium or ultra_premium. Each choice changes the credit cost, and the docs publish three tools for seeing that cost: a lookup endpoint before the call, a response header after it, and a max_cost cap during it. This article puts those tools in an order an agent could follow, lists which parameters cost extra, and flags what the docs leave open. For the unit prices themselves, see our credit comparison with ScrapingBee; for the cap and async jobs, see our article on max_cost and async jobs.

1. What a request costs, according to the docs

The "Credits and Requests costs" page says the amount of credits consumed "depends on the domain and parameters used with your request". Two layers are described:

The page does not say how the domain layer and the parameter layer combine. For example, it does not say whether a Google SERP request with render=true costs 25 + 10, 25 × something, or one fixed figure. That matters for an agent, because it means the sum cannot be computed from the docs alone.

2. Parameters that cost extra, and parameters that do not

The same page lists the "Extra Cost" parameters as follows:

And these as "No Extra Cost": wait_for_selector, country_code, session_number, device_type, output_format, keep_headers and autoparse.

Two rules from the Supported Parameters page narrow the choices. premium and ultra_premium cannot be combined, and session_number cannot be combined with either of them. An agent that wants a sticky session on a hard site therefore has to choose between the session and the stronger proxy pool. The sticky-session page adds that sessions expire 15 minutes after last use.

Note one inconsistency inside the docs: the Supported Parameters page describes screenshot=true as automatically enabling JavaScript rendering, but it does not give a price. The cost page gives 10 credits and does not say whether that is on top of the render charge. We mark this "not stated".

3. Step one: look the cost up before calling

The cost page points to two ways to check a URL's cost before scraping: the Domain Multiplier tool in the dashboard, and an API endpoint, https://api.scraperapi.com/account/urlcost, which takes api_key, url and the same parameters as a scrape (the example uses render=true). The page says all ScraperAPI parameters are supported by it.

For an agent this is the cheapest guard available, because the check happens before any scrape credits are spent. What the docs do not state: the format of the response, whether the lookup itself consumes credits, and whether it is rate limited. We did not call it. An agent builder should test those three points with a real key before relying on it.

4. Step two: read the header after calling

The same page says the response headers of each request contain sa-credit-cost, "which shows the API Credit cost of that request". An agent can log this value per call and keep a running total, then compare it with the account endpoint: the Credit Usage page documents GET /account returning usage data in JSON, including concurrency and request counts (the exact fields are not listed on the page). The dashboard's domain report also lists parameters used and credits per domain per date.

5. Step three: cap the call

max_cost sets the maximum credits per scrape. If the cost would exceed it, the API returns 403 with the message "This request exceeds your max_cost". The docs show it for sync requests, async jobs (apiParams) and proxy mode (scraperapi.premium=true.max_cost=5). Our earlier article covers the 403 ambiguity: the status-code page uses 403 for an exhausted monthly allowance, so the body text is what separates the two cases.

Practical ordering for an agent: look up the cost, compare it with the task budget, send the call with max_cost set to that budget, then record sa-credit-cost. All four steps are documented individually; the docs do not describe them as one workflow, and that ordering is our suggestion.

6. The Ultra Premium cache

The Cached Responses page says that for requests with ultra_premium=true, cached responses are served "whenever available", enabled by default, with a cached value "no older than 10 minutes". Adding cache_control=no-cache forces uncached data, and cached responses carry the header sa-from-cache: 1.

Two consequences for agents. First, a repeated Ultra Premium call within ten minutes may return the same page, so an agent that expects fresh data (prices, stock, rankings) should set cache_control=no-cache or check the header. Second, the docs never say whether a cached response is billed at the full Ultra Premium rate, a reduced rate or not at all. We could not find that answer on the cache, cost or premium-pool pages. Until it is confirmed with a real call, budget as if it is billed in full.

7. Billing for failures and the 70-second window

The cost page says the service only charges for successful requests (200 and 404) and for requests cancelled from your side before the 70-second retry window ends. The status-code page says failed requests are retried for up to 70 seconds before a 500 is returned, and recommends a 70-second client timeout. So an agent that sets a shorter timeout and drops the connection can be charged for the request, as the cost page's wording reads. The same status-code page notes that a 200 containing a CAPTCHA should be reported to support, which then treats it as a ban in future; it does not say whether such a response is billed.

Accounts on custom deals may pay a higher credit count on Ultra Premium domains "to meet our minimum pricing", per a note on the cost page, so a published multiplier may not match a negotiated account.

8. A cautious pre-flight checklist

9. What we could not confirm

† Referral link (ScraperAPI). Related: ScraperAPI vs ScrapingBee credits, max_cost and async jobs, what you pay for failed scrapes, retry budgets, API chooser.

Sources (checked November 17, 2026)