Get current-period API usage totals
const url = 'https://app-api.landinsights.co/api/public/v1/usage/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app-api.landinsights.co/api/public/v1/usage/ \ --header 'Authorization: Bearer <token>'Returns the caller’s API token usage for the current billing period: tokens used, tokens included with their tier, any overage and its dollar cost, and the period boundaries. A compact, fixed-size response.
For a per-endpoint / per-day breakdown of where the tokens went, use get_usage_breakdown instead.
Cost: free.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Current-period API token usage totals for the authenticated caller.
When the caller has no active API add-on contract, tier is null and
every numeric field is 0.
object
The caller’s current API tier (e.g. starter, growth, scale). Null when no API add-on contract is active.
Tokens consumed so far in the current billing period.
Tokens included with the caller’s tier each billing period.
Tokens used beyond the included allotment — max(0, tokens_used - tokens_included).
Cost of the overage tokens so far, in US cents.
Start of the current billing period (ISO 8601). Null when no contract is active.
End of the current billing period, when usage counters reset (ISO 8601). Null when no contract is active.
Examples
Starter tier, mid-period
[ { "tier": "starter", "tokens_used": 4120, "tokens_included": 30000, "tokens_overage": 0, "overage_amount_cents": 0, "period_start": "2026-06-01T00:00:00Z", "period_end": "2026-07-01T00:00:00Z" }]Validation error.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}Missing or invalid credentials.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}A Pro subscription or higher API tier is required.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}Authenticated but not permitted.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}Resource not found.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}Rate limit exceeded.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}Internal error.
object
object
Stable machine-readable error code. One of: unauthorized, forbidden, subscription_required, tier_upgrade_required, usage_limit_exceeded, payment_required, validation_error, not_found, method_not_allowed, rate_limited, internal_error.
Human-readable description of the error.
Echoes the request’s X-Request-Id (or a server-issued id). Quote it in support requests.
Present on validation errors only: maps each rejected field to its list of messages.
object
Example generated
{ "error": { "code": "example", "message": "example", "request_id": "example", "details": {} }}