Skip to content

Rate limits & quotas

Fresh credit-consuming requests require active organization quota. Ordinary job submit and URL upload check before their handler. BatchJob start and manual schedule trigger first recover an existing invocation, then check quota for a fresh acceptance; a replay does not need new credits. The checks cover:

  1. Is the org’s trial still active (if on the trial plan)?
  2. Are there remaining credits on the plan?
  3. (Belt-and-suspenders) The service layer re-checks and atomically deducts.

If the gate rejects, you get a 402 Payment Required:

{
"error": "QUOTA_EXCEEDED",
"message": "Credits exhausted. Contact your administrator to recharge credits.",
"plan": "starter",
"remainingCredits": 0,
"isTrialExpired": false
}

When the trial expires, the message changes to Your trial has expired. Contact your administrator to recharge credits. and isTrialExpired: true.

GET requests always pass the quota gate — you can read your data even when credits are exhausted.

Credits returned for crawls that failed at every provider go straight back into the pool, and the next submit’s check honours them. See Billing & Plans.

Run acceptance does not charge credits or promise every job will be admitted. Accepted BatchJobs and cron occurrences can later record credit exhaustion during admission. Manual schedule triggers return accepted/replayed/skipped run handles with optional maxJobs; see Schedules.

Feature Status
X-RateLimit-Limit / -Remaining / -Reset response headers Not shipped.
429 Too Many Requests responses Partially shipped — see below. No general rate limiter emits 429, but two endpoint-specific caps do. (You may also see 429 from upstream providers in your job result body — that’s the provider, not us.)
Retry-After header Partially shipped — see below. Not sent on the two 429s; it is sent on one 202 and one 503.
Per-key rate limits Not shipped. Quota is per-org, not per-API-key.
Per-endpoint quotas Not shipped. All credit-consuming POSTs share the org credit pool.
Burst budget separate from sustained rate Not shipped.

X-RateLimit-* reads return undefined today — don’t crash on missing.

The two 429s and two Retry-Afters that DO exist

Section titled “The two 429s and two Retry-Afters that DO exist”

There is no general rate limiter, but four specific responses will surprise a client built on the table above.

Endpoint Status When Retry-After?
POST /api/v1/bi/queries 429 Too many concurrent BI queries for the org (too_many_queries) No
POST /api/v1/webhooks/{token}/ingest 429 Daily URL cap exceeded; the message carries the limit, today’s count, and the requested count No
GET /api/v1/extraction/results/{jobId} 202 Extraction finished but its result is not stored yet — body carries status: "pending" and retryAfterSeconds Yes, Retry-After: 5
Extraction result reads (/api/v1/extraction/results…) 503 The results store is briefly unavailable — error code results_unavailable Yes, Retry-After: 5

Two consequences for a client:

  • Retry only replay-safe operations. Reads and keyed BI, BatchJob start and schedule trigger submissions can use bounded retries with the same key and intent. Ordinary POSTs need inspection before repetition. See Idempotency for exact recovery and consumed skip keys.
  • 202 is not a result. On GET /api/v1/extraction/results/{jobId}, branch on status before reading result fields (available has values, no_extraction is a plain scrape’s final answer, pending means wait), and honor Retry-After (or the equivalent retryAfterSeconds body field) rather than polling on a fixed interval.

Without server-side rate-limit signals, the pragmatic approach is:

  • Cap your own concurrency. Don’t dispatch more than ~50 concurrent job submits per org. The API will accept the burst, but you’ll saturate your own credit pool faster than you mean to.
  • Watch the 402. If you start getting QUOTA_EXCEEDED, stop submitting and route to a human — retrying without a credit top-up is wasted effort.
  • Check credits ahead of large batches. GET /api/v1/plans/current returns your remainingCredits. If you’re about to submit 10,000 URLs and have 500 credits, you already know the outcome.
Terminal window
REMAINING=$(curl -s -H "Authorization: Bearer $JUSTCRAWL_API_KEY" \
https://api.justcrawl.io/api/v1/plans/current \
| jq -r '.remainingCredits')
echo "You have $REMAINING credits."

What changes when token-bucket rate-limiting ships

Section titled “What changes when token-bucket rate-limiting ships”

The planned design (subject to change):

  • Per-org sustained rate (e.g. 100 req/s) and burst budget (e.g. 500 tokens).
  • X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset on every response.
  • 429 Too Many Requests with Retry-After: <seconds> when the bucket is empty — extending Retry-After to the two 429s documented above.
  • Distinct buckets per-key for power users who want to subdivide their org’s allotment.

The credit-quota gate stays — token-bucket controls rate, credit quota controls total spend. They’re independent gates.

  • Idempotency — replay-safe submissions, exact recovery and ordinary-write rules
  • Billing & Plans — how credits map to scrape jobs and plan tiers