Account Metrics & Usage
Account Metrics & Usage
Check your plan quota, usage, and account status with /account/v{N}/metrics
Account Metrics & Usage
Check your plan quota, usage, and account status with /account/v{N}/metrics
GET /account/v{N}/metrics returns the current usage and quota for
the API key you pass. Replace {N} with the API version your key is
on (v10–v60). Use it to show an in-app dashboard, set up alerting
before you run out of quota, or debug an unexpected 108 by confirming
your plan limits.
This endpoint reports plan quota: the total requests your plan
includes and how many you’ve used. It’s a different thing from the
per-minute rate limit (which is request_rate and is documented on
Rate Limiting & Errors). You can burn
through your monthly quota without ever tripping the per-minute limit,
and vice versa.
Pass your API key as a query parameter (or as X-API-Key header) to
GET /account/v{N}/metrics (examples below use v60):
Older API versions split the counters into core_* (tax lookups) and
geo_* (geocoded lookups). All new keys use the v60 shape. If you’re
still on a legacy key, you’ll see:
For v60 keys the counters are unified. Every lookup counts against
request_limit, regardless of whether it was by address or by
coordinates.
Poll once when the page loads, not on every render:
Check metrics on a schedule (hourly or daily is plenty) and page your team when you cross a threshold:
If you’re getting 108s but your plan shouldn’t hit the rate limit,
/account/v{N}/metrics can confirm your key is active and reachable.
Remember: 108s come from the per-minute request_rate, not from
request_limit, so a low usage_percent here doesn’t rule out a 108.
Check the X-RateLimit-Limit header on the 108 response instead.
The /account/v{N}/metrics endpoint uses the same API key auth as
/request/v*: either X-API-Key header or key= query parameter.
If the key is missing, you’ll get an HTTP 400 with a short error body:
If the key is valid but not found in Ziptax’s account database, the
response is still HTTP 200 with zeros across the board and
is_active: false. Check is_active before trusting the numbers.