QR Decoder

API key v1

Read the contents of a QR code from an image URL or base64 data.

Downloads or decodes the image you point it at, finds the QR code in it and returns the encoded text. Remote images are capped at 8 MB, and URLs that resolve to private or loopback addresses are refused.

GET https://api.zactonz.com/qr/dec/

Parameters

NameTypeDescription
imagerequired string

An http or https URL of the image, or the base64-encoded image bytes when format=base64. A data:image/...;base64, prefix is accepted and stripped.

format enum

How image should be read. link is an alias of url.

urlbase64

Send parameters in the query string.

Response

On success `data` is the decoded text.

FieldTypeDescription
status integer

200 on success. See status codes below.

data string

The text encoded in the QR code, or an error message for non-200 statuses.

Status codes

The outcome is reported in the JSON status field. See Errors & status codes for the general rules.

200 OK

A code was found and decoded.

400 Missing image

image was empty or absent.

401 Image not usable

The URL was invalid, not http(s), pointed at a private host, exceeded 8 MB, or the base64 payload could not be decoded. data says which.

422 No QR code found

The image loaded but no QR code could be read from it.

Notes

GET is fine for image URLs. When sending base64 data, use POST with the same field names so the payload is not limited by URL length.