API v1 in.php / res.php

QueryLabz API (v1)

API v1 follows the classic in.php / res.php: create a task first, then poll the result.


Base URL
https://api.querylabz.com/
Endpoints: /in.php and /res.php.
Format
Plain text by default:
OK|<id>
JSON when json=1:
{ "status": 1, "request": "<id>" }

Authentication

Authenticate with your API key.

  • Send the key parameter in requests to in.php and res.php.

Important
The API key must be valid and the account must have sufficient balance. Otherwise the API returns an error.

Pricing

JavaScript CAPTCHAs
reCAPTCHA / Turnstile / SmartCaptcha
$1.00 per 1000
($0.00100 per task)
Image CAPTCHAs
base64 images / Pazl SmartCaptcha
$0.30 per 1000
($0.00030 per task)
Billing happens when the task is accepted into the queue.

Create Task - in.php

Send a task to the API and receive a task id.

Request
POST /in.php
Content-Type: application/x-www-form-urlencoded

key=<API_KEY>
method=<method>
...method-specific params...
json=0|1
Response
OK|123456789
Or JSON when json=1.

Common parameters
Param Required Description
key yes Your API key
method yes Task type (see Methods).
json no Set to 1 to receive JSON responses.

Get Result - res.php

Poll the result until it is ready.

Request
GET /res.php?action=get&key=<API_KEY>&id=<TASK_ID>&json=0|1
Responses
CAPCHA_NOT_READY
OK|<answer>
ERROR_CAPTCHA_UNSOLVABLE
Tip: poll every 2-5 seconds to avoid rate limits.

Methods

Supported values of method for in.php.

Image method=base64

Send an image CAPTCHA as Base64.

Params
  • body - base64 image (Data URL is allowed)
Example
POST /in.php
key=API_KEY
method=base64
body=data:image/jpeg;base64,/9j/4AAQSk...
json=1

JS method=userrecaptcha (reCAPTCHA v2)

Solve reCAPTCHA v2 using sitekey plus pageurl.

Params
  • googlekey - sitekey
  • pageurl - page URL
  • Optional: proxy, proxytype, userAgent, cookies, invisible, enterprise
Example
POST /in.php
key=API_KEY
method=userrecaptcha
googlekey=6Lc...
pageurl=https://site.com/
json=1

JS method=userrecaptcha (reCAPTCHA v3)

Solve reCAPTCHA v3 using sitekey, pageurl and optional action/min_score.

Params
  • googlekey - sitekey
  • pageurl - page URL
  • Optional: action, min_score, proxy, proxytype, userAgent
  • version=v3
Example
POST /in.php
key=API_KEY
method=userrecaptcha
googlekey=6Lc...
pageurl=https://site.com/
action=login
version=v3
min_score=0.3

JS method=turnstile (Cloudflare Turnstile)

Supports both standard Turnstile and Challenge mode with data.

Params
  • sitekey - Turnstile sitekey
  • pageurl - page URL
  • Optional: data (Challenge mode), action, userAgent
Examples
# Standard Turnstile
POST /in.php
key=API_KEY
method=turnstile
sitekey=0x4AAAA...
pageurl=https://site.com/
json=1
# Turnstile Challenge (with data)
POST /in.php
key=API_KEY
method=turnstile
sitekey=0x4AAAA...
pageurl=https://site.com/
data=cf_challenge_data_value
json=1

JS method=smartcaptcha

SmartCaptcha expects two images: body and task (Base64).

Params
  • body - base64 image
  • task - base64 image
Example
POST /in.php
key=API_KEY
method=smartcaptcha
body=data:image/jpeg;base64,...
task=data:image/jpeg;base64,...

JS method=pazl_smartcaptcha (Pazl SmartCaptcha V2)

Send a Base64 image and the task text.

Params
  • body - base64 image
  • task - task text
Example
POST /in.php
key=API_KEY
method=pazl_smartcaptcha
body=data:image/jpeg;base64,...
task=[...]
json=1

Response Formats

Plain text (default)
OK|<id>
CAPCHA_NOT_READY
OK|<answer>
ERROR_*
JSON (json=1)
{
  "status": 1,
  "request": "123456789"
}
{
  "status": 0,
  "request": "CAPCHA_NOT_READY"
}

Errors

Error Description
ERROR_WRONG_USER_KEY API key is missing or invalid.
ERROR_NO_SLOT_AVAILABLE Queue is full, try again later.
ERROR_ZERO_BALANCE Insufficient balance.
ERROR_WRONG_METHOD Unsupported method.
ERROR_BAD_FILE Invalid or missing image data.
ERROR_WRONG_CAPTCHA_ID Task id was not found.
CAPCHA_NOT_READY The task is not solved yet.
ERROR_CAPTCHA_UNSOLVABLE The captcha could not be solved.
Error codes may expand over time. Always handle unknown ERROR_*.

Examples

1) Create task (base64)
curl -X POST "https://api.querylabz.com/in.php" \
  -d "key=API_KEY" \
  -d "method=base64" \
  -d "body=data:image/jpeg;base64,/9j/4AAQSk..." \
  -d "json=1"
2) Poll result
curl "https://api.querylabz.com/res.php?action=get&key=API_KEY&id=123456789&json=1"
3) Create SmartCaptcha
curl -X POST "https://api.querylabz.com/in.php" \
  -d "key=API_KEY" \
  -d "method=smartcaptcha" \
  -d "body=data:image/jpeg;base64,..." \
  -d "task=data:image/jpeg;base64,..."
4) Create Pazl SmartCaptcha
curl -X POST "https://api.querylabz.com/in.php" \
  -d "key=API_KEY" \
  -d "method=pazl_smartcaptcha" \
  -d "body=data:image/jpeg;base64,..." \
  -d "task=[...]" \
  -d "json=1"
Last updated: v1 - QueryLabz