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 doesn’t exist / has been revoked.
Fix:
- Confirm the key is the UUID-style ZapFetch key copied from Dashboard → API keys (not a Firecrawl Cloud key).
- Check it hasn’t been revoked in Dashboard → API keys.
- Make sure you’re hitting
api.zapfetch.com, not a stale hostname.
402 — Payment Required
404 — Not Found
429 — Too Many Requests
See the full treatment in Rate limits. Always honor theRetry-After response header.
500 — Internal Server Error
- Retry once with backoff; most 500s are transient.
- If it persists for a specific URL, the target site may be actively
blocking scrapers — try enabling
stealth/ alternate user agents on the request. - If a whole endpoint is consistently failing, check status.zapfetch.com and report it.
Debugging tips
- Log the full response envelope —
errorandmessagealmost always tell you exactly what’s wrong. Treating every failure as a generic network error hides the real cause. - Reproduce with curl first. If curl fails, it’s a backend/key issue; if only your SDK fails, it’s a client-side integration issue.
- Check the Console’s Usage page. Sudden drops in successful calls are often credit or rate-limit issues rather than outright bugs.