Limits and quotas
Two different things limit what a program can do: rate limits, which say how fast it can call the API, and quotas, which say how much the plan includes in a month.
Rate limits
Each API key has a limit of requests per minute (600 by default). Every response says where the key stands:
| Header | Content |
|---|---|
RateLimit-Limit | The requests allowed in the window. |
RateLimit-Remaining | The requests left in the window. |
RateLimit-Reset | The seconds until the window frees its oldest request. |
Beyond the limit the response is 429 with the code throttled and a Retry-After header: wait for that number of seconds before retrying.
The requests of all the keys of a customer together are limited too (1800 per minute by default): creating more keys does not multiply the limit. Beyond it the response is the same 429 with Retry-After.
Quotas
A plan includes a monthly amount of each unit the service measures:
| Unit | What it counts |
|---|---|
pages | Pages downloaded. |
browser_minutes | Minutes of browser time. |
archived_bytes | Bytes of HTML archived in the month. |
monitor_checks | Checks made by monitors. |
rereads | Captures reread with a newer extractor. |
deliveries | Deliveries to webhooks and to the customer's providers. |
messages | Messages sent. |
subscribers | Active subscribers. |
llm_items | Items classified by the language model. |
GET /v1/usage returns, for the current month or for ?month=YYYY-MM, what has been used, the quota and what is left for each unit.
Quotas are checked before work starts:
- a request that would start work beyond the quota is answered with
402and the codequota_exceeded, and nothing is started; - a job that uses up the quota while running stops and says so, instead of running at a loss.
Two events tell a webhook about quotas: quota.warning, the first time 80% of a quota is used in a month, and quota.exceeded, when it is used up. Each is sent once per unit and month.
Sizes
- Pagination: lists are paginated with a cursor.
limitchooses the page size, 50 by default and 200 at most; follow the address innextuntil it is empty. - Pages per job: a job downloads 500 pages at most; the plan can lower this.
- Open jobs: each plan has a maximum number of running and waiting jobs; beyond it, a request is answered with
429and the codetoo_many_jobs. Waiting jobs start in turn among customers. - Job duration: two hours at most. A job that reaches it stops with the code
duration_exceededand keeps the pages already downloaded; one that would exceed it by pages and pause alone does not start (400,job_too_long). A job stopped by a quota carriesbrowser_minutes_exceededorarchived_bytes_exceeded. - Webhooks: 20 per customer.
- Idempotency keys: 1 to 255 characters, remembered for 24 hours.
Politeness towards sites
Besides the limits above, which protect the service, there are limits that protect the sites being downloaded. They are the same for every customer and cannot be raised:
- between two requests to the same domain there is a pause (1.5 seconds at least, longer if the site asks for it with
Crawl-delay), whoever the customer is; robots.txtis respected;- a site that answers
429or503is slowed down for everybody, and paused if it keeps doing so; a job that meets a paused domain is postponed, not failed; - a site that asked not to be downloaded is not downloaded: its pages fail with a message that says so.
A job can ask to go slower (politeness.delay_seconds), never faster.