API v1

Documentation

Get a Cloudflare Turnstile token with a single HTTP request. No SDK, no extra libraries.

GET https://resolver.guru/v1/api

Quick start

  1. 1Open the console and create an account number. Every account comes with an API key.
  2. 2Top up your balance.
  3. 3Send the request below with your key; the token comes back in the response.
cURL
curl -G "https://resolver.guru/v1/api" \
  --data-urlencode "key=xxxxxxxxxxxx" \
  --data-urlencode "sitekey=0x4AAAAAAA..." \
  --data-urlencode "url=https://example.com/login"

Authentication

Send your API key as the key parameter on every request, in the query string with the other parameters. Create and revoke keys under API keys in the console.

Because the key is part of the URL, it can show up in tools that record request URLs (logs, error tracking). Do not share those records; if you think a key has leaked, revoke it in the console and create a new one.

Query
https://resolver.guru/v1/api?key=xxxxxxxxxxxx&sitekey=…&url=…

Never put your key in code that runs in the browser (frontend). Always send requests from your own server.

Token request

Requests are sent with GET; parameters go in the query string. Remember to URL-encode the values (the libraries in the examples do this for you).

ParameterTypeRequiredDescription
sitekeystringYesThe data-sitekey of the Turnstile widget on the target page. Usually starts with 0x4AAAA….
urlstringYesFull URL of the page the widget is on (https://…).
actionstringNoSame value as the widget’s data-action, if it has one. Otherwise omit.
cdatastringNoSame value as the widget’s data-cdata, if it has one. Otherwise omit.
curl -G "https://resolver.guru/v1/api" \
  --data-urlencode "key=xxxxxxxxxxxx" \
  --data-urlencode "sitekey=0x4AAAAAAA..." \
  --data-urlencode "url=https://example.com/login" \
  --data-urlencode "action=login" \
  --data-urlencode "cdata=abc123"

Where do I find the sitekey?

Look at the target page’s HTML for an element with the cf-turnstile class or a turnstile.render(…) call:

HTML
<div class="cf-turnstile"
     data-sitekey="0x4AAAAAAA..."   // → sitekey
     data-action="login"            // → action
     data-cdata="abc123"></div>     // → cdata

Response

A successful response returns 200:

200 OK
{
  "status": "success",
  "token": "0.Rk9aXw3QpL7mT2vB8nYc...",
  "solve_time": 1.21
}
statussuccess or error
tokenThe Turnstile token to add to your form or request.
solve_timeSolve time in seconds.

Every response includes your remaining balance (USD) in the X-Balance header.

On failure you get status: "error", a machine-readable error code and a message:

402 Payment Required
{
  "status": "error",
  "error": "insufficient_balance",
  "message": "Your balance is too low. Top up in the console."
}

Error codes

CodeHTTPMeaningCharge
missing_api_key401No key parameter.None
invalid_api_key401The key is invalid or was revoked.None
sitekey_required400sitekey was not sent.None
invalid_url400url is not a full http(s) URL.None
insufficient_balance402Balance too low. Top up in the console.None
too_many_concurrent429Too many requests in progress for your account. Retry shortly.None
solve_failed422This attempt could not be solved. Safe to retry.None
timeout504Solving took too long. Safe to retry.None
solver_unavailable504The service is temporarily unreachable.None
solver_not_configured503The service is temporarily unavailable.None

Examples

Copy your real key from the console and replace xxxxxxxxxxxx.

import requests

def solve(sitekey, url, action=None, cdata=None):
    params = {"key": "xxxxxxxxxxxx", "sitekey": sitekey, "url": url}
    if action: params["action"] = action
    if cdata: params["cdata"] = cdata

    res = requests.get(
        "https://resolver.guru/v1/api",
        params=params,
        timeout=100,
    )
    data = res.json()
    if data["status"] != "success":
        raise RuntimeError(data["error"])
    return data["token"]

token = solve("0x4AAAAAAA...", "https://example.com/login")

Using the token

Put the token in the field the target site’s form uses for Turnstile. The default field name is cf-turnstile-response.

Turnstile tokens are valid for about 300 seconds and can be used only once. Use the token right after you get it, and request a new one for every submission.

Pricing and limits

  • Price: $0.30 per 1,000 tokens ($0.00030 per token). No subscription.
  • Only successful solves are billed. Requests that return an error never touch your balance.
  • Up to 20 requests per account are processed at the same time; more return 429.
  • A solve can take up to 90 seconds. Set your client timeout to at least 100 seconds.
  • For solve_failed, timeout and 429, wait a few seconds and retry 2–3 times.
Stuck somewhere?