zenrows 402 insufficient credits, scrape run failed
This skill resolves ZenRows 402 insufficient-credits failures mid-run. It finds which request settings burn credits fastest and adds a pre-flight balance check so runs fail fast instead of truncating.
TL;DR
ZenRows 402 means the account ran out of credits mid-run, not that the key is invalid. Check the dashboard for remaining credits and per-request cost (JS rendering and premium proxies cost more), then either top up or rerun with cheaper request settings so the intel pipeline stops dying halfway.
The error
HTTP 402 Payment Required
{"error": "insufficient credits", "credits_remaining": 0, "request_cost": 25}Fix it
Open the ZenRows dashboard and confirm credits_remaining is zero and which plan the account is on. A 402 with credits left means a different billing problem. Expected: Expected: the dashboard shows 0 credits and the plan's credit allowance.
Check the request log for per-request cost. JS rendering, premium proxies, and autoparse each multiply cost, so one expensive setting can drain a plan fast. Expected: Expected: the log shows which parameter (js_render, premium proxy) is driving the cost per request.
For the immediate rerun, disable the most expensive options you do not need: turn off JS rendering for static press pages and use standard proxies where the target allows. Expected: Expected: the rerun's projected cost fits the remaining or renewed credit balance.
Add a pre-flight credit check to the pipeline: query the account balance endpoint before starting a batch and abort with a clear alert instead of dying mid-batch. Expected: Expected: future runs fail fast with 'insufficient credits for batch' instead of partial results.
When to use
- Your intel scrape dies partway with a ZenRows 402 and you get partial data.
- You need to find which request settings are burning credits fastest.
- You run scheduled scrapes that must fail fast on billing instead of silently truncating.
When not to use
- The error is 401 unauthorized - that is a bad API key, not billing.
- The error is 429 - that is rate limiting, not credits.
- You need more credits permanently - that is a purchasing decision, not a debugging one.
Why it happens
ZenRows meters every request against the account's credit balance, and expensive features cost multiple credits each. When the balance hits zero mid-batch, subsequent requests get 402. The run's partial results are valid; only the unfetched remainder is missing.
Variant phrasings
zenrows 402 insufficient credits
Same failure and fix; some searchers phrase the query this way.
zenrows payment required scrape failed
Same failure and fix; some searchers phrase the query this way.
Edge cases
- Credits sometimes take minutes to reflect after a top-up; a rerun launched instantly can still 402.
- Autoparse and AI extraction bill per request even when the target page returns an error.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_wVU66xqSbdtWIKCfZHz5MA