Skip to content

API Overview ​

Base URL ​

http://localhost:8191

Or wherever you've mapped PORT (default 8191).

Authentication ​

TRAWL has no authentication - all endpoints are open. Run it on a private network or behind a firewall if you need access control.

Content type ​

All request and response bodies are JSON:

http
Content-Type: application/json

Endpoints ​

MethodPathDescription
GET/healthPool status and uptime
GET/statsPublic numbers for dashboards
GET/metricsPrometheus pool metrics
POST/v1FlareSolverr v2 compatible
POST/scrapeNative TRAWL API
POST/sessionsCreate an isolated browser session
GET/sessionsList live browser sessions
POST/sessions/:id/scrapeScrape within an existing session
POST/sessions/:id/evalEvaluate JavaScript on a kept page
GET/sessions/:id/cookiesRead the session cookie jar
DELETE/sessions/:idClose a browser session

Forward proxy ​

When MITM_ENABLED=true, TRAWL also listens as an HTTP/HTTPS forward proxy on MITM_PORT (default 8192). This is a socket-level proxy interface rather than a JSON API endpoint. It forwards normal traffic directly and escalates recognized challenge walls through the same tier engine as /scrape.

HTTPS clients must trust the generated TRAWL CA. Start with the proxy overview, then follow client setup and CA installation.

Error responses ​

Most error responses follow this shape:

json
{ "error": "Human-readable message" }

Pool-exhaustion errors are an exception - they return a FlareSolverr v2 envelope so /v1 and /scrape produce identical bodies on saturation. See FlareSolverr compat → Error response for the envelope shape.

HTTP status codes:

CodeMeaning
201Browser session created
404Session missing or expired
409Duplicate ID or session busy
410Session browser lost during acquisition
200Success
400Bad request (missing/invalid fields)
429Pool exhausted - all browsers busy past BROWSER_ACQUIRE_TIMEOUT_MS
503Browser pool initializing
500Internal error

CORS

The API does not emit Access-Control-Allow-Origin headers. TRAWL is designed for direct, same-network access (e.g. Prowlarr/Jackett, internal services, your reverse proxy). If you need browser-based cross-origin access, terminate at a proxy that adds the CORS headers you need.