Skip to content
Last updated

🍪 Note: The cookies parameter is optional but can improve solving performance in certain situations.
It is most useful for reCAPTCHA v2 & Cloudflare Turnstile when solving speed is slower than usual, or for reCAPTCHA v3 when low scores are observed.


Overview

CaptchaAI allows you to optionally send browser cookies along with your CAPTCHA task request.
These cookies simulate a real browsing session, which can help:

  • Increase solving speed for reCAPTCHA v2
  • Improve score quality for reCAPTCHA v3
  • Handle geo-restricted or session-based captchas

However, cookies are not required and in many cases, CaptchaAI achieves excellent performance without them.

⚠️ Overusing the same cookie set may reduce success rate and solving speed. Use fresh cookies whenever possible.


When to Use Cookies

SituationRecommendation
Turnstile solving slower than average✅ Recommended
reCAPTCHA v2 solving slower than average✅ Recommended
reCAPTCHA v3 returning low scores⚠️ Try cookies if your scores are below 0.3
Normal image CAPTCHA🚫 Not applicable
When CAPTCHA site requires login/session cookies✅ Required (if site is authenticated)

Parameter Description

ParameterTypeRequiredDescription
cookiesJSON ArrayNoList of cookie objects to simulate browser session. Each object must contain at least name, value, and domain.

[
  {
    "name": "my-cookie-name-1",
    "value": "my-cookie-val-1",
    "domain": "example.com",
    "hostOnly": true,
    "path": "/",
    "secure": true,
    "httpOnly": false,
    "session": false,
    "expirationDate": 1665434653,
    "sameSite": "Strict"
  },
  {
    "name": "my-cookie-name-2",
    "value": "my-cookie-val-2",
    "domain": ".google.com",
    "hostOnly": false,
    "path": "/",
    "secure": true,
    "httpOnly": false,
    "session": false,
    "expirationDate": 1668015805,
    "sameSite": "None"
  }
]

Exporting Cookies Quickly

You can export cookies from your browser in JSON format using an extension such as:

🧩 Get cookies.txt LOCALLY — available on the Chrome Web Store.

Simply perform a Google search (in case of solving reCAPTCHA) or visit your target page (Works best with Cloudflare Turnstile), then export the cookies as JSON list and include them in the API request.


Tips & Best Practices

  • 🔁 Use fresh cookies for each batch of solves to avoid IP/session correlation.
  • 🕵️ CaptchaAI never returns cookies in the solution; only the solved token is returned.
  • ⚖️ CaptchaAI typically achieves 0.7–0.9 reCAPTCHA v3 scores without cookies — use them only when necessary.
  • 🧠 Avoid using too many cookies or reusing stale ones, as this can lower accuracy.
  • 🧰 Use cookies only when your CAPTCHA type or website truly requires a logged-in or session context.

Example Request with Cookies (POST with Form-Data)

curl -X POST "https://ocr.captchaai.com/in.php" \
  -H "Content-Type: multipart/form-data" \
  -F "key=YOUR_API_KEY" \
  -F "method=userrecaptcha" \
  -F "googlekey=6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u" \
  -F "pageurl=https://example.com/login" \
  -F 'cookies=[{"name":"SID","value":"ABCD1234","domain":".google.com","secure":true,"httpOnly":false}]' \
  -F "json=1"

Response:

{
  "status": 1,
  "request": "0123456789"
}

Polling for Result (POST with Form-Data)

curl -X POST "https://ocr.captchaai.com/res.php" \
  -H "Content-Type: multipart/form-data" \
  -F "action=get" \
  -F "id=0123456789" \
  -F "key=YOUR_API_KEY" \
  -F "json=1"

Summary

  • cookies are optional and should be used only if necessary.
  • Recommended for low reCAPTCHA v3 scores or slow v2 solving.
  • Provide cookies in JSON array format.
  • Avoid reusing identical cookies repeatedly.