Stream EstateStream Estate
CompteUtilisation de l'API

Get billable API usage analytics

Returns billable API usage aggregates for the authenticated API customer.

GET
/account/api-usage
X-API-KEY<token>

Value for the X-API-KEY header parameter.

In: header

Query Parameters

startDate?string

Start of the reported period, included. A bare date such as 2026-08-01 means the start of that day in UTC. Cannot be in the future. Defaults to 30 days before the end.

Formatdate-time
endDate?string

End of the reported period, excluded. A bare date such as 2026-08-31 covers that whole day in UTC. Never later than now. Defaults to now.

Formatdate-time
apiKeyId?string

Filter by API key id owned by authenticated user.

Formatuuid
granularity?string

Time grouping granularity.

Default"DAY"

Value in

  • "YEAR"
  • "MONTH"
  • "DAY"
groupBy?string

Split each time series bucket by this dimension. Rows then carry the matching group fields.

Value in

  • "API_KEY"
  • "ROUTE"
  • "CHANNEL"
channel?string

Only count calls issued through this channel.

Value in

  • "DIRECT"
  • "MCP"

Response Body

curl -X GET "https://example.com/account/api-usage"
{  "period": {    "start": "2026-01-15T00:00:00Z",    "end": "2026-02-15T00:00:00Z",    "granularity": "DAY"  },  "totals": {    "calls": 48230,    "results": 1264870,    "credits": 48230  },  "timeSeries": [    {      "period": "2026-01-15",      "calls": 1620,      "results": 42180,      "apiKeyId": "7c1f0e8a-2b6d-4f3a-9e1c-5a8b2d4f6c10",      "apiKeyName": "Production backend",      "route": "/properties",      "routeType": "search",      "channel": "DIRECT"    }  ],  "byApiKey": [    {      "apiKeyId": "7c1f0e8a-2b6d-4f3a-9e1c-5a8b2d4f6c10",      "apiKeyName": "Production backend",      "status": "active",      "calls": 31540,      "results": 820460    }  ],  "byRoute": [    {      "route": "/properties",      "routeType": "search",      "calls": 26310,      "results": 701920,      "credits": 26310    }  ],  "byChannel": [    {      "channel": "DIRECT",      "calls": 26310,      "results": 701920    }  ]}
Version 0.14.289Dernière mise à jour