Skip to main contentSkip to navigation
← Back to documentation

Error Reference

All error responses follow this format:

Error Reference

All error responses follow this format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description.",
    "doc_url": "https://buywhere.ai/docs/errors#ERROR_CODE"
  }
}

Error Codes

400 — Bad Request

CodeDescription
INVALID_PARAMETERA parameter has an invalid value.
MISSING_REQUIRED_FIELDA required field is missing from the request.
INVALID_QUERYThe q query parameter is missing or empty.
INVALID_MARKETThe specified country code or region is not supported.
INVALID_CATEGORYThe category name or slug is not recognized.
INVALID_PAGINATIONInvalid limit, offset, or page value.
INVALID_JSONThe request body is not valid JSON.

Example:

{
  "error": {
    "code": "INVALID_QUERY",
    "message": "Query parameter is missing or empty.",
    "doc_url": "https://buywhere.ai/docs/errors#INVALID_QUERY"
  }
}

401 — Unauthorized

CodeDescription
MISSING_API_KEYNo API key was provided. Include Authorization: Bearer <key>.
INVALID_API_KEYThe API key does not exist or is malformed.
REVOKED_API_KEYThe API key has been revoked (e.g. after rotation).

Example:

{
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key is required. Pass as Authorization: Bearer <key>.",
    "doc_url": "https://buywhere.ai/docs/errors#MISSING_API_KEY"
  }
}

403 — Forbidden

CodeDescription
INSUFFICIENT_SCOPEYour tier does not support this endpoint. Upgrade your plan.
ENDPOINT_DISABLEDThis endpoint is temporarily disabled.
FORBIDDENAccess denied.

Example:

{
  "error": {
    "code": "INSUFFICIENT_SCOPE",
    "message": "API key does not have the required scope for this endpoint.",
    "doc_url": "https://buywhere.ai/docs/errors#INSUFFICIENT_SCOPE"
  }
}

404 — Not Found

CodeDescription
NOT_FOUNDThe requested resource (product, category, etc.) does not exist.

405 — Method Not Allowed

CodeDescription
METHOD_NOT_ALLOWEDThe HTTP method is not supported for this endpoint.
ENDPOINT_DEPRECATEDThis endpoint has been deprecated. Check docs for the replacement.

429 — Rate Limit Exceeded

CodeDescription
RATE_LIMIT_EXCEEDEDYou have exceeded your tier's rate limit.

The response includes retry information:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Per-minute rate limit exceeded.",
    "doc_url": "https://buywhere.ai/docs/errors#RATE_LIMIT_EXCEEDED"
  },
  "rate_limit": {
    "retry_after": 45,
    "limit": 60,
    "remaining": 0,
    "reset_at": "2026-05-16T14:45:00Z"
  }
}

How to handle: Wait retry_after seconds before retrying. Use exponential backoff starting at 2 seconds. See Authentication for a retry code example.

422 — Validation Error

CodeDescription
VALIDATION_ERRORThe request data failed validation. Check required fields and formats.

500 — Internal Server Error

CodeDescription
INTERNAL_ERRORAn unexpected error occurred. Retry after a brief delay.

502 — Bad Gateway

CodeDescription
UPSTREAM_ERRORAn upstream service failed. Retry after a brief delay.

503 — Service Unavailable

CodeDescription
SERVICE_UNAVAILABLEThe service is temporarily unavailable. Retry after a brief delay.

HTTP Status Code Summary

StatusMeaningAction
200SuccessProcess the response
400Bad requestFix the request parameters
401Authentication failedCheck your API key
403ForbiddenUpgrade your tier or check permissions
404Not foundVerify the resource ID
405Method not allowedUse the correct HTTP method
429Rate limitedBack off and retry
422Validation errorCheck request body format
500Server errorRetry with backoff
502Upstream errorRetry with backoff
503UnavailableRetry with backoff

Get the best deals weekly

Price drops, new markets, and AI shopping tips — straight to your inbox.