Grid captcha
Grid captcha: parameters, request, response and the 2Captcha method of GridTask.
On this page
A grid of tiles where you pick the ones that match an instruction (“select all images with buses”). Send the grid and get the tile numbers in solution.click, counted from 1 at the top left.
| Status | coming soon |
| Type codes | GridTask — without a proxy |
| Proxy | not needed |
| Also accepted as | — |
| Price | set when the type is switched on — see pricing |
Parameters#
Fields of the task object in createTask:
ParameterDescription
typestringrequired- Task type:
GridTask. bodystringrequired- The captcha file in base64. Base64 picture (PNG, JPEG, GIF, WEBP or BMP), a
data:image/…;base64,prefix is allowed; up to 600 KB decoded. rowsinteger- Rows of the grid. Integer from 1 to 10.
columnsinteger- Columns of the grid. Integer from 1 to 10.
commentstring- Instruction for the solver. One line of text, up to 1024 characters.
imgInstructionsstring- Instruction as a picture. Base64 picture (PNG, JPEG, GIF, WEBP or BMP), a
data:image/…;base64,prefix is allowed; up to 100 KB decoded. previousIdstring- Id of an earlier task for the same captcha. Letters, digits and
_ - . :, up to 64 characters. imgTypestring- Source of the grid for a matching mode. One of
funcaptcha,recaptcha. minClicksinteger- Minimum number of clicks. Integer from 1 to 100.
maxClicksinteger- Maximum number of clicks. Integer from 1 to 100.
canNoAnswerinteger1when no tile may match. Integer from 0 to 1.
Request#
A GridTask task:
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "GridTask",
"body": "iVBORw0KGgoAAAANSUhEUgAA…"
}
}Response#
getTaskResult once the task is solved:
{
"errorId": 0,
"status": "ready",
"solution": {
"click": [
2,
5,
9
],
"userAgent": ""
},
"cost": "0.000700",
"ip": "198.51.100.7",
"createTime": 1793370000,
"endTime": 1793370012,
"solveCount": 1
}2Captcha in.php#
The same task through the 2Captcha API: method=post or method=base64 with recaptcha=1, parameters → task fields:
| in.php | task |
|---|---|
body | body |
recaptcharows | rows |
recaptchacols | columns |
textinstructions | comment |
imginstructions | imgInstructions |
img_type | imgType |
previousID | previousId |
can_no_answer | canNoAnswer |
min_clicks | minClicks |
max_clicks | maxClicks |
res.php returns the tiles as click:2/5/9, or an array with json=1.