# Barcode Reader API

> 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.

**Endpoint:** `POST https://api.apiverve.com/v1/barcodereader`  
**Category:** Images  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/barcodereader

## Overview

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.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/barcodereader" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "image=@photo.jpg"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string | No | An image file containing a barcode (JPG, PNG, GIF, WebP or BMP), or a public image URL |

## Response fields

- `text` — string · The decoded barcode value
- `format` — string · The symbology, such as EAN-13, UPC-A, Code 128 or ITF
- `isRetail` — boolean · True for retail product codes (EAN-13, EAN-8, UPC-A, UPC-E)
- `gtin` — string · The 13-digit GTIN for retail codes, null for other formats · (premium)
- `orientation` — number · Rotation of the barcode in degrees · (premium)
- `position` — object · Corner coordinates of the barcode in the decoded image · (premium)
  - `position.topLeft` — object · Top left corner with x and y · (premium)
    - `position.topLeft.x` — number · (premium)
    - `position.topLeft.y` — number · (premium)
  - `position.topRight` — object · Top right corner with x and y · (premium)
    - `position.topRight.x` — number · (premium)
    - `position.topRight.y` — number · (premium)
  - `position.bottomRight` — object · Bottom right corner with x and y · (premium)
    - `position.bottomRight.x` — number · (premium)
    - `position.bottomRight.y` — number · (premium)
  - `position.bottomLeft` — object · Bottom left corner with x and y · (premium)
    - `position.bottomLeft.x` — number · (premium)
    - `position.bottomLeft.y` — number · (premium)
- `barcodeCount` — number · Number of barcodes found in the image (up to 10) · (premium)
  - `barcodes.0.text` — string · Decoded value · (premium)
  - `barcodes.0.format` — string · Symbology · (premium)
  - `barcodes.0.gtin` — string · 13-digit GTIN for retail codes, null otherwise · (premium)
  - `barcodes.0.orientation` — number · Rotation in degrees · (premium)
  - `barcodes.0.position` — object · Corner coordinates · (premium)
    - `barcodes.0.position.topLeft` — object · (premium)
      - `barcodes.0.position.topLeft.x` — number · (premium)
      - `barcodes.0.position.topLeft.y` — number · (premium)
    - `barcodes.0.position.topRight` — object · (premium)
      - `barcodes.0.position.topRight.x` — number · (premium)
      - `barcodes.0.position.topRight.y` — number · (premium)
    - `barcodes.0.position.bottomRight` — object · (premium)
      - `barcodes.0.position.bottomRight.x` — number · (premium)
      - `barcodes.0.position.bottomRight.y` — number · (premium)
    - `barcodes.0.position.bottomLeft` — object · (premium)
      - `barcodes.0.position.bottomLeft.x` — number · (premium)
      - `barcodes.0.position.bottomLeft.y` — number · (premium)

## Sample response

```json
{
  "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
          }
        }
      }
    ]
  }
}
```

## Use cases

- **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.

## More

- Full reference: https://docs.apiverve.com/ref/barcodereader
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
