Tools API Blog
Sign in Create account

Read QR and barcodes

Read QR and barcodes is an API that reads the QR codes and barcodes in an image or a PDF and returns their content as text. It's the counterpart of QR generator and Barcode generator, which create them.

How it works

You send the image (or the PDF) and get back a list of every code it finds: what type it is (QR, Code 128, EAN-13…) and what it says. It reads several codes at once, even if they're rotated, small, or the photo isn't perfect. Reading happens on our own servers: the image isn't sent to any third-party service.

Honest note: it reads sharp, rotated, small or slightly noisy codes well. With very blurry photos, half-covered codes or very low contrast it may find nothing: in that case it returns an empty list, and the credit is still charged because the work was done. A PDF is read page by page (up to 20 pages per call; pick which ones with pages).

All you need

  • Your API key. Create it in your dashboard with "+ Create key".
  • In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream…).

How to use it in n8n

  • Method: POST · URL: https://api.cofferdock.com/code-reader
  • Send Headers: x-api-key = your key
  • Send Body: binary file (in n8n: "n8n Binary File"), the image or the PDF
  • The result has text (the content of the first code) and codes (the list of all of them).

Options

OptionDefaultWhat it does
formatsallLook only for certain types, for example QRCode or EAN13,Code128.
max_codes20How many codes to return at most (1 to 50).
pagesallPDF only: which pages to read, for example 1-3,5.

What you get back

text is the content of the first code (or null if there are none), meant to be used directly in your workflow. codes is the list of all of them: format (the type), text (what it says) and content_type (Text, Binary, GS1…). If a QR carries data that isn't text, bytes_base64 comes too. In a PDF, each code also has page, the number of the page it's on.