2,500 free credits — no credit card required. Start building

SenseCollect logoSenseCollect
  • Sources
  • Solutions
  • Pricing
  • Tools
  • Blog
  • About
DocsGet API key
SourcesSolutionsPricingToolsBlogAboutDocs
Get API keyLog in
Reference · Errors

API error codes

Every error the API returns, what causes it, and the fix. Eight codes total — if you got something not on this page, it did not come from us.

Get API keyRead the docs

8 codes · stable across v1 · switch on code, not message

Errors come back with the same envelope as every other response: `success: false`, a `request_id`, and an `error` object holding `code`, `message`, and sometimes `details`. Branch on `code`, never on the message text — messages get reworded, codes do not.

The HTTP status is derived from the code, so either one is safe to switch on. A 402 always means credits, a 502 always means the source, and a 504 always means the run outlived its budget.

8 entries
  • Authentication2
  • Request2
  • Billing1
  • Upstream and timeouts3

Authentication

Both codes return 401. Neither is retryable — the key has to change.

missing_api_keyHTTP 401auth

No API key was sent with the request.

Cause
The Authorization header was absent, empty, or malformed. The most common version of this is sending the key as a bare string with no `Bearer ` prefix, or letting an empty environment variable interpolate into the header.
Fix
Send `Authorization: Bearer YOUR_API_KEY`. Check the variable actually resolved before the request went out — an unset env var produces a header that looks present and carries nothing.
invalid_api_keyHTTP 401auth

The key was sent but does not match an active key.

Cause
The key was revoked, deleted, or belongs to a different account. Copy-paste truncation is the other frequent cause: keys are long enough that a partial selection still looks plausible.
Fix
Issue a fresh key from the dashboard and replace it in your environment. Keys are shown once at creation — if you cannot find it, mint a new one rather than guessing.

Request

The call reached us and the parameters did not survive checking.

invalid_requestHTTP 400user-error

A parameter is missing, the wrong type, or out of range.

Cause
A required parameter was omitted, a limit exceeded the endpoint maximum, or a boolean arrived as something other than `true`/`false`. The `details` object names the offending parameter.
Fix
Read `error.details` — it names the field. Check the parameter against the endpoint reference, particularly the `limit` ceiling, which differs per source.
not_foundHTTP 404user-error

The path or the referenced record does not exist.

Cause
Either the endpoint path is wrong, or a job id, watch id, or lead id in the path belongs to another account or has been deleted.
Fix
Confirm the path against the source catalog at `/v1/sources`. For record lookups, confirm the id came back from this same API key — ids are scoped to the account that created them.

Billing

One code, and it is the only one that means the request was well-formed but could not be paid for.

insufficient_creditsHTTP 402billing

The balance cannot cover the hold for this run.

Cause
Credits are held against the limit you asked for, not the rows you end up with. Asking for 200 rows holds the cost of 200 rows even when the search only has 40 to give, so a balance that would cover the real result can still fail the hold.
Fix
Either top up, or lower `limit` so the hold fits the balance. The unused portion of a hold is returned automatically once the run settles, so a smaller limit is not a smaller result per credit.

Upstream and timeouts

The request was valid and the source is what failed. These are the retryable ones.

upstream_failedHTTP 502retry

The source refused or broke mid-run.

Cause
The underlying site rate-limited the collection, changed its markup, or returned nothing usable. Credits held for a failed run are refunded before the response is written, so a 502 never costs anything.
Fix
Retry with exponential backoff, starting at one second and doubling to a ceiling of thirty. Every response carries a request_id — quote it if you need to ask about a specific run. If the same query fails three times running, the source layout has probably changed — that is ours to fix, not yours.
timeoutHTTP 504retry

The run outlived the synchronous request budget.

Cause
Large limits with enrichment turned on can exceed the window a synchronous HTTP request gets. This is a property of the request shape, not a fault.
Fix
Pass `async=true` and poll the job id instead. Any call you expect to return more than about a hundred enriched rows should be async from the start.
internal_errorHTTP 500retry

Something broke on our side.

Cause
An unhandled fault in the API layer. This one is always a bug, never a configuration problem.
Fix
Retry with exponential backoff, starting at one second and doubling to a ceiling of thirty. Every response carries a request_id — quote it if you need to ask about a specific run. If it persists, send the request_id to support — it resolves the exact run in our logs.

Practices that prevent most of this

Switch on code, not message

The `code` values on this page are stable and safe to branch on. The `message` strings are written for humans and get reworded without notice.

Retry only 502, 504, and 500

The auth, request, and billing codes describe a state that will not change on its own. Retrying them burns your rate limit and returns the same answer.

Keep the request_id

Every response carries one, success or failure. Logging it turns a support conversation from a description into a lookup.

Go async before you need to

Async is not a failure path. Any run with a large limit and enrichment on should use it by default rather than waiting for a 504 to force the change.

More references
Google Maps data errorsWhy a Google Maps pull returns fewer rows than expected, and why phone, email, or website comes back empty. Each cause with the parameter that fixes it.Amazon review data errorsWhy an Amazon review pull returns fewer reviews than the product shows, and why review dates or ratings come back empty. Causes and fixes.TikTok data errorsWhy a TikTok pull returns fewer posts than expected and why metrics or author fields come back empty. Each cause with its fix.
sensecollect/
SenseCollect logo

The local lead data API. One key, one unified schema, priced by the rows you get back.

No subscriptionCredits never expireNo per-call minimumRefund on failed runs

API

DocumentationResponse schemaMCP serverExplorerCatalog (JSON)Error codesChangelog

Sources

MapsAmazon reviewsTikTokAll sources

Guides

Leads by niche & cityLocal business leadsRestaurant leadsNo-website leadsExport Maps dataExport Amazon reviewsAuf Deutsch

Company

PricingComparisonsSolutionsToolsBlogAboutContact

Account

Get API keyLog inAPI keysCredits

© 2026 SenseCollect

Public data only. Review every response before you act on it.