Anti API
v2.0

High-Speed Stealth Scraping
Cloudflare Turnstile Auto-Bypass

~300ms Fast

Fast-Path HTTP Engine

Wire-level browser fingerprinting. Spoofs TLS ClientHello, H2/H3 frames, and TCP stack for maximum throughput.

Auto-Bypass

Headless Browser Solver

Persistent Chrome process with tab pooling. Automatically detects and clicks Cloudflare Turnstile challenges.

LRU 24h

Domain Cookie Store

In-memory cookie jar. Harvests cf_clearance and session cookies to skip subsequent challenges completely.

Smart Hop

Dynamic Redirect Cache

Learns post-challenge destination hosts and routes repeat requests directly to final URLs on the fast path.

Authentication Vault Key Required

Stealth Request Studio

Presets:
Checks cookie cache first; escalates to browser only on challenge walls.
Sets matching TLS cipher suites, ALPN, and pseudo-header sequence.
Forces specific HTTP wire protocol negotiation.
Set to stop to get 3xx + Location without downloading target.
Max request execution timeout window.
Preset User-Agent override (optional).
Supports HTTP, HTTPS, and SOCKS5 (with auth). Pass direct to bypass server egress.
Custom headers are merged into the preset browser's natural pseudo-header sequence.
Auto-sets matching Content-Type if not explicitly provided above.
DOM element that must appear before returning. Forces browser if fast-path lacks it.
Waits for element to be enabled, clicks, and captures redirects/downloads.
Max seconds for Cloudflare Turnstile to solve before timeout.
Controls browser navigation readiness trigger.
Runs Selectolax C-parser engine directly over the resolved HTML.
Use text for inner text, html for outer HTML, or any HTML attribute.
Sandboxes cookies into an isolated ephemeral cache; prevents cross-talk.
How long cookies remain cached for this root domain.
Caps outbound cookies to prevent HTTP 400 header overflow.
Only cookies matching these wildcard/glob patterns are saved to cache and sent to origin.
Injected cookies bypass allowlist filters and take highest precedence.
Status: Idle
Engine: --
Cache: --
Proto: --
Cookies: 0
Latency: -- ms
// Configure request parameters above and click "Send Request"...
0 bytes
<!-- Response body preview renders here -->
Extracted elements matched by CSS selector
No extraction selector specified in request.
No cookies harvested yet.
No headers available.
// Step-by-step pipeline execution logs stream here...
No Turnstile token requested.

Domain Cache Explorer

Cached Domains
0
Browser Pool Tabs
0 / 0
Total In-Memory Cookies
0
Fast-Path Efficiency
Ready

Loading active domain cache entries...

API Reference

POST /fetch
POST /solve-turnstile

Feature Guides & Examples

Topic Guides

The API includes a high-performance C-based HTML parser (selectolax Lexbor) on the backend. Instead of downloading and parsing megabytes of HTML in your client code, you can pass CSS selectors directly to receive cleanly extracted text or attributes.

  • selector: Any standard CSS selector (e.g. "h1", "table.torrent-table > tbody > tr", "a.download-btn").
  • selector_all: Set to true to return an array of all matches; set false to return the first matching element.
  • selector_attr: Choose "text" (default, trimmed innerText), "html" (outerHTML), or any HTML attribute name like "href", "src", "data-id".
Example: Extract all download links with CSS selectors
{
  "url": "https://example.com/items",
  "selector": "a.download-btn",
  "selector_all": true,
  "selector_attr": "href"
}

The service includes a built-in Subdomain-Aware LRU In-Memory Cookie Store with Session Isolation & Pattern Allowlist Filtering. When a Cloudflare Turnstile challenge is solved, clearance tokens and sessions are stored automatically. Subsequent requests reuse these cookies to hit the fast-path (300ms) without opening a browser.

  • Dual-Store Architecture (Zero LRU Pollution): Separates long-lived domain caches (64 slots, 24h TTL) from ephemeral scraping sessions (256 slots, 10m TTL). High-volume task session churn never evicts root domain clearances (such as example.com).
  • Strict Session Isolation: When session_id is provided (e.g. "task-dl-1"), the request runs in an isolated sandbox. It never falls back to the root domain and never writes to root, preventing session cookie contamination and bot-score cross-linking via __cf_bm.
  • Synchronized Root Clearance: Non-session domain clearances write strictly cf_clearance to the root domain, atomically synchronizing matching User-Agent and proxy identities. When a challenge wall is encountered, rejected clearance is immediately purged from both the local session and root storage.
  • cookie_allowlist: Array of allowed cookie names or glob/regex wildcard patterns (e.g. ["cf_*", "__cf*", "*session*", "PHPSESSID"]). Non-essential tracking cookies and analytics are pruned automatically.
  • cookie_limit: Upper bound on the number of cookies sent in request headers (default 35, 3.5 KB max) to prevent HTTP 400 header overflow.
  • inject_cookies: Inject custom session cookies before navigation. Injected cookies always bypass allowlist filters and take precedence.
  • cookie_ttl: Cache duration in seconds for domain-level entries (default 86400 = 24 hours). Ephemeral sessions default to 10 minutes (600s).
Example: Isolated Session & Cookie Allowlist
{
  "url": "https://new5.example.com/protected-page",
  "session_id": "task-dl-42",
  "cookie_allowlist": [
    "cf_*",
    "__cf*",
    "*session*",
    "PHPSESSID"
  ],
  "cookie_limit": 25
}

The system keeps a persistent Chromium process per egress identity (direct, or one per proxy), capped by MAX_BROWSERS. Incoming requests acquire a worker tab through a semaphore pool (MAX_TABS) and clean up their isolated browser context on completion. Idle processes are recycled after BROWSER_MAX_LIFETIME_SEC.

  • force_browser: Set to true to skip the HTTP fast-path and drive Chrome directly. Use this for complex Single Page Apps (SPA) that require client-side JavaScript rendering.
  • force_http: Set to true to stay on the HTTP engine only. The browser is never started; a 403 or challenge page is returned as-is. Use this for POST/API calls where a 403 comes from the site itself, not Cloudflare.
  • cf_wait: Maximum duration in seconds to wait for Cloudflare Turnstile to solve and redirect (default 25.0s). Early-exits immediately as soon as the challenge is solved.
  • Dynamic Redirect Cache: When an origin domain redirects to a separate domain post-challenge (e.g. .com → .net), the API caches the destination so subsequent requests hit the final URL directly on the fast-path.
Example: Forcing browser with custom challenge timeout
{
  "url": "https://example.com/dynamic-spa",
  "force_browser": true,
  "cf_wait": 15.0
}

Fine-tune the wire-level network behavior, fingerprint profiles and User-Agent headers.

Anti scrapes, it does not download. Video, audio, image, archive and attachment responses, and any body over MAX_RESPONSE_MB (16), are never read into memory. You still get status_code, headers and url (the final address after redirects, ideal for download-gateway links) with an empty body, plus meta.body_truncated: true and a meta.body_note reason.
  • user_agent: Pass a custom User-Agent string to override the preset's default. If omitted, the authentic preset User-Agent is sent.
  • preset: Select from bundled browser fingerprint profiles: "chrome-latest-windows", "chrome-latest-linux", "firefox-latest".
  • proxy: Route the request through an HTTP, HTTPS or SOCKS5 proxy. Each proxy gets its own browser process with matching timezone, locale and WebRTC IP.
  • http_version: Force protocol version ("h1", "h2", "h3") or leave as null for auto-negotiation via ALPN.
Example: Custom User-Agent, preset and protocol
{
  "url": "https://example.com/api/data",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
  "preset": "chrome-latest-windows",
  "http_version": "h2",
  "timeout": 45
}

Send any request through a residential, ISP or datacenter proxy. Cloudflare binds cf_clearance to the IP that earned it and checks that the browser's timezone, language and WebRTC address agree with that IP, so the API treats every proxy as a separate egress identity end to end.

Resolve

Request proxy > "direct" opt-out > server WARP egress.

Isolate

One Chromium process per proxy. SOCKS5 credentials are handed to Chromium itself.

Match

Timezone and locale come from the exit IP (GeoIP); WebRTC is pinned to that IP.

Cache

Cookies are namespaced per proxy, so a clearance is never replayed from another IP.

Supported formats

FormatNotes
http://user:pass@host:portMost residential providers. Works on HTTP engine and browser.
https://host:portTLS connection to the proxy itself.
socks5://user:pass@host:portAuthenticated SOCKS5, including special password chars (auto-encoded).
socks5h://host:portDNS resolved by the proxy (browser default for SOCKS5).
"direct"Explicitly bypass server egress for this request.

Examples

Residential HTTP proxy
{
  "url": "https://example.com/protected",
  "proxy": "http://user:pass@res.example.net:8000"
}
SOCKS5 + isolated session
{
  "url": "https://example.com/download/42",
  "proxy": "socks5://user:pass@1.2.3.4:1080",
  "session_id": "task-dl-42",
  "force_browser": true
}

Failure handling

SituationResponse
Malformed proxy (no scheme, no port, unsupported scheme)422, rejected before any network call; never falls back to direct connection.
Proxy refuses or drops the connectionstatus_code: 502 with a [PROXY-FAIL] log; no browser solve is wasted.
Any log, error or response bodyCredentials are masked as socks5://***@host:port.

Copy-pasteable code examples across languages and runtimes for stealth scraping and standalone Turnstile solving.

Python (httpx) — Standard Stealth Fetch
import httpx

# Send stealth request with API key
response = httpx.post(
    "http://127.0.0.1:8000/fetch",
    headers={"X-API-Key": "anti_secret_key_123"},
    json={
        "url": "https://example.com/protected-page",
        "selector": "title",
        "cf_wait": 25.0
    },
    timeout=30.0
)

data = response.json()
print("Status Code:", data["status_code"])
print("Engine Used:", data["meta"]["via"])
print("Extracted:", data["extracted"])
Python (httpx) — Proxied Multi-Hop Task
import os, httpx

response = httpx.post(
    "http://127.0.0.1:8000/fetch",
    headers={"X-API-Key": os.environ.get("ANTI_API_KEY", "anti_secret_key_123")},
    json={
        "url": "https://example.com/download-portal",
        "proxy": "http://user:pass@residential.proxy:8080",
        "session_id": "task-dl-42",
        "click_selector": "button#start-download"
    },
    timeout=60.0
)
data = response.json()
print("Redirect chain:", data["redirect_chain"])