error field disambiguates between distinct failure modes that share a status.
401 — Unauthorized
Authorization: Bearer <ZapFetch API key> header is missing, malformed, or references a key that does not exist or has been revoked.
Fix:
- Confirm the key is the UUID-style ZapFetch key copied from Dashboard → API keys (not a Firecrawl Cloud key).
- Check that the key has not been revoked in Dashboard → API keys.
- Make sure you are sending requests to
api.zapfetch.comand not a stale hostname.
402 — Payment Required
404 — Not Found
429 — Too Many Requests
429 response shape, and recommended backoff strategies. Always honor the Retry-After response header.
500 — Internal Server Error
- Retry once with backoff — most 500s are transient.
- If the error persists for a specific URL, the target site may be actively blocking scrapers. Try enabling
stealthmode or alternate user agents on the request. - If an entire endpoint is consistently failing, check status.zapfetch.com and file a report.
Debugging tips
- Log the full response envelope. The
errorandmessagefields almost always identify the exact problem. Treating every failure as a generic network error hides the real cause. - Reproduce with curl first. If curl fails, the issue is on the backend or with your API key. If only your SDK fails, the problem is a client-side integration issue.
- Check the Console’s Usage page. A sudden drop in successful calls usually points to a credit exhaustion or rate-limit issue rather than an outright bug.