About this endpoint
What it does
Decodes every QR code and barcode found in an image and returns the decoded symbols in reader order. You can supply the image either as a public URL or as base64, and optionally restrict decoding to specific symbologies.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| image_base64 | String | Yes (if image_url is not provided) | Image to decode as base64: PNG, JPEG, WebP, GIF, BMP or TIFF, with or without a data: prefix. Supply exactly one of image_base64 or image_url. Max 5 MB. |
| image_url | String | Yes (if image_base64 is not provided) | Public HTTP(S) URL of the image to decode. Supply exactly one of image_base64 or image_url. Fetched over a size-guarded, SSRF-protected connection; max 5 MB. |
| formats | String Array | No | Restrict detection to these symbologies for speed and accuracy: qr, microqr, datamatrix, pdf417, aztec, code128, code39, code93, ean13, ean8, upca, upce, itf, codabar, databar, maxicode. Omit to scan every supported symbology. Unknown values return bad_image. |
| multiple | Boolean | No | Return every symbol found. Default true. Set false to return only the first symbol. |
Response
Returns a JSON object with a count integer field and a results array field. count is the number of symbols decoded, and each item in results is an object describing one decoded symbol and the data recovered from it.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| count | Integer | Yes | Number of symbols decoded. |
| results | Object Array | Yes | Decoded symbols, in reader order. |
| results[].format | String | Yes | Symbology of the symbol, e.g. qr, microqr, datamatrix, pdf417, aztec, code128, ean13 or upca. |
| results[].text | String | Yes | Decoded text of the symbol. |
| results[].content_type | String | Yes | Classification of the text: url, wifi, vcard, mecard, email, sms, tel, geo, event, whatsapp, epc, crypto or text. |
| results[].position | Object | Yes | Four corner points in pixels: top_left, top_right, bottom_right and bottom_left, each as [x, y]. |
| results[].orientation | Integer | Yes | Rotation of the symbol in degrees. |
| results[].parsed | Object | No | Fields recovered for known content types, e.g. ssid/password/security for Wi-Fi, name/email/phone for vCard, iban/name/amount for EPC/SEPA. null when the type has no structured fields. |
| results[].ec_level | String | No | Error-correction level (L, M, Q, H) for QR symbols, otherwise null. |
| results[].bytes_base64 | String | No | Base64 of the raw bytes when they differ from the text (binary payloads), otherwise null. |
| results[].symbology_identifier | String | No | ISO/IEC 15424 symbology identifier, e.g. ]Q1, when available. |
Notes
The image source is limited to 5 MB whether you send image_base64 or image_url. Images are downscaled to 4096 px on the longest side, and transparency is flattened onto white so transparent codes still read. When using image_url, the image is fetched over an SSRF-protected connection, and formats only accepts the listed symbologies; unknown values return bad_image.