### Install NoneCap SDK Source: https://nonecap.com/solutions/python Install the package via pip. ```bash pip install nonecap ``` -------------------------------- ### Install NoneCap and Scrapy Source: https://nonecap.com/solutions/scrapy Command to install the necessary packages for Scrapy and NoneCap integration. ```bash pip install scrapy nonecap ``` -------------------------------- ### Install the NoneCap SDK Source: https://nonecap.com/sdk Use npm to add the package to your project dependencies. ```bash npm install nonecap ``` -------------------------------- ### Solve response examples Source: https://nonecap.com/api-reference Example JSON responses for solved and pending solve requests. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solved", "token": "P1_eyJ0eXAi...UV8w", "credits_charged": 1, "created_at": "2026-05-20T11:42:01Z", "started_at": "2026-05-20T11:42:02Z", "finished_at": "2026-05-20T11:42:06Z", "queue_ms": 1000, "resolve_ms": 4000 } ``` ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solving", "token": null, "credits_charged": null, "created_at": "2026-05-20T11:42:01Z", "started_at": "2026-05-20T11:42:02Z", "finished_at": null, "queue_ms": 1000, "resolve_ms": null } ``` -------------------------------- ### Account Response Source: https://nonecap.com/api-reference Example JSON response body for the account endpoint. ```json { "object": "account", "id": "user_01HQF7K3JKWZX", "email": "you@example.com", "credits_balance": 4827, "created_at": "2026-04-01T00:00:00Z" } ``` -------------------------------- ### List solves with pagination Source: https://nonecap.com/api-reference Examples demonstrating how to retrieve paginated lists of solves using cursor-based pagination. ```bash curl "https://api.nonecap.com/v1/solves?limit=20&starting_after=solve_01HQF7K3JKWZX" \ -H "Authorization: Bearer nc_live_••••" ``` ```typescript async function* listAll() { let cursor: string | undefined; while (true) { const url = new URL("https://api.nonecap.com/v1/solves"); url.searchParams.set("limit", "100"); if (cursor) url.searchParams.set("starting_after", cursor); const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.NONECAP_KEY}` }, }); const page = await res.json(); for (const item of page.data) yield item; if (!page.has_more) return; cursor = page.data[page.data.length - 1].id; } } ``` ```python import os, requests def list_all(): cursor = None while True: params = {"limit": 100} if cursor: params["starting_after"] = cursor page = requests.get( "https://api.nonecap.com/v1/solves", params=params, headers={"Authorization": f"Bearer {os.environ['NONECAP_KEY']}"}, ).json() for item in page["data"]: yield item if not page["has_more"]: return cursor = page["data"][-1]["id"] ``` ```go func listAll() ([]Solve, error) { var all []Solve var cursor string for { u, _ := url.Parse("https://api.nonecap.com/v1/solves") q := u.Query() q.Set("limit", "100") if cursor != "" { q.Set("starting_after", cursor) } u.RawQuery = q.Encode() req, _ := http.NewRequest("GET", u.String(), nil) req.Header.Set("Authorization", "Bearer "+os.Getenv("NONECAP_KEY")) res, err := http.DefaultClient.Do(req) if err != nil { return nil, err } defer res.Body.Close() var page struct { Data []Solve `json:"data"` HasMore bool `json:"has_more"` } json.NewDecoder(res.Body).Decode(&page) all = append(all, page.Data...) if !page.HasMore { return all, nil } cursor = page.Data[len(page.Data)-1].ID } } ``` -------------------------------- ### List solves response Source: https://nonecap.com/api-reference Example JSON response for a paginated list of solves. ```json { "object": "list", "data": [ { "id": "solve_01HQF7K3JKWZX", "type": "hcaptcha", "status": "solved", "credits_charged": 1, "finished_at": "2026-05-20T11:42:06Z" }, { "id": "solve_01HQF7K3JLNAB", "type": "hcaptcha", "status": "solved", "credits_charged": 1, "finished_at": "2026-05-20T11:43:11Z" }, { "id": "solve_01HQF7K3JKWZY", "type": "hcaptcha", "status": "solved", "credits_charged": 1, "finished_at": "2026-05-20T11:44:27Z" }, { "id": "solve_01HQF7K3JKABC", "type": "hcaptcha", "status": "failed", "credits_charged": 0, "finished_at": "2026-05-20T11:45:00Z" } ], "has_more": true } ``` -------------------------------- ### Displaying an hCaptcha token format Source: https://nonecap.com/learn/hcaptcha-token Example of the structure of an hCaptcha token starting with the P1_ prefix. ```text P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...UV8w (truncated: a real token runs well past 1,000 characters) ``` -------------------------------- ### Solve response structures Source: https://nonecap.com/api-reference Example JSON responses for pending and completed solve states. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "pending", "sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "url": "https://target.example/login", "token": null, "error": null, "credits_charged": null, "created_at": "2026-05-20T11:42:02Z", "started_at": null, "finished_at": null, "queue_ms": null, "resolve_ms": null } ``` ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solved", "sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "url": "https://target.example/login", "token": "P1_eyJ0eXAi...UV8w", "error": null, "credits_charged": 1, "created_at": "2026-05-20T11:42:01Z", "started_at": "2026-05-20T11:42:02Z", "finished_at": "2026-05-20T11:42:06Z", "queue_ms": 1000, "resolve_ms": 4000 } ``` -------------------------------- ### Successful siteverify response Source: https://nonecap.com/learn/hcaptcha-siteverify Example of a successful JSON response from the siteverify endpoint. ```json { "success": true, "challenge_ts": "2026-06-12T09:41:27Z", "hostname": "your-site.example" } ``` -------------------------------- ### GET /v1/solves Source: https://nonecap.com/api-reference Retrieves a list of solves. This endpoint supports cursor-based pagination using the starting_after parameter. ```APIDOC ## GET /v1/solves ### Description Retrieves a paginated list of solves. ### Method GET ### Endpoint https://api.nonecap.com/v1/solves ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of items to return (1-100, default 20). - **starting_after** (string) - Optional - The id of the last item received, used as an exclusive cursor for pagination. ### Response #### Success Response (200) - **data** (array) - List of solve objects. - **has_more** (boolean) - Indicates if there are more pages available. ``` -------------------------------- ### GET /v1/me Source: https://nonecap.com/api-reference Retrieves the authenticated account information and current credit balance. ```APIDOC ## GET /v1/me ### Description Returns the authenticated account details and the current credit balance. Useful for dashboard displays or pre-flight checks. ### Method GET ### Endpoint https://api.nonecap.com/v1/me ### Response #### Success Response (200) - **object** (string) - The object type, 'account'. - **id** (string) - The account ID. - **email** (string) - The verified email address. - **credits_balance** (integer) - Available solves remaining. - **created_at** (string) - Account creation timestamp. #### Response Example { "object": "account", "id": "user_01HQF7K3JKWZX", "email": "you@example.com", "credits_balance": 4827, "created_at": "2026-04-01T00:00:00Z" } ``` -------------------------------- ### Feedback response structures Source: https://nonecap.com/api-reference Example JSON responses for batch feedback processing and individual resource retrieval. ```json { "object": "feedback_batch", "recorded": 1, "updated": 0, "unchanged": 0, "failed": 1, "results": [ { "solve_id": "solve_01HQF7K3JKWZX", "status": "recorded", "error": null }, { "solve_id": "solve_01HQF7K3JMTP9", "status": "error", "error": { "code": "not_eligible", "message": "solve not found or not reportable", "param": "solve_id" } } ] } ``` ```json { "object": "feedback", "solve_id": "solve_01HQF7K3JKWZX", "outcome": "accepted", "estado": false, "reason": null, "reported_at": null, "report_count": 1, "created_at": "2026-07-01T14:05:00Z", "updated_at": "2026-07-01T14:05:00Z" } ``` -------------------------------- ### GET /v1/solves Source: https://nonecap.com/api-reference Retrieves a cursor-paginated history of solves for the authenticated account, ordered from newest to oldest. ```APIDOC ## GET /v1/solves ### Description Returns a list of solves for the authenticated account. Supports filtering by status and type. ### Method GET ### Endpoint https://api.nonecap.com/v1/solves ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of solves to return (1-100, default 20). - **starting_after** (string) - Optional - Pagination cursor (ID of the last solve from the previous page). - **status** (string) - Optional - Filter by status (pending, solving, solved, failed, cancelled, expired). - **type** (string) - Optional - Filter by captcha type (hcaptcha, hcaptcha_enterprise). ### Response #### Success Response (200) - **data** (array) - List of solve objects - **has_more** (boolean) - Indicates if more pages are available ``` -------------------------------- ### Example Solved Object Response Source: https://nonecap.com/solutions/web-scraping The JSON structure returned by the NoneCap API when a solve request reaches a terminal state. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solved", "sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "url": "https://target.example/listings", "token": "P1_eyJ0eXAi...UV8w", "error": null, "credits_charged": 1 } ``` -------------------------------- ### Top up account balance via CLI Source: https://nonecap.com/pricing Use the CLI tool to purchase a specific credit pack for your account. ```bash $ nonecap topup --pack builder ``` -------------------------------- ### Initialize NoneCap CLI Source: https://nonecap.com/ Command to initialize the NoneCap environment. ```bash $ nonecap init ``` -------------------------------- ### GET /v1/me Source: https://nonecap.com/api-reference Retrieves information about the currently authenticated user. ```APIDOC ## GET /v1/me ### Description Retrieves the profile information for the user associated with the provided API key. ### Method GET ### Endpoint https://api.nonecap.com/v1/me ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token using an API key starting with 'nc_live_'. ### Response #### Success Response (200) - Returns user profile information. #### Error Responses - **401 Unauthorized**: Missing, malformed, revoked, or unknown key. - **402 Insufficient Credits**: Valid key but balance is less than 1. - **402 Key Credit Limit Exceeded**: The key has reached its per-key credit limit. ``` -------------------------------- ### Complete Go client for NoneCap API Source: https://nonecap.com/solutions/golang A full implementation using net/http that handles authentication, request serialization, and polling for solve results with context support. ```go package main import ( "bytes" "context" "encoding/json" "fmt" "io" "log" "net/http" "os" "time" ) const api = "https://api.nonecap.com/v1" type solveRequest struct { Type string `json:"type"` // "hcaptcha" | "hcaptcha_enterprise" Sitekey string `json:"sitekey"` URL string `json:"url"` Rqdata string `json:"rqdata,omitempty"` // enterprise only } type solveError struct { Code string `json:"code"` Message string `json:"message"` } type solve struct { ID string `json:"id"` Status string `json:"status"` // pending|solving|solved|failed|expired|cancelled Token string `json:"token"` CreditsCharged int `json:"credits_charged"` Error *solveError `json:"error"` } func solveHCaptcha(ctx context.Context, key, sitekey, pageURL string) (string, error) { body, err := json.Marshal(solveRequest{Type: "hcaptcha", Sitekey: sitekey, URL: pageURL}) if err != nil { return "", err } // ?wait=90 holds the connection until the solve is terminal, // so the token usually comes back on this first response. s, err := call(ctx, key, http.MethodPost, "/solves?wait=90", bytes.NewReader(body)) if err != nil { return "", err } // A 202 means it was still in flight after 90s. Re-attach until // it's terminal; ctx puts a hard ceiling on the whole thing. for s.Status == "pending" || s.Status == "solving" { s, err = call(ctx, key, http.MethodGet, "/solves/"+s.ID+"?wait=90", nil) if err != nil { return "", err } } if s.Status != "solved" { if s.Error != nil { return "", fmt.Errorf("solve %s: %s (%s)", s.Status, s.Error.Message, s.Error.Code) } return "", fmt.Errorf("solve %s", s.Status) } return s.Token, nil } func call(ctx context.Context, key, method, path string, body io.Reader) (solve, error) { var s solve req, err := http.NewRequestWithContext(ctx, method, api+path, body) if err != nil { return s, err } req.Header.Set("Authorization", "Bearer "+key) if body != nil { req.Header.Set("Content-Type", "application/json") } resp, err := http.DefaultClient.Do(req) if err != nil { return s, err } defer resp.Body.Close() if resp.StatusCode >= 300 { b, _ := io.ReadAll(resp.Body) return s, fmt.Errorf("nonecap: %s: %s", resp.Status, b) } return s, json.NewDecoder(resp.Body).Decode(&s) } func main() { ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) defer cancel() token, err := solveHCaptcha(ctx, os.Getenv("NONECAP_KEY"), "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "https://example.com/login") if err != nil { log.Fatal(err) } fmt.Println(token) // P1_eyJ0eXAi... } ``` -------------------------------- ### CapSolver Task Creation and Polling Source: https://nonecap.com/vs/capsolver Demonstrates the two-step process of creating a task and polling for the result using the requests library. ```python # CapSolver: createTask, then poll getTaskResult until ready. import time, requests CLIENT_KEY = "YOUR_CAPSOLVER_KEY" tid = requests.post("https://api.capsolver.com/createTask", json={ "clientKey": CLIENT_KEY, "task": { "type": "HCaptchaTaskProxyless", "websiteURL": "https://target.example/login", "websiteKey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", }, }).json()["taskId"] while True: # spin until it's ready time.sleep(3) r = requests.post("https://api.capsolver.com/getTaskResult", json={ "clientKey": CLIENT_KEY, "taskId": tid, }).json() if r["status"] == "ready": token = r["solution"]["gRecaptchaResponse"] break ``` -------------------------------- ### GET /v1/solves/{id} Source: https://nonecap.com/api-reference Fetch the current state of a solve by its unique identifier. ```APIDOC ## GET /v1/solves/{id} ### Description Fetch the current state of a solve by id. With ?wait=N (1-90 s), the call blocks until the solve reaches a terminal state or the wait expires. ### Method GET ### Endpoint https://api.nonecap.com/v1/solves/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Prefixed ULID of the solve, e.g. solve_01HQF7K3JKWZX. #### Query Parameters - **wait** (integer) - Optional - Block up to N seconds (1-90); return as soon as the solve reaches a terminal state. ``` -------------------------------- ### Cancel Solve Response Source: https://nonecap.com/api-reference Example JSON response body for a successfully cancelled solve. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "cancelled", "token": null, "credits_charged": 0, "created_at": "2026-05-20T11:42:02Z", "started_at": "2026-05-20T11:42:02Z", "finished_at": "2026-05-20T11:42:04Z" } ``` -------------------------------- ### NoneCap single-call solve implementation Source: https://nonecap.com/vs/2captcha Demonstrates the optimized flow using a blocking POST request, with a fallback to polling if the solve takes longer than the wait window. ```python # NoneCap: one POST, block for the token with ?wait. Poll only if it runs long. import os, time, requests BASE = "https://api.nonecap.com/v1/solves" HEADERS = {"Authorization": f"Bearer {os.environ['NONECAP_KEY']}"} def solve_hcaptcha(sitekey: str, url: str) -> str: r = requests.post( BASE, headers=HEADERS, params={"wait": 90}, # block up to 90s for the token json={"type": "hcaptcha", "sitekey": sitekey, "url": url}, timeout=120, ) r.raise_for_status() solve = r.json() # 202 = still in flight when the wait window closed, and token is null. while solve["status"] in ("pending", "solving"): time.sleep(2) p = requests.get(f"{BASE}/{solve['id']}", headers=HEADERS, timeout=30) p.raise_for_status() solve = p.json() if solve["status"] != "solved": raise RuntimeError(solve["error"]) # not charged: no token, no credits return solve["token"] # a real P1_… hCaptcha token # Submit the returned token as the form's h-captcha-response field. ``` -------------------------------- ### Manage Solves and Account via Low-Level Methods Source: https://nonecap.com/sdk Provides granular control over submission, polling, cancellation, and account management using the resource methods. ```typescript // Submit without blocking, then poll the one solve yourself. const pending = await nc.solves.create({ type: "hcaptcha", sitekey, url }); const done = await nc.solves.retrieve(pending.id, { wait: 30 }); // Cancel, list, or iterate every solve newest-first. await nc.solves.cancel(pending.id); for await (const s of nc.solves.listAll()) console.log(s.id, s.status); // Your account and credit balance. const me = await nc.me(); console.log(me.credits_balance); // Tell us whether the token was accepted downstream — free, and it tunes // minting against your real acceptance rate. await nc.feedback.report({ solve_id: done.id, outcome: "accepted" }); ``` -------------------------------- ### Failed siteverify response Source: https://nonecap.com/learn/hcaptcha-siteverify Example of a failed JSON response containing error codes. ```json { "success": false, "error-codes": ["expired-input-response"] } ``` -------------------------------- ### Bounded fan-out with errgroup Source: https://nonecap.com/solutions/golang Use errgroup with SetLimit to manage concurrent requests and prevent 429 errors by staying within account limits. ```go import "golang.org/x/sync/errgroup" // Concurrency is capped per account: 5 solves in flight by // default, up to 100 on paid packs. SetLimit keeps you under // the cap; pushing past it gets you 429s, not faster solves. g, ctx := errgroup.WithContext(context.Background()) g.SetLimit(5) tokens := make([]string, len(targets)) for i, t := range targets { g.Go(func() error { tok, err := solveHCaptcha(ctx, key, t.Sitekey, t.URL) if err != nil { return err } tokens[i] = tok return nil }) } if err := g.Wait(); err != nil { log.Fatal(err) } ``` -------------------------------- ### Solve Object JSON Representation Source: https://nonecap.com/api-reference Example of a fully populated solve object returned by the API. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solved", "sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "url": "https://target.example/login", "token": "P1_eyJ0eXAi...UV8w", "error": null, "credits_charged": 1, "proxy_bytes": null, "created_at": "2026-05-20T11:42:01Z", "started_at": "2026-05-20T11:42:02Z", "finished_at": "2026-05-20T11:42:06Z", "queue_ms": 1000, "resolve_ms": 4000 } ``` -------------------------------- ### Configure API Key Source: https://nonecap.com/ Store the API key in your environment variables to authenticate requests. ```bash # in your env NONECAP_KEY="nc_live_••••" ``` -------------------------------- ### GET /v1/solves/{id} Source: https://nonecap.com/ Poll for the status and result of a previously initiated captcha solve request. ```APIDOC ## GET /v1/solves/{id} ### Description Poll the status of a specific captcha solve request using its unique identifier. ### Method GET ### Endpoint /v1/solves/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the solve request. ### Response #### Success Response (200) - **status** (string) - The current status of the solve. - **token** (string) - The P1_ token if the solve is complete. - **credits_charged** (integer) - The number of credits deducted if successful. ``` -------------------------------- ### nc.me() Source: https://nonecap.com/solutions/python Retrieves account information including credit balance. ```APIDOC ## nc.me() ### Description Returns the current account details. ### Response - **credits_balance** (integer) - The remaining credit balance for the account. ``` -------------------------------- ### nc.solves.create() Source: https://nonecap.com/solutions/python Submits a captcha request to the server. ```APIDOC ## nc.solves.create(type, sitekey, url, wait) ### Description Submits a captcha request. Optionally holds the connection for a specified duration. ### Parameters - **type** (string) - Required - The type of captcha. - **sitekey** (string) - Required - The sitekey. - **url** (string) - Required - The page URL. - **wait** (integer) - Optional - Time in seconds to hold the connection. ``` -------------------------------- ### Submit hCaptcha Token Response Source: https://nonecap.com/ Example JSON response returned by the API after a successful captcha solve. ```json { "status": "solved", "token": "P1_eyJ0...UV8w", "credits_charged": 1 } ``` -------------------------------- ### GET /v1/solves/{id} Source: https://nonecap.com/solutions/ai-agents Polls the status of a previously submitted solve request using the solve ID. ```APIDOC ## GET /v1/solves/{id} ### Description Retrieves the status and result of a solve request. Can be used with an optional wait parameter to poll for completion. ### Method GET ### Endpoint /v1/solves/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique solve ID returned from the initial POST request #### Query Parameters - **wait** (integer) - Optional - Time in seconds to wait for the solve to complete ``` -------------------------------- ### List solves Source: https://nonecap.com/api-reference Retrieves a paginated list of solve history for the authenticated account. ```bash curl "https://api.nonecap.com/v1/solves?limit=20&status=solved" \ -H "Authorization: Bearer nc_live_••••" ``` ```javascript const url = new URL("https://api.nonecap.com/v1/solves"); url.searchParams.set("limit", "20"); url.searchParams.set("status", "solved"); const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.NONECAP_KEY}` }, }); const page = await res.json(); for (const solve of page.data) console.log(solve.id); ``` ```python import os, requests page = requests.get( "https://api.nonecap.com/v1/solves", params={"limit": 20, "status": "solved"}, headers={"Authorization": f"Bearer {os.environ['NONECAP_KEY']}"}, ).json() for s in page["data"]: print(s["id"]) ``` ```go u, _ := url.Parse("https://api.nonecap.com/v1/solves") q := u.Query() q.Set("limit", "20"); q.Set("status", "solved") u.RawQuery = q.Encode() req, _ := http.NewRequest("GET", u.String(), nil) req.Header.Set("Authorization", "Bearer "+os.Getenv("NONECAP_KEY")) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() ``` -------------------------------- ### Create a solve request with cURL Source: https://nonecap.com/vs/nopecha Initiate an hCaptcha solve request using the NoneCap API with a 90-second wait time. ```bash curl "https://api.nonecap.com/v1/solves?wait=90" \ -H "Authorization: Bearer $NONECAP_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "hcaptcha", "sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8", "url": "https://target.example/login" }' ``` -------------------------------- ### Example HTTP POST request to server Source: https://nonecap.com/learn/hcaptcha-siteverify The structure of the form submission received by your server containing the h-captcha-response token. ```http POST /signup HTTP/1.1 Host: your-site.example Content-Type: application/x-www-form-urlencoded email=user%40example.com&h-captcha-response=P1_eyJ0eXAi...UV8w ``` -------------------------------- ### POST /v1/feedback Source: https://nonecap.com/api-reference Submit a batch of feedback items for multiple solves. This is the recommended endpoint for high-volume integrations. ```APIDOC ## POST /v1/feedback ### Description Submit a batch of feedback items for multiple solves. The request is processed as a batch, and individual item statuses are returned in the response. ### Method POST ### Endpoint https://api.nonecap.com/v1/feedback ### Request Body - **feedback** (array) - Required - A list of feedback objects containing solve_id, outcome, and optional fields like reason and reported_at. ### Response #### Success Response (200) - **object** (string) - The type of object returned (feedback_batch). - **recorded** (integer) - Count of successfully recorded items. - **failed** (integer) - Count of items that failed processing. - **results** (array) - Detailed status for each feedback item. #### Response Example { "object": "feedback_batch", "recorded": 1, "failed": 1, "results": [ { "solve_id": "solve_01HQF7K3JKWZX", "status": "recorded", "error": null }, { "solve_id": "solve_01HQF7K3JMTP9", "status": "error", "error": { "code": "not_eligible", "message": "solve not found or not reportable", "param": "solve_id" } } ] } ``` -------------------------------- ### Submit Form with hCaptcha Token Source: https://nonecap.com/solutions/golang Maintain session consistency by using the same cookie jar and IP for the initial GET, the solve request, and the final POST. ```go // Same client (cookie jar) and same exit IP that fetched the // page. Tokens are checked against the session that saw the // captcha, so don't solve on one proxy and submit on another. jar, _ := cookiejar.New(nil) client := &http.Client{Jar: jar, Timeout: 30 * time.Second} // 1. GET the page with this client: collects cookies, and you // read the sitekey out of the HTML here too. // 2. Solve via NoneCap (above). // 3. POST the form with the token filled in. form := url.Values{ "email": {email}, "password": {password}, // hCaptcha's own field name, plus the reCAPTCHA-compat // alias some backends read instead. Same token in both. "h-captcha-response": {token}, "g-recaptcha-response": {token}, } resp, err := client.PostForm("https://target.example/login", form) ``` -------------------------------- ### Example hCaptcha solve response Source: https://nonecap.com/learn/hcaptcha-challenge-types The API returns a JSON object containing the solve status, the generated P1_ token, and the number of credits charged for multi-round challenges. ```json { "id": "solve_01HQF7K3JKWZX", "object": "solve", "type": "hcaptcha", "status": "solved", "token": "P1_eyJ0eXAi...UV8w", "credits_charged": 2 } ```