Skip to main content
Skip to content
ScrapingBuddyDevelopers
On this page Overview

CAPTCHA API/API reference

Grid CAPTCHA

Send separate tile images or one complete grid and get back the selected tile numbers.

Use this for challenges that ask the user to select matching squares from a tiled image.

01 / Prepare

Prepare the input

Choose one input mode: an array of separate tiles, or one image containing the whole grid. For separate tiles, send the top row first, from left to right. A 3 by 3 grid needs exactly 9 images. The instruction describes what the selected tiles must contain.

Each task reserves $0.015 from your wallet. Successful tasks cost 1.5 times the provider cost; unused reserved credit is returned. Failed tasks are not charged. Billing details

  • Tile numbering starts at 1 in the top-left tile and moves left to right.
  • Separate images are assembled left to right, then top to bottom. A returned click value of 1 refers to images[0], 2 to images[1], and so on.
  • Tiles are fitted into equal square cells without cropping, with white padding when needed. The assembled JPEG is limited to 1000px per side and 600 KB.
  • You can still send a complete grid using image. The provider receives one assembled image in either mode; returned click indexes are not x/y coordinates.
  • Use canNoAnswer only when the challenge may genuinely contain no matching tile.

For the complete examples, prepare tile-1.png, tile-2.png, tile-3.png, tile-4.png, tile-5.png, tile-6.png, tile-7.png, tile-8.png, tile-9.png. You can change these filenames in the code.

File encoding & limits

02 / Request

Request parameters

POST/api/v1/captcha/tasks

Send the JSON object directly, without a task wrapper. Set kind to grid. All fields below belong to the JSON body.

Required headers
Authorizationstringrequired
Bearer followed by your ScrapingBuddy API key. Keep it on your server.
Content-Typestringrequired
application/json.
Idempotency-KeyUUID v4required
Retain one generated UUID per new task. Do not submit the same task concurrently.
Authentication guide
kindstringrequired
Always grid.
imagestring
One complete grid as a Base64 JPEG, PNG, or GIF image, or data URL. Up to 600 KB and 1000px on either side. Provide image or images, not both.
imagesstring[]
Alternative to image. Ordered tile images, exactly rows multiplied by columns. Each JPEG, PNG, or GIF may be up to 600 KB and 1000px per side; combined file size must not exceed 3 MB. Base64 and data URLs are supported.
commentstring
Describe which tiles should be selected. Required unless imgInstructions is provided.
imgInstructionsstring
Optional Base64 instruction image or data URL, up to 100 KB. Provide comment, imgInstructions, or both. This is not another grid tile.
rowsintegeroptional
Grid rows. Defaults to 3 and accepts 2 to 6.
columnsintegeroptional
Grid columns. Defaults to 3 and accepts 2 to 6.
minClicksintegeroptional
Minimum selections, 1 to rows multiplied by columns. Default: 1.
maxClicksintegeroptional
Maximum selections, at least minClicks and at most the tile count. Default: rows multiplied by columns.
canNoAnswerbooleanoptional
Allow a No_matching_images answer when no tile matches. Default: false.

Decoded file limits use 1 KB = 1,000 bytes. The complete JSON payload must fit within 5,000,000 bytes after Base64 encoding.

03 / Result

Understand the result

Creation returns HTTP 201. Fetching the task returns HTTP 200. Both wrap the task in task; always check its status before reading the solution.

The result is a list of tile numbers, not pixel coordinates. Numbering starts at 1. With click: [4, 5, 8], choose the first and second cells of row two, and the second cell of row three. Subtract 1 only when looking up an item in a zero-based programming array.

solution.clickinteger[]
One-based tile numbers, left to right and then top to bottom. [4, 5, 8] selects three tiles, not pixel coordinates.
solutionobject
With canNoAnswer enabled, handle a No_matching_images answer as no selection, not a tile index.
123456789
Number tiles from left to right, then top to bottom. A refreshed challenge needs a new task.
Shared task fields
idUUID
Save this ID to fetch the task or contact support.
statusstring
submitting or processing: wait. ready: use solution. failed: stop and read the error.
solutionobject | null
Null until a result is available. The shape depends on the CAPTCHA type.
errorCode / errorDescriptionstring | null
Task failure details. A failed task can still arrive with HTTP 200 or 201.
coststring | null
Provider-reported USD cost; not the customer debit.
chargedecimal string
Actual customer charge in USD: provider cost multiplied by 1.5. Zero before settlement or for legacy tasks.
billingStatusstring
reserved, charged, released, awaiting_credit, review, or legacy. A review requires support; awaiting_credit needs a top-up.
solveCountnumber | null
Provider-reported solving attempts when available.
createdAt / updatedAt / completedAttimestamp | null
Task timestamps; completedAt is null until the task has finished.
comment / requestMetastring / object
Saved instructions and input metadata. Raw files are not returned.

04 / Integrate

Complete examples

These Node.js and Python scripts prepare the input, create one task and poll until it is ready or failed. They stop waiting after approximately 3 minutes. A client timeout does not cancel the task.

  1. Set SCRAPINGBUDDY_API_KEY in your server environment.
  2. Place the input files beside your script, or update the filenames.
  3. For Node.js, use version 20+ and save as solve.mjs. For Python, install requests and save as solve.py.
  4. Run the script and retain the printed request and task IDs.

cURL shows task creation only. Use the GET example to retrieve its result.

When something goes wrong

Check whether you received an HTTP error or a task with status: failed. Fix validation errors before retrying. For HTTP 429, pause for Retry-After; all requests share the account limit of 60 per minute.

If creation times out, do not automatically submit another task. Keep your request ID and check the existing task or Usage first.

CAPTCHA API v1
CAPTCHA referenceCoordinatesGridDrag & DropBounding BoxNormalTextRotateAudio

Explore the documentation

CAPTCHA APIIntroduction

Choose a CAPTCHA solution, create a task and retrieve its answer.

Integration guidesYour first task

Make one request, wait for the answer, and read your first result. Start with a text question so you do not need to prepare a file.

Integration guidesAuthentication

Connect your backend securely with a ScrapingBuddy API key.

Integration guidesPrepare image & audio inputs

Encode the original file correctly and stay within the limits for your solution.

Integration guidesPolling & safe retries

Follow a task to completion without creating duplicate work.

Integration guidesErrors & troubleshooting

Find out whether a request was rejected, a task failed, or you simply need to wait.

Integration guidesList tasks & usage

Retrieve your recent tasks and account-level usage summary.

CAPTCHA referenceCoordinates CAPTCHA

Send one image and get back the x/y click points requested by your instruction. Use this for image challenges where the answer is one or more points, such as “click the apple” or “

CAPTCHA referenceGrid CAPTCHA

Send separate tile images or one complete grid and get back the selected tile numbers. Use this for challenges that ask the user to select matching squares from a tiled image.

CAPTCHA referenceDrag & Drop CAPTCHA

Send a background image plus puzzle pieces and get destination coordinates for each piece. Use this for visual puzzles where one or more draggable pieces must be placed into matchi

CAPTCHA referenceBounding Box CAPTCHA

Send one image and get object boundaries as xMin, xMax, yMin, and yMax. Use this for challenges that ask the user to draw a box around an object or region.

CAPTCHA referenceNormal CAPTCHA

Send a CAPTCHA image and get back the text that should be typed. Use this for distorted image text challenges where the expected answer is a string.

CAPTCHA referenceText CAPTCHA

Send a plain text question and get back the answer text. Use this for human-readable questions, riddles, or text-only challenges that do not require an image upload.

CAPTCHA referenceRotate CAPTCHA

Send an image and get back the angle needed to rotate it into the correct position. Use this for challenges where an image must be turned until it is upright or aligned.

CAPTCHA referenceAudio CAPTCHA

Send an MP3 audio CAPTCHA and get back the transcribed text. Use this for audio challenges where the answer is the words or numbers spoken in the file.