Product API is available at https://ean-db.com/api/v2/product/{barcode} endpoint where {barcode} is a placeholder for an actual EAN / UPC / ISBN barcode.
A successful request like this:
curl -X GET -H 'Authorization: Bearer HERE_GOES_YOUR_JWT_TOKEN' -H 'Accept: application/json' \
https://ean-db.com/api/v2/product/1234567890123
returns a response with 200 response code and a ProductResponse object.
Note that we use Accept: application/json header to specify JSON response content type. This is the only supported content type. If Accept header is omitted then application/json is assumed by default.
{
"balance": 100, // Your current balance (remaining requests), integer
"product": {
"barcode": "1234567890123", // Product barcode normalized to canonical GTIN-8/12/13/14 form, string
"barcodeDetails": {
"type": "EAN-13", // Barcode type: EAN-8, EAN-13, EAN-14 or ISBN
"description": "GS1 US", // Barcode prefix description
"country": "us" // Barcode country (if defined)
},
"titles": {
"en": "Product title", // Product titles, language → title mapping
"de": "Produktname"
},
// Product categories, array of objects (or an empty array)
"categories": [
{
"id": "3911", // Category id from Google product taxonomy, string
"titles": { // Category titles, "lang" → "title" mapping
"en": "Bath Toys"
}
},
{
"id": "543543",
"titles": {
"en": "Print Books"
}
}
],
// Product manufacturer or brand (if available, may be null)
"manufacturer": {
"id": "manufacturer-id", // Manufacturer / brand id (for identified manufacturers, may be null), string
"titles": { // Manufacturer / brand titles, "lang" → "title" mapping
"en": "Manufacturer"
},
"wikidataId": "Q12345" // Manufacturer / brand id from Wikidata knowledge base (https://wikidata.org)
// (if exists, may be null), string
},
// Other brands that may be related to a product (distributors, collaborations, etc), array of objects (or an empty array)
"relatedBrands": [{
"id": "related-manufacturer-id",
"titles": {
"en": "Related manufacturer"
},
"wikidataId": "Q12346"
}],
// Product images, array of objects (or an empty array)
"images": [
{
"url": "https://ean-db.com/image.jpg", // Image URL, string
"isCatalog": true // True if an image can be used in a catalog (professionally captured),
"width": 500, // Image width in pixels
"height": 500 // Image height in pixels
}
],
// Product metadata (if available, may be null)
"metadata": {
"printBook": {
"numPages": 123
},
"media": {
"publicationYear": 2010
}
}
}
}
For a formal description of the response object please refer to ProductResponse JSON schema.
Let’s take a closer look at the available properties.
categories field is an array of objects containing id and titles of each product category (or an empty array if the product is not yet categorized). Products are categorized using Google’s product taxonomy, please refer to this article for more information about taxonomy.
The manufacturer field contains information about the product’s manufacturer or brand. This field may be null if the information is not yet available. When present, at least manufacturer.titles is provided.
Some companies and brands are identified in our database. In such cases, the manufacturer.id field is present. This is a permanent identifier that can be used to disambiguate between manufacturers with similar or identical names.
The relatedBrands field contains information about other brands associated with the product or appearing on the packaging (for example, distributors or collaboration partners). This field is an array of objects with the same structure as the manufacturer field. All companies and brands listed in relatedBrands are identified and therefore always include an id field.
The images field is an array of objects containing URLs of product images (or an empty array if the product has no images yet).
For many products metadata field may be available (non-null). It aggregates product metadata like weight, nutritional value for a food product or number of pages for a print book. The set of available metadata may vary depending on the product type. For detailed information please see Product metadata.
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, // Error code, integer
"description": "Product not found: 9785811264209" // Short error description, string
},
"balance": 100 // Your current balance (remaining requests), integer
}
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.
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.
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.
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.
In this case description field contains a message Your account balance is empty.
{
"error": {
"code": 403,
"description": "Your account balance is empty" // Or one of the other error messages
}
}
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" // Or one of the other error messages
}
}
Related topics: ProductResponse JSON schema · Billing