Lookup EAN Barcode Value & Return Product Data with Java: Barcode Lookup API

Barcodes make it easy to get key details about a product, but you still need a way to search the barcode. Our EAN Lookup API will return key details about a product based on an EAN barcode number input — just that simple. Easily implement this into your project using code provided in Java below, or head to our API console page to find code available in 12 additional programming languages.

Start by installing the Java SDK with Maven. Add a reference to the repository in pom.xml:


After that, add one to the dependency in pom.xml:


Now finish up by adding the import classes and calling the function:

// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.BarcodeLookupApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
BarcodeLookupApi apiInstance = new BarcodeLookupApi();
String value = "value_example"; // String | Barcode value
try {
BarcodeLookupResponse result = apiInstance.barcodeLookupEanLookup(value);
} catch (ApiException e) {
System.err.println("Exception when calling BarcodeLookupApi#barcodeLookupEanLookup");




There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

AnySwap Integrates with Coin98 Wallet!

Tree Traversal Using Tail Recursion

TIL 2020.1106

My first task as an intern with HNG.

An 18-Year-Old’s Frontend Development Journey

How to Convert a PDF File to PDF/A in C/C++


Why the Raspberry PI Zero W is the best fit for me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

Integrate AWS Secrets Manager With Spring Boot Application

Convert a Photo of a Document into Text using Java

CRUD ElasticSearch — Java API Client

Amazon EC2 + SSL from Let’s encrypt in Spring Boot application