Quavsit is metered in units, counted per calendar month in UTC.
Call | Units |
Any read endpoint | 1 |
| 5 |
Each | 1 |
| 0 |
Units are charged only after a successful response. A request that fails costs nothing.
Reading your own meter
Three headers come back on every response:
Header | Value |
| Units charged by this call |
| Units left this month, or |
| When the monthly counter resets |
GET /usage gives the full picture, and the account page shows this period, the last seven days, and usage per key.
Spending less
Use conditional requests. Static resources — networks, lines, stops, shapes — carry an
ETag. SendIf-None-Matchand a304 Not Modifiedcosts no units.Respect the cache headers. Every response carries
Cache-Controlwith the TTL of its freshest source: 10 to 20 seconds for real-time, 300 seconds for static data. Polling faster than that buys nothing but units.Ask for an area rather than each platform. An area aggregates the departures of all its stop points in one call.
Journeys cost five. Cache a result you are going to show twice.
The same units pay for everything
API keys, departure boards and embedded widgets all spend the same monthly units, from the same plan, under the same overage setting and the same spend cap. A board refreshing every 30 seconds is competing with your API calls for the same budget.
The per-minute limit is separate
Requests are also counted per minute, per account. Exceeding the plan's figure is refused with a Retry-After header, and nothing is charged. The window is a rolling one, so spread traffic rather than batching it at the top of the minute.
If the figures do not add up
Compare X-Quavsit-Units on your own calls with the per-key usage on the account page. A gap between them is a board or a widget spending the same budget.
Quavern help reference: quavsit-units/en
