Skip to content
oslew
Get a free key

Learn

Rate limits vs quotas

A rate limit caps how fast you may send requests — so many a second, with a short burst allowed on top — and it never runs out: slow down and capacity returns within seconds. A quota caps how many requests you may send in a period, such as a day or a month, and once it is spent you stop, or pay overage, until it resets. Many APIs apply both. oslew sells only the rate: a sustained requests-per-second and a burst per product, with no monthly quota.

Last reviewed

The two words are used loosely, sometimes by one provider on one page, but they describe different limits with different consequences. Getting them straight tells you what an error means, how to write a client that recovers from it, and what a pricing plan is really selling.

Two limits, two questions

A rate limit answers the question how fast? It is stated per second or per minute, it is enforced continuously, and nothing is used up: a client that has been refused only has to slow down, and capacity returns within seconds.

A quota answers the question how many? It is a count over a period — a day, a month — and once it is spent it stays spent until the period resets or you buy more. A client that exhausts a quota cannot fix the problem by waiting a few seconds.

Many APIs apply both: a provider can sell a monthly or daily quota and still cap the speed at which it is consumed, to protect its servers from any one customer’s burst. The distinction matters because the two fail differently. A rate limit fails briefly and often; a quota fails rarely and for a long time.

Rate limit Quota
Measures Requests per second or per minute Requests per day or per month
When you reach it Refused for seconds, then admitted again Refused, or billed as overage, until the period resets
What it protects The service’s capacity at every moment The provider’s revenue, or your budget
What a client should do Pace itself and retry after the stated delay Stop, upgrade, or wait for the reset
What it makes you plan for Your busiest second Your busiest day or month

How a token bucket works

Many rate limits, oslew’s included, are enforced with a token bucket. The bucket holds a fixed number of tokens and is topped up at a steady rate. Each request takes a token, and a request that finds the bucket empty is refused. Two numbers describe it: the sustained rate, how fast tokens return, and the burst, how many the bucket holds when it is full.

oslew applies the model per key and per product: Each key has one token bucket per product, with a sustained rate and a burst, and there is no monthly quota. On the Address plan the bucket holds 100 tokens and refills at 20 a second. A key with a full bucket can send the whole burst at once and every request passes. The next one is refused, because the bucket is empty. A fraction of a second later — the time the sustained rate takes to return one token — another request passes; after a full second, 20 more do; once the bucket has had time to refill completely, the whole burst is available again. A client that sends evenly at the sustained rate is never refused at all.

The burst exists for moments when an application genuinely needs several answers at once: a form that geocodes and validates on submit, a page that labels several map pins together. It is not extra capacity for a loop. A loop that runs flat out spends the burst in its first instant and then runs at the sustained rate anyway, with refusals in between. Every request takes one token whatever its size, so a large travel-time matrix costs the same token as a single geocode, within the plan’s cap on matrix size.

What a 429 should tell you

HTTP 429 Too Many Requests is the standard status for a client sending faster than it may. A well-behaved API sends it with a Retry-After header saying how long to wait. oslew’s rule for it: A request that finds its bucket empty is refused with 429 and a Retry-After in whole seconds, never less than one. The body names the product whose bucket is empty, and the refused request takes nothing from the bucket.

Where an API also enforces a quota, a refusal can mean something else entirely — that the allowance is spent, and the right wait is hours rather than seconds. Providers document their status codes differently. Mapbox, for one, describes its limit on speed like this: The default Geocoding API rate limit is 1,000 requests per minute, adjustable per account; requests over it receive HTTP 429. (Mapbox, read 24 Sep 2026) A client that treats every refusal as transient will keep knocking on an exhausted quota, and one that treats every refusal as final will give up on a limit that would have cleared in a second. Read the Retry-After value and the body before deciding which you have.

Headers that show your headroom

A refusal is the late signal. The early one is in the headers of every admitted request, which on oslew work like this: Admitted requests carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset, with X-RateLimit-* aliases. RateLimit-Limit is the sustained rate the key was sold. RateLimit-Remaining is the whole tokens left after this request. RateLimit-Reset is the number of seconds until the bucket is full again — not the time to a new period, because nothing resets on a clock; the bucket refills continuously. A client that watches Remaining can ease off before it is refused rather than after.

The header names follow the IETF draft for rate-limit fields. They are not sent by the routes that need no key, nor on a refusal that happens before any bucket is consulted: a missing or unknown key, or a plan that does not include the product. The rate limits guide lists the cases.

How quotas look elsewhere

Providers that sell allowances define them in their own units, and it is worth reading those definitions exactly. LocationIQ’s plans are built like this: Monthly or annual plans with a daily request quota (a monthly one on Growth Plus and Business Plus), where one request credit is one API call or one map view; paid plans have soft limits of up to an extra 100% of the daily quota. (LocationIQ, read 24 Sep 2026) Geoapify’s are built this way: Monthly plans priced in daily credits, where one simple request (geocoding, places, routing) costs one credit; daily quotas are soft, and paid plans carry a 99.5% monthly availability SLA. (Geoapify, read 24 Sep 2026) An allowance does not remove the cap on speed. Geoapify’s, for example: The Free plan allows up to 5 requests a second and paid plans up to 30; Geoapify says it generally does not throttle above the limit but may restrict sustained overuse. (Geoapify, read 24 Sep 2026) Google’s per-request plans carry a default ceiling on speed as well, under a name that adds to the confusion: Geocoding API v4 methods have a default quota of 25 queries per second; a higher quota can be requested. (Google Maps Platform, read 24 Sep 2026)

That last example shows why the vocabulary is slippery: the same word is used for a per-second ceiling and for a monthly allowance. When comparing providers, translate every limit into the two questions — how fast, and how many — and ask which one your traffic will meet first. How geocoding API pricing works sets the pricing models side by side.

Writing a client that respects a rate

  1. Pace, do not probe. For bulk work, send at the sustained rate from the start instead of firing as fast as possible and catching refusals. The burst is for spikes; a loop that lives in it spends it on itself.
  2. On a 429, wait what you were told. Sleep for the Retry-After value, then retry. Cap the attempts, and add a small random delay when several workers share a key, so they do not all come back in the same instant.
  3. Decide what may wait. A background job should wait and retry. A request a person is waiting on should usually fail fast and say so, because nobody sits through a queue of retries.
  4. Share one limiter per key. The rate belongs to the key, not to the process, so ten workers each pacing to the full rate will together send ten times too fast. On oslew the rate is also shared across the service’s own servers: Behind a fleet of pods a key’s rate is shared between them — each pod reports what it spent every two seconds and serves its share — so the rate is sold once, not once per pod.
  5. Hand large jobs to the service. A file of addresses is better sent as a batch job, which the service paces at the key’s own address rate and which reports how long it has left. A batch draws on the same bucket as interactive requests sent with that key, so schedule large jobs for quiet hours.
Pace a loop to the sustained rate and honour Retry-After (TypeScript)
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));

// One request, retried after 429 as long as the server asks, a bounded number of times.
async function call(url: string, key: string, attempts = 4): Promise<Response> {
  for (let i = 1; ; i++) {
    const res = await fetch(url, { headers: { Authorization: 'Bearer ' + key } });
    if (res.status !== 429 || i >= attempts) return res;
    const wait = Number(res.headers.get('Retry-After')) || 1;
    // A little jitter stops workers sharing a key from retrying in the same instant.
    await sleep(wait * 1000 + Math.random() * 250);
  }
}

// A backfill loop: space requests at the sustained rate the key reports.
async function backfill(urls: string[], key: string) {
  let rate = 1;
  for (const url of urls) {
    const started = Date.now();
    const res = await call(url, key);
    rate = Number(res.headers.get('RateLimit-Limit')) || rate;
    await sleep(Math.max(0, 1000 / rate - (Date.now() - started)));
  }
}

Retrying a server error is a different case. There is no Retry-After to say when the service will recover, so back off exponentially instead; the errors reference lists which statuses are worth retrying at all.

Why oslew sells only rate

oslew’s plans are rates and nothing else: a sustained rate and a burst for each product, with no monthly quota on any tier. The reasons are practical. A rate makes the bill independent of traffic you do not fully control — autocomplete keystrokes, retries during an incident, a backfill, a bug that repeats requests — because none of it is counted. It makes every refusal transient: a 429 always means slow down, never you have run out. And it matches what serving costs, since a provider has to be ready for the busiest second rather than for the month’s total.

The trade-off is real. You choose your peak in advance and pay for it in quiet months too, and there is no overage to absorb a spike beyond the plan: traffic above the rate waits. The Free plan is 1 requests a second sustained, burst 5, the Address plan is 20 requests a second sustained, burst 100, and the pricing page lists the rest. Sizing a rate for a large deployment — many workers, several products, bulk jobs beside interactive requests — is the subject of capacity planning.

Limits and caveats

  • A fleet-wide rate is approximate. The service’s servers exchange what each key has spent at short intervals, so for a brief window a key can be served more than its rate. Nothing promises an exact figure.
  • RateLimit-Limit is rounded to a whole number of requests a second.
  • Each product has its own bucket. On a plan with several products, saturating routing does not slow geocoding — and spare routing capacity cannot be lent to geocoding either.
  • Other providers’ limits are quoted as read, on the date shown beside each one, and they change.

Bottom line

A rate limit is a speed limit that never runs out; a quota is an allowance that does. Clients that pace themselves, honour Retry-After and watch their remaining headroom work well under either. When comparing providers, ask both questions — how fast and how many — and notice which one your traffic reaches first. oslew answers only the first: a rate per product, and nothing to count.

Questions

Is a rate limit the same as a quota?

No. A rate limit caps how fast you send, per second or per minute, and nothing is used up: slow down and capacity comes back within seconds. A quota caps how many requests you may send in a day or a month, and once spent it stays spent until the period resets or you pay for more.

What should my client do when it receives HTTP 429?

Wait the number of seconds in the Retry-After header, then retry, with a cap on attempts and a little random delay if several workers share one key. If the refusal is for a spent quota rather than a rate, waiting seconds will not help, so read the response body to tell which you have.

What is a burst in API rate limiting?

The burst is how many requests a client may send at once above its sustained rate — the size of the token bucket. It covers genuine moments of parallel work, such as a form that geocodes and validates together, and it refills at the sustained rate once spent.

Does oslew have a daily or monthly request limit?

No. Every plan is a sustained rate and a burst for each product it includes, and there is no monthly quota on any tier. The only limit is how fast requests arrive, so a spike is refused for a few seconds rather than a month being cut short.

How do I geocode a large file without running into the rate limit?

Send it as a batch job. The service paces the rows at your key’s own address rate, tells you how long the job will take, and keeps it safe if a server goes away. If you loop in your own code instead, pace to the sustained rate rather than sending flat out and catching refusals.

Browse every page →