# Form API: in.php and res.php

The form API takes the request as form fields (GET or POST) and answers with plain text. Add json=1 to get JSON. It uses the same key and balance as the JSON methods.

## in.php: send a task

Send key, method and the fields of the CAPTCHA type. The answer is OK|ID, or ERROR_NAME.

```bash
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=userrecaptcha&googlekey=SITE_KEY&pageurl=https://example.com/login"
# OK|1001
# with json=1: {"status":1,"request":"1001"}
```

## Common in.php fields

| Name | Type | Required | Description |
|---|---|---|---|
| `key` |  | Yes | Your API key. |
| `method` |  | Yes | Task method, for example userrecaptcha, turnstile or base64. See the table below. |
| `json` |  | No | 1 to get JSON replies. |
| `pingback` |  | No | Address that gets the result by POST when the task is done. |
| `soft_id` |  | No | Your application id. |
| `proxy` |  | No | Proxy as login:password@ip:port. |
| `proxytype` |  | No | HTTP, HTTPS, SOCKS4 or SOCKS5. |
| `header_acao` |  | No | 1 to add the CORS header. |

## res.php: get the answer

Use the id from in.php. The answer is CAPCHA_NOT_READY while the task runs, OK|ANSWER when it is solved, or the error name.

```bash
curl -s "https://unlock-api.com/res.php?key=YOUR_API_KEY&action=get&id=1001"
# CAPCHA_NOT_READY
# OK|03AGdBq25SxXT-pmSeBXjzScW...
```

## res.php actions

| Name | Type | Description |
|---|---|---|
| `action=get` |  | Answer for one task (id). |
| `action=get2` |  | Answer and price: OK\|ANSWER\|PRICE. |
| `action=get + ids` |  | Answers for up to 100 tasks (ids=1,2,3), joined with \|. |
| `action=getbalance` |  | Balance in US dollars. |
| `action=reportbad, reportgood` |  | reportbad and reportgood are accepted and answer OK_REPORT_RECORDED. They do not change the charge. |

## Methods by task type

| CAPTCHA | in.php fields |
|---|---|
| reCAPTCHA v2 | `method=userrecaptcha&googlekey=SITE_KEY&pageurl=https://example.com/login` |
| reCAPTCHA v2 Enterprise | `method=userrecaptcha&enterprise=1&googlekey=SITE_KEY&pageurl=https://example.com/login` |
| reCAPTCHA v3 | `method=userrecaptcha&version=v3&action=login&min_score=0.7&googlekey=SITE_KEY&pageurl=https://example.com/login` |
| Cloudflare Turnstile | `method=turnstile&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| GeeTest v3 / v4 | `method=geetest&gt=GT&challenge=CHALLENGE&pageurl=https://example.com/login` |
| FunCaptcha (Arkose Labs) | `method=funcaptcha&publickey=PUBLIC_KEY&pageurl=https://example.com/login` |
| Amazon AWS WAF | `method=amazon_waf&sitekey=KEY&iv=IV&context=CONTEXT&pageurl=https://example.com/login` |
| MTCaptcha | `method=mt_captcha&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| Friendly Captcha | `method=friendly_captcha&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| Lemin Cropped Captcha | `method=lemin&captcha_id=CROPPED_ID&div_id=lemin-cropped-captcha&pageurl=https://example.com/login` |
| DataDome | `method=datadome&captcha_url=CAPTCHA_URL&pageurl=https://example.com/login&userAgent=UA&proxy=login:pass@1.2.3.4:8080&proxytype=HTTP` |
| KeyCaptcha | `method=keycaptcha&s_s_c_user_id=ID&s_s_c_session_id=SID&s_s_c_web_server_sign=S1&s_s_c_web_server_sign2=S2&pageurl=https://example.com/login` |
| Capy Puzzle | `method=capy&captchakey=SITE_KEY&pageurl=https://example.com/login` |
| Cutcaptcha | `method=cutcaptcha&miseryKey=MISERY_KEY&dataApiKey=DATA_API_KEY&pageurl=https://example.com/login` |
| CyberSiARA | `method=cybersiara&SlideMasterId=MASTER_ID&userAgent=UA&pageurl=https://example.com/login` |
| atbCAPTCHA | `method=atb_captcha&appId=APP_ID&apiServer=https://cap.aisecurius.com&pageurl=https://example.com/login` |
| Tencent Captcha | `method=tencent&appId=APP_ID&pageurl=https://example.com/login` |
| Prosopo Procaptcha | `method=prosopo&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| CaptchaFox | `method=captchafox&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| Altcha | `method=altcha&challengeURL=CHALLENGE_URL&pageurl=https://example.com/login` |
| NetEase Yidun | `method=yidun&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| Yandex SmartCaptcha | `method=yandex&sitekey=SITE_KEY&pageurl=https://example.com/login` |
| VK Captcha | `method=vkcaptcha&redirectUri=REDIRECT_URI&userAgent=UA&pageurl=https://example.com/login` |
| Binance Captcha | `method=binance&sitekey=login&validateId=VALIDATE_ID&pageurl=https://example.com/login` |
| Custom task (Imperva, Temu and others) | `method=incapsula&pageurl=https://example.com/login` |
| Image to text | `method=base64&body=BASE64_IMAGE` |
| Text question | `method=textcaptcha&textcaptcha=What+is+7+plus+5%3F` |
| Image grid | `method=base64&recaptcha=1&textinstructions=Select+all+traffic+lights&body=BASE64_IMAGE` |
| Click coordinates | `method=base64&coordinatescaptcha=1&textinstructions=Click+the+cat&body=BASE64_IMAGE` |
| Rotate | `method=rotatecaptcha&body=BASE64_IMAGE` |
| Audio | `method=audio&lang=en&body=BASE64_AUDIO` |
| Bounding box | `method=bounding_box&textinstructions=Draw+a+box+around+each+car&body=BASE64_IMAGE` |
| Draw around | `method=base64&canvas=1&textinstructions=Draw+around+the+dog&body=BASE64_IMAGE` |


