Skip to Content
AnySolver logo
AnySolver
Recognition

DragAndDropRecognition

Get target positions for images that must be dragged onto a background. Covers the request schema, an example and each provider's price per 1,000.

DragAndDropRecognition solves CAPTCHAs that ask the visitor to drag one or more pieces onto the right place on a background image. A worker places each piece and the task returns where.

Send the images

Send the background and every movable piece as base64. A data-URI prefix is removed for you. Providers document no image size limit for this task, so keep the images at their natural CAPTCHA size.

FieldWhat to send
imageBase64The background image.
partsOne base64 image for each movable piece, at least one, in the order of the answer.
commentOptional instruction for the worker, for example Drag the images to proper position.

Read the answer

solution.coordinates has exactly one entry for each item in parts, in the same order. Each entry is either a { x, y } position or null. A null entry means the worker did not move that piece: leave it where it was. It is not an error and it is not the point (0, 0).

Check Provider stats for live success rates and solve times before you pick a provider.

Supported Providers

ProviderPrice per 1,000Routing
2Captcha
$1.20

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes.

View settings reference

Task Object Properties

The task field accepts an object with the following properties:

FieldTypeRequiredDescription
type*
Yes
imageBase64*
stringYes

Base64-encoded background image the parts must be dragged onto. A data-URI prefix is removed for you.

Example: iVBORw0KGgoAAAANSUhEUgAA...background

parts*
string[]Yes

Base64-encoded images to drag, one per movable piece. Order matters: solution.coordinates uses the same order.

Example: ["iVBORw0KGgoAAAANSUhEUgAA...part1","iVBORw0KGgoAAAANSUhEUgAA...part2"]

comment
stringNo

Text instruction shown to the worker, for example drag the images to proper position.

Example: Drag the images to proper position

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "DragAndDropRecognition",
        "imageBase64": "iVBORw0KGgoAAAANSUhEUgAA...background",
        "parts": [
            "iVBORw0KGgoAAAANSUhEUgAA...part1",
            "iVBORw0KGgoAAAANSUhEUgAA...part2"
        ]
    }
}

Optional fields are not guaranteed across providers

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
coordinates*
unknown[]Yes

Target position of each dragged image, in the order the parts were sent, so the array has the same length as parts. A null entry means the worker did not move that image; it is not an error and not the point (0, 0).

Example: [{"x":120,"y":340},null]

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.