Usage
GET
https://api.locapi.eu/v1/usageWhat your account has used and spent this month, from the same counters that enforce your cap. Only the account of the key is visible.
Parameters#
No parameters. The API key decides which account you see.
Example#
curl -G "https://api.locapi.eu/v1/usage" \
-H "X-Api-Key: $LOCAPI_API_KEY"{
"period": "2026-09",
"resetAt": "2026-10-01T00:00:00Z",
"paidUsageEnabled": true,
"monthlyCapEur": 50,
"spendEur": 0.82,
"countries": [
{
"country": "NL",
"billingClass": "paid_only",
"billableCount": 41,
"freeAllowance": 0,
"freeRemaining": 0
}
],
"requestId": "req_0192b0c4-…"
}Response fields#
Response
periodstring- The current UTC month (yyyy-MM).
resetAtstring- When the counters start again: the first of next month, 00:00 UTC.
paidUsageEnabledboolean- Whether paid usage is on for this account.
monthlyCapEurnumber | null- Your monthly spend cap in euros (excluding VAT), or null without one.
spendEurnumber- Billed so far this month, in euros (excluding VAT).
countriesCountryUsage[]- One row per country with usage this month; countries without usage are left out.
requestIdstring- The id of this request, also in the X-Request-Id header.
CountryUsage object
countrystring- ISO 3166-1 alpha-2.
billingClassstring | null- paid_only or free_coverage.
billableCountinteger- Billed addresses this month in this country.
freeAllowanceinteger- Free addresses per month in this country (0 where every address is paid).
freeRemaininginteger- Free addresses left this month.
Errors#
| Status | code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Invalid API key |
| 403 | account_blocked | Account blocked |
| 429 | fair_use_exceeded | Fair use exceeded |
| 429 | quota_exceeded | Free allowance used |
| 429 | rate_limit_exceeded | Rate limit exceeded |
| 429 | spend_cap_reached | Monthly spend cap reached |
Good to know#
- Not billed, but it counts towards your rate limit.
- The current UTC month only, and only countries with usage this month.
- Amounts are in euros, excluding VAT.