Account & Billing
Agrégation de facturation
Somme les dépenses d’une période et les découpe par jour, app ou credential.
GET
Agrégation de facturation
GET https://api-datahub.octoparse.com/v1/billing
Authentication: API key required (Authorization: Bearer <API Key>).
How much you spent in a period, and where. Independent of the account identity endpoint.
The time range uses the same vocabulary as List runs: created_from / created_to are inclusive/exclusive ISO-8601 absolute times keyed by run start time. Pass the same bounds into List runs to drill into the runs behind any group total. tz_offset only decides which local day a run lands in for day buckets; it does not change amounts or the absolute range itself.
Only data fees are aggregated. Day groups ascend for reconciliation; app and credential groups descend by amount so the largest spend shows first.
The credential breakdown answers “how much did each of my keys spend?”. The key is a non-sensitive stable credential id, the same value used by the List runs credential filter. Scope is always your account; you never see someone else’s credentials.
Request
Query parameters
string
défaut:"day"
Breakdown dimension:
day (default), data_app, or credential.string
Inclusive start. Omit to start from the earliest run.
string
Exclusive end. Omit to include up to now.
integer
défaut:"0"
Day-bucket timezone offset in minutes from UTC. Use
480 for China Standard Time; default 0 is UTC days. Fixed offset only (no DST). Drill-down created_from / created_to must use the same offset. Range -720 to 840.Example request
Response
200 success
data. Fields:
number
Period total; equals the sum of group
amount values.string
Currency.
string
Dimension actually used.
object[]
Group rows. Every dimension field is present; unused ones are
null.Errors
Error responses use
{"error": {code, category, message, retryable}}. See Errors.