NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Barcode Reader API

POST

Read EAN, UPC, Code 128 and other 1D barcodes from any image.

Barcode Reader decodes 1D barcodes from an uploaded image or an image URL, including EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF, Codabar and GS1 DataBar. It returns the decoded value and the symbology. Paid plans add the GTIN, the barcode's orientation and corners, and every barcode found in the image.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/barcodereader
image
Click or drag a file to upload.jpg, .jpeg, .png, .gif, .webp, .bmp · max 400KB for live testing
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "8480010092271",
    "format": "EAN-13",
    "isRetail": true,
    "gtin": "8480010092271",
    "orientation": 0,
    "position": {
      "topLeft": {
        "x": 565,
        "y": 366
      },
      "topRight": {
        "x": 1132,
        "y": 366
      },
      "bottomRight": {
        "x": 1145,
        "y": 734
      },
      "bottomLeft": {
        "x": 558,
        "y": 734
      }
    },
    "barcodeCount": 1,
    "barcodes": [
      {
        "text": "8480010092271",
        "format": "EAN-13",
        "gtin": "8480010092271",
        "orientation": 0,
        "position": {
          "topLeft": {
            "x": 565,
            "y": 366
          },
          "topRight": {
            "x": 1132,
            "y": 366
          },
          "bottomRight": {
            "x": 1145,
            "y": 734
          },
          "bottomLeft": {
            "x": 558,
            "y": 734
          }
        }
      }
    ]
  }
}

About the Barcode Reader API

Barcode Reader is a barcode reader API that decodes 1D barcodes from a photo, scan or screenshot. Upload an image or send a public image URL and get back the decoded value, the symbology and whether it is a retail product code. It reads EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF, Codabar and GS1 DataBar.

Decoding uses zxing-cpp and tries rotated and inverted versions of the image, so a barcode printed sideways or light on a dark background is still found. That makes it practical for inventory and warehouse apps, product lookup from a shelf photo, returns processing and reading shipping labels.

On the Free plan you get the first barcode found with its value, format and retail flag. Paid plans add the 13-digit GTIN for retail codes, the barcode's orientation and corner coordinates, and every barcode in the image, up to 10, each with the same detail.

How it works

The image, uploaded as image or fetched from a URL passed in image or url, is limited to 10MB. It is first converted to PNG and scaled down so neither side exceeds 1,600 pixels (smaller images are never enlarged), then decoded with zxing-cpp compiled to WebAssembly in try-harder mode with rotation and inversion attempts enabled. Only results that pass the symbology's own validation are returned.

Retail codes are normalised. A 13-digit EAN that starts with 0 is reported as UPC-A, with the 12-digit code in text and the full 13 digits in gtin. UPC-E keeps its short form in text and gets a zero-padded 13-digit gtin. EAN-13 and EAN-8 put the zero-padded value in gtin. isRetail is true for those four formats, and for every other symbology gtin is null.

orientation is the rotation in degrees at which the code was read, and position gives the four corners as pixel coordinates in the processed image, so for a large photo they refer to the scaled-down version. The top-level fields describe the first barcode found; barcodes lists up to 10 and barcodeCount how many there are.

An image with no readable 1D barcode returns a 404, unless it contains a 2D code (QR, Micro QR, PDF417, Data Matrix or Aztec), which returns a 422 naming that symbology; its content is not decoded. An unreadable or unsupported file returns a 400, and a URL that does not point to an image returns a 400 or 404.

What people use it for

Product Lookup
Read the EAN or UPC from a customer's photo of a product and look the item up in your catalogue by GTIN.
Inventory and Warehousing
Decode Code 128 and ITF labels from photos taken by staff without dedicated scanners.
Returns and Receipts
Pull order or parcel numbers out of photographed labels and receipts to match them to records.
Document Processing
Extract barcodes from scanned forms and shipping documents as part of an intake pipeline.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Questions.

Common questions about the Barcode Reader API.

Read the docs →
How many barcode scans does the Starter plan cover?
Starter covers 20,000 barcode scans each month. At 10 credits per request, that works out to $1.50 per 1,000 scans, or about $0.0015 per scan. The Free plan includes 20 scans per month for testing.
What does the Free plan return?
The Free plan returns the decoded value, the barcode format and whether it is a retail code. Paid plans add the 13-digit GTIN, the orientation, the corner coordinates and a list of every barcode found when an image holds more than one.
Which barcode formats are supported?
EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF (including ITF-14), Codabar, GS1 DataBar and GS1 DataBar Expanded. For QR codes, use the QR Code Reader API. PDF417, Data Matrix and Aztec are not supported; an image that contains one of these, or a QR code, returns a 422 naming the 2D symbology instead of a 404.
How large can the image be?
Uploads and image URLs can be up to 10 MB on paid plans and 400 KB on the Free plan. JPG, PNG, GIF, WebP and BMP are accepted. Images are scaled to fit 1600 pixels before decoding.
How are UPC-A and UPC-E reported?
A UPC-A is reported as UPC-A with its 12 digits, and a UPC-E with its 8 digits. The gtin field gives the same product as a 13-digit GTIN, which is what most product databases are keyed by.

Ready to build with Barcode Reader? Start with 200 free credits — one key unlocks all 404+ APIs.

Explore the catalog

404+ APIs on the same key and the same response shape.

Browse all APIs