Median

GET /billing/usage

Updated Oct 1, 20261 minute read

Read usage history

AI, email and scraping usage. One USD is 1,000,000 integer microcredits. Only customer charges and neutral labels are returned. Maximum date range is 366 days. Follow every cursor for complete history.

Part of Billing.

Parameters

NameInTypeRequiredDescription
fromquerynumberNoInclusive Unix timestamp in milliseconds; defaults to 30 days before the end.
toquerynumberNoInclusive Unix timestamp in milliseconds; defaults to now.
limitqueryintegerNoRecords per page.
cursorquerystringNoContinuation cursor. An empty filtered page may still have a continuation.

Responses

StatusDescription
200Local organization records.
401Invalid or missing credentials.
403The authenticated role cannot read these records.
429Shared organization API allowance or temporary fair-use protection reached. Retry-After states the delay.

200 body

FieldTypeRequiredDescription
pageobject[]Yes
isDonebooleanYes
continueCursorstringYes

Example request

curl https://api.median.sh/v1/billing/usage \
  -H "Authorization: Bearer $BEARER_AUTH"

Still need help?

    Esc