Every SportQuanta endpoint returns JSON in one of two top-level shapes. Once you handle these two, you handle the whole API.

Success envelope

Successful responses wrap the payload in a data key:
data is an object for single-resource reads and an array for list endpoints.

The _meta sidecar

Most data responses include a _meta object. It never affects your quota and is there purely for debugging and observability: Free catalog endpoints omit _meta entirely, collapsing to a bare { "data": ... }.

Error envelope

Errors wrap a machine-readable object in an error key:
  • code — a stable, snake_case identifier. Safe to switch on in code; it does not change across releases.
  • message — human-readable text. May change for clarity, so don’t match on it.
  • detailsnull, or an object with field-specific context (validation errors, rate-limit retry hints, etc.).
Branch your error handling on error.code, never on error.message.

HTTP status codes

Common error codes

These codes are stable across releases. Switch on them in code. See Rate Limits & Quota for the 429 codes and the details payloads they carry.

Empty results vs. errors

A list endpoint that finds no matching records returns 200 with an empty data array — not a 404. For covered leagues, an empty array can also mean the data hasn’t been ingested yet rather than that nothing exists. See Coverage → Data freshness for how to interpret this.