Skip to main content
Skip to content
ScrapingBuddyDevelopers
On this page Send file contents, not a file path

CAPTCHA API/Guides

Prepare image & audio inputs

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

Send file contents, not a file path

Read the file on your server and encode its bytes as Base64. Put that string into the image, audio, background or images field required by your solution.

A local filename or an https image URL is not a supported file input. Raw Base64 and matching data URLs are supported. The short strings in JSON examples are placeholders, not valid images.

Example
import { readFile } from "node:fs/promises";
const image = (await readFile("challenge.png")).toString("base64");

Check decoded size and JSON size

Normal CAPTCHA images may be up to 100 KB. Other main image inputs and each drag-and-drop piece may be up to 600 KB. Grid instruction images may be up to 100 KB. Audio uses MP3, up to 1 MB.

Grid tiles must total 3 MB or less before encoding. The entire encoded JSON request must also fit within 5,000,000 bytes. Base64 increases the file size by roughly one third, so a file that fits its own limit can still make a combined request too large.

Image formats are JPEG, PNG and GIF. Keep grid images and tiles at or below 1000 px per side. Check the individual reference for any additional provider limits. Here, KB means 1,000 bytes.

Preserve ordering and dimensions

For a grid, send tiles from left to right across the first row, then the next row. The array length must equal rows multiplied by columns. Do not send both image and images.

For drag-and-drop, keep puzzle pieces in a stable order: each result entry corresponds to the same input array position. Coordinate and bounding-box results refer to the original image, not a resized preview.

Write a clear instruction

Describe the actual answer you need, for example: Select every tile containing a bus. Avoid instructions that contradict the image or ask for several unrelated actions.

Instructions accept up to 1000 characters after trimming. A grid can use comment, imgInstructions or both. The instruction image describes the target; it is not an extra tile.

Only send challenge content you are authorized to process. Do not include private account data, passwords or API keys in files or instructions.

CAPTCHA API v1
Getting startedIntroductionYour first taskAuthenticationPrepare image & audio inputs
Integration guidesPolling & safe retriesErrors & troubleshootingList tasks & usage

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.