Skip to content

Rate limits

The API meters requests per minute, and history requests again per hour. Both are read off every response that carries them and exposed on the client.

None means the server did not say, never "nothing left". An unmetered plan advertises no figures, and neither does a publicly cacheable response, because the numbers are per-caller and a shared cache would hand one caller's budget to another. Anonymous calls therefore carry nothing; calls made with a key do.

Both meters. Reached as client.rate_limit.

One meter's state, as of the last response that mentioned it.

Every field is optional because every field can be legitimately absent: an unmetered plan advertises nothing, and neither does a publicly cacheable response.

exhausted property

exhausted: bool

True only when the server SAID there is nothing left.

An unknown remaining is not exhaustion. Treating it as such would make an anonymous caller, whose responses never carry figures, wait forever.

seconds_until_reset

seconds_until_reset(now: float | None = None) -> float | None

How long is left of the window, counting down from when we read it.

reset is a relative value frozen at observed_at; using it later without ageing it is how a client waits far longer than it needs to.