notabotDocs

Using the result

The cookies work only with the user agent they came with, from the IP that earned them, on a client that looks like that browser.

Three rules

  1. Same proxy. Use the proxy you gave the solve. If the exit IP changes, the cookies stop working.
  2. Same user agent. Copy result.userAgent into your user-agent header exactly.
  3. All the cookies. Send every entry of result.cookies, and keep whatever the site sets afterwards. Some sites rotate them.
Applying a result
import { request } from "undici";   // any HTTP client works, see "TLS fingerprint" below

const { result } = solveBody;                // the "result" object from /v1/solve
const cookie = Object.entries(result.cookies).map(([k, v]) => `${k}=${v}`).join("; ");

// Same proxy as the solve, same user agent, cookies attached.
const res = await fetchThroughProxy("https://shop.example.com/events", {
  headers: { "user-agent": result.userAgent, cookie },
  proxy: "http://user:pass@host:port",
});

TLS fingerprint

Sites also look at how you connect. Stock Node, Python and Go clients handshake differently from Chrome, and a site can drop good cookies that arrive that way. Make your own requests with something that copies Chrome’s handshake (curl-impersonate, httpcloak, tls-client) or a real browser. Our solve already does.

How long cookies last

The site decides. Reuse a result for as long as it works, and solve again when challenges come back. Solving before every request just costs money.

When requests still get blocked

  • Is it the same proxy as the solve?
  • Is the user-agent identical?
  • Does your client have a Chrome TLS fingerprint?
  • Try a fresh residential or mobile IP. Datacenter and already-flagged IPs cause most blocks.