API — Port Pool

Open and manage port pools — batches of ports opened from a proxy list for large, concurrent jobs — then export the results.

Open a pool

NoteThe Port Pool endpoints live under the /scraper path for backward compatibility — it is the same feature as the + Port Pool button in the dashboard.
POST /api/v1/scraper/tasks Auth required

Opens a port pool from a proxy list.

ParameterTypeRequiredDescription
namestringYesPool name.
sourceobjectYesWhere the proxy list comes from: kind is "file", "url" or "inline"; location is the path or URL; content carries the list itself for "inline". Optional refresh_interval re-reads the source (minimum 30s, default 10m), and default_scheme applies to bare host:port entries (default socks5).
targetintYesHow many ports the pool should open.
port_lointNoLow end of the local port range the pool may use.
port_hiintNoHigh end of the local port range.
protocolstringNoListen protocol of the pool ports: "socks5" (default) or "http".
up_policyobjectNoHow often a port switches upstream. mode is "requests" (every n connections), "minutes" (every n minutes) or "on_error" (hold the proxy until the client is served an error). Default: every request.
fp_policyobjectNoHow often a port switches identity, in the same shape and with the same three modes. Default: every 10 requests.
devicestringNoBrowser family for the pool identities, for example "chrome". See GET /api/v1/scraper/device_matrix.
device_osstringNoOperating system for the pool identities, for example "windows".
profile_sourcestringNoWhere identities come from: "auto" generates them on the fly, "db" takes them from the curated database.
auto_uaboolNoPick each identity from the request User-Agent instead of the pool setting.
spoof_headersboolNoRewrite outgoing headers to match the current browser. Recommended for scrapers; on by default.
connect_timeout_secondsintNoCap on a single connect attempt for every port in the pool, in seconds. Default 5.
request_timeout_secondsintNoSilence budget for every port in the pool, in seconds: the connect phase including retries, then the wait for the first byte. Default 30; 0 removes the limit.
idle_timeout_secintNoIdle timeout on a connection of a pool port, in seconds: the connection is closed after this long with no bytes. Default 60. Distinct from idle_seconds, which closes the port itself. The former name request_timeout_sec is still accepted when a pool saved by an earlier version is read.
idle_secondsintNoPort lifetime, in seconds. A pool keeps its ports open by default (0).
Example (curl)
curl -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"tiktok-pool","target":100,"port_lo":20000,"port_hi":30000,
        "protocol":"socks5",
        "source":{"kind":"file","location":"C:/proxies.txt"},
        "up_policy":{"mode":"requests","n":1},
        "fp_policy":{"mode":"requests","n":10},
        "connect_timeout_seconds":5,"request_timeout_seconds":30}' \
  http://127.0.0.1:8891/api/v1/scraper/tasks
NoteThe on_error mode keeps the upstream proxy and the identity for as long as they work, and rotates them once the client is served a 4xx or 5xx response. 2xx and 3xx count as success, so redirects and cached responses do not trigger a rotation. What counts is the status YOUR CLIENT receives: if a request met a challenge and the challenge was handled so that the client got 200, no error occurred. A burst of failures from one dying proxy costs a single rotation, not one per request. The mode is available to port pools only, and needs a port that inspects traffic — on a port opened with tls_passthrough there is no HTTP status to observe.

List & stop pools

GET /api/v1/scraper/tasks Auth required

Lists all port pools and their progress.

DELETE /api/v1/scraper/tasks/{id} Auth required

Stops a pool and closes its ports.

POST /api/v1/scraper/tasks/{id}/test Auth required

Tests the pool's proxy list.

GET /api/v1/scraper/tasks/{id}/config Auth required

Returns the stored configuration of a pool, in the shape POST /api/v1/scraper/tasks accepts.

GET /api/v1/scraper/device_matrix Auth required

Lists the browser and operating-system combinations a pool can be built from.

POST /api/v1/scraper/probe Auth required

Checks a proxy source before a pool is started: reachability of the entries, DNS and IPv6 leaks, UDP support, and how many usable proxies the list yields.

Export results

GET /export/{token}/proxies.txt No auth

Downloads a pool's ports as a plain-text proxy list. Access is granted by the token in the URL, so no API key is needed.

Example (curl)
curl http://127.0.0.1:8891/export/TASK_TOKEN/proxies.txt