
EAN-Search
Data AccessEAN, or EAN13, stands for International Article Number (originally European Article Number). It is an extension of the UPC codes and you'll find them as barcodes on most everyday products. Sometimes the barcode is also called GTIN or GTIN13 (Global Trade Identifier).
📚 Documentation & Examples
Everything you need to integrate with EAN-Search
🚀 Quick Start Examples
// EAN-Search API Example
const response = await fetch('https://www.ean-search.org/ean-database-api.html', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Using the EAN Database API for Efficient Product Search
The EAN Database API is a free and powerful tool for developers looking to integrate product search into their application. By leveraging the large database of product codes (EAN, UPC, ISBN, etc.), developers can quickly and efficiently retrieve product information. In this article, we will provide examples of how to use the EAN Database API in JavaScript.
How to Get an EAN-Search API Token
EAN-Search is a paid barcode/product-lookup API — there's no permanent free tier, but there is a cheap trial to evaluate it.
- Register for an account at ean-search.org.
- Open your account page to find your access token.
- Pass it on every request as the
tokenquery parameter (notapikey).
Pricing starts with a trial of 100 queries/month for €1 the first month, then €9/month; higher tiers scale up (Pro: 5,000 queries/month at €19/month, and beyond). Check the current pricing page before you build.
curl "https://api.ean-search.org/api?token=YOUR_TOKEN&op=barcode-lookup&ean=5099750442227&format=json"
Available operations include barcode-lookup, product-search, barcode-prefix-search and more, all against the https://api.ean-search.org/api base URL. The same token works for EAN, UPC and ISBN codes, and you can call op=account-status at any time to see how many queries you have left in the current billing period before you run out mid-project.
Example 1: Searching for a Product by EAN
The most common use case for the EAN Database API is to search for a product by its EAN code. The following JavaScript code demonstrates how to make a GET request to the API using the fetch API:
let eanCode = "9780735619333"; // EAN code for a Microsoft Windows Server 2003 book
let apiKey = "YOUR_API_KEY";
fetch(`https://api.ean-search.org/api?apikey=${apiKey}&op=barcode-lookup&ean=${eanCode}`)
.then(response => response.json())
.then(json => console.log(json));
In this example, we are searching for a book with EAN code "9780735619333". We construct the URL of our request by providing our API key, operation code (barcode-lookup), and the EAN code we are searching for. Then, we use the fetch API to make the GET request and parse the response as JSON.
The API will return a large JSON object with a lot of information about the product, including its name, brand, price, and more. You can filter through this information to find the data points you need for your application.
Example 2: Searching for a Product by Keyword
Another feature of the EAN Database API is the ability to search for products using a keyword. The following JavaScript code demonstrates how to make a GET request to the API using a search query:
let query = "iphone"; // search query
let apiKey = "YOUR_API_KEY";
fetch(`https://api.ean-search.org/api?apikey=${apiKey}&op=product-search&query=${query}`)
.then(response => response.json())
.then(json => console.log(json));
In this example, we are searching for all products that contain the keyword "iphone". Again, we construct the URL of our request by providing our API key, operation code (product-search), and the query we are searching for.
The API will return a JSON object with an array of products that match your search query. Each product has a lot of information associated with it, as in Example 1.
Conclusion
The EAN Database API is a powerful tool for developers looking to integrate product search into their application. With just a few lines of JavaScript code, we can reliably retrieve product information from a large database of product codes. By providing both EAN code and keyword search functionality, the API is suited for a wide variety of use cases.








