Product API

Look up a product by its EAN, UPC, GTIN, or ISBN using GET /api/v2/product/{barcode}. Pass your JWT in the Authorization header. The API returns JSON. See Quickstart for help obtaining a token.

curl -H 'Authorization: Bearer YOUR_JWT' \
     -H 'Accept: application/json' \
     https://ean-db.com/api/v2/product/9780141439518
Status Meaning
200 Product found.
400 The barcode is invalid.
403 Access is denied.
404 The barcode is valid, but the product was not found.

200 — Product found

A successful response contains balance, the remaining number of requests, and the product record.

{
  "balance": 100,
  "product": {
    "barcode": "9780141439518",
    "titles": {
      "en": "Pride and Prejudice"
    },
    "categories": [
      {
        "id": "543543",
        "titles": {
          "en": "Print Books",
          "ru": "Печатные книги"
        }
      }
    ],
    "descriptions": null,
    "manufacturer": {
      "id": null,
      "titles": {
        "en": "Penguin Classics"
      },
      "wikidataId": null
    },
    "relatedBrands": [],
    "images": [],
    "metadata": {
      "printBook": {
        "bindingType": "paperback"
      }
    },
    "barcodeDetails": {
      "type": "EAN-13",
      "description": "ISBN, English language",
      "country": null
    }
  }
}
Product field Contents
barcode, barcodeDetails Normalized barcode and its classification.
titles, descriptions Product text keyed by language code, when available.
categories Product categories.
images Product images and usage rights.
metadata Product metadata.

See the ProductResponse JSON Schema for the full response contract.

Companies and brands

See Companies and brands for manufacturer and relatedBrands.

404 — Product not found

You’ll get this kind of response if there is no product with the requested barcode in our database. 404 responses do not reduce your account balance.

{
  "error": {
    "code": 404,
    "description": "Product not found: 9785811264209"
  },
  "balance": 100
}

403 — Access denied

You can get 403 response for a couple of reasons:

  • Authorization header containing your JWT is missing, malformed or invalid.

    In this case you’ll see a message JWT is missing or invalid, check Authorization header in the description field of the error response. You could check the tutorial for more information on how get JWT and pass it correctly.

  • Your account email is not confirmed.

    We require that you confirm your email address by visiting a confirmation link in a welcome email sent to you after registration.

    In case of this error description field contains a message Your account is not confirmed, please check your email for confirmation link.

  • Your JWT was revoked (look for JWT revoked message in the description field).

    You can revoke your current JWT (and effectively deny access to anyone who tries to use it) in your account area. This error is what you’ll see if you make an API request using one of the revoked JWTs.

  • Your JWT is expired (look for JWT expired message in the description field).

    JWT expires after one year since it was generated. If you get this error, you need to generate new JWT in your account area and replace the old one with freshly generated JWT.

  • Your account balance is empty.

    In this case description field contains a message Your account balance is empty.

{
  "error": {
    "code": 403,
    "description": "Your account balance is empty"
  }
}

400 — Barcode is invalid

400 response code indicates that the barcode you passed in your API request is invalid for some reason (contains invalid charachters, too short or too long, etc). Detailed information is given in the description field of an error response.

{
  "error": {
    "code": 400,
    "description": "Invalid barcode: 978581126barcode"
  }
}

Related topics: ProductResponse JSON schema · Billing