Skip to content

Commit f594b8d

Browse files
committed
Document concurrency limits, queue status endpoint, maxConcurrency param
- openapi.json: maxConcurrency on ReadRequest, GET /v1/queue/status endpoint - queue-status.mdx: API reference for queue status with concurrency limits table - read.mdx: concurrency section with maxConcurrency docs - mint.json: queue-status page in navigation
1 parent d22bf72 commit f594b8d

4 files changed

Lines changed: 103 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Queue status"
3+
openapi: "openapi.json GET /v1/queue/status"
4+
---
5+
6+
Check how many browser slots your workspace is currently using, how many jobs are waiting, and your plan's concurrency limit.
7+
8+
Use this to monitor your queue before submitting large batch jobs, or to build dashboards that show real-time scraping activity.
9+
10+
```bash
11+
curl https://api.reader.dev/v1/queue/status \
12+
-H "x-api-key: $READER_KEY"
13+
```
14+
15+
## Concurrency limits
16+
17+
Each plan has a maximum number of concurrent browser slots:
18+
19+
| Plan | Concurrent browsers |
20+
| --- | --- |
21+
| Free | 2 |
22+
| Pro | 10 |
23+
| Business | 50 |
24+
| Enterprise | 200 |
25+
26+
When all your browser slots are in use, new sync scrape requests return `429` with a `Retry-After` header. Async jobs (batch, crawl) queue and wait for a slot to open.
27+
28+
## Per-request concurrency cap
29+
30+
Pass `maxConcurrency` in your `/v1/read` request to limit how many browser slots a single batch or crawl job uses. This prevents one large job from consuming all your slots.
31+
32+
```bash
33+
curl -X POST https://api.reader.dev/v1/read \
34+
-H "x-api-key: $READER_KEY" \
35+
-d '{
36+
"urls": ["url1", "url2", "...100 more..."],
37+
"maxConcurrency": 5
38+
}'
39+
```

api-reference/read.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ See [The read primitive](/home/concepts/read-primitive) for a narrative overview
1515

1616
Set `proxyMode` to `"standard"` (1 credit, fast, default) or `"premium"` (3 credits, residential proxies, bypasses bot walls). The response metadata tells you which mode ran. See [Proxy modes](/home/concepts/proxy-modes).
1717

18+
## Concurrency
19+
20+
Set `maxConcurrency` to limit how many browser slots a batch or crawl job uses. Prevents one large job from consuming all your plan's concurrent browser slots. Capped to your plan's limit.
21+
22+
Check your current usage with [Queue status](/api-reference/account/queue-status).
23+
1824
## Idempotency
1925

2026
Pass an `x-idempotency-key` header to deduplicate retried POSTs. Reader caches the original response for 24 hours and returns it verbatim on any subsequent request with the same key.

mint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@
195195
"group": "Account",
196196
"pages": [
197197
"api-reference/account/credits",
198-
"api-reference/account/history"
198+
"api-reference/account/history",
199+
"api-reference/account/queue-status"
199200
]
200201
},
201202
{

openapi.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@
342342
"minimum": 1,
343343
"maximum": 20
344344
},
345+
"maxConcurrency": {
346+
"type": "integer",
347+
"minimum": 1,
348+
"description": "Max concurrent browser slots for this request. Capped to your plan's limit."
349+
},
345350
"maxDepth": {
346351
"type": "integer",
347352
"minimum": 1,
@@ -2195,6 +2200,57 @@
21952200
}
21962201
}
21972202
},
2203+
"/v1/queue/status": {
2204+
"get": {
2205+
"summary": "Get queue status",
2206+
"description": "Returns the workspace's concurrency state: active browser slots in use, waiting jobs, and the plan's max concurrency.",
2207+
"tags": [
2208+
"Account"
2209+
],
2210+
"security": [
2211+
{
2212+
"ApiKeyAuth": []
2213+
}
2214+
],
2215+
"responses": {
2216+
"200": {
2217+
"description": "Queue status",
2218+
"content": {
2219+
"application/json": {
2220+
"schema": {
2221+
"type": "object",
2222+
"properties": {
2223+
"success": {
2224+
"type": "boolean",
2225+
"enum": [true]
2226+
},
2227+
"data": {
2228+
"type": "object",
2229+
"properties": {
2230+
"activeJobs": {
2231+
"type": "integer",
2232+
"description": "Number of browser slots currently in use"
2233+
},
2234+
"waitingJobs": {
2235+
"type": "integer",
2236+
"description": "Number of jobs waiting in the queue"
2237+
},
2238+
"maxConcurrency": {
2239+
"type": "integer",
2240+
"description": "Maximum concurrent browser slots for your plan"
2241+
}
2242+
},
2243+
"required": ["activeJobs", "waitingJobs", "maxConcurrency"]
2244+
}
2245+
},
2246+
"required": ["success", "data"]
2247+
}
2248+
}
2249+
}
2250+
}
2251+
}
2252+
}
2253+
},
21982254
"/v1/usage/history": {
21992255
"get": {
22002256
"summary": "List usage history",

0 commit comments

Comments
 (0)