API Documentation

The Barcode Lookup API documentation describes how to use our RESTful API service. All API responses are returned in JSON format. If you have additional questions, please email support.


Every user account is assigned one unique API key upon account creation. Authenticate your account by including your API Key in all requests.



Parameter Data Type Example Value Description
barcode integer 865694301167 barcode value must be 7, 8, 10, 11, 12, 13 or 14 digits
mpn string LXCF9407 the MPN parameter is the manufacturer part number
asin string B079L4WR4T the ASIN parameter is the Amazon Standard Identification Number
title string Red Running Shoes search by product name for any item
category string Home & Garden > Decor search by category - based on Google's product taxonomy
manufacturer string Samsung search by manufacturer - use double quotes ("") around value for an exact match
brand string Calvin Klein search by brand - use double quotes ("") around value for an exact match
search string Air Jordan Red Shoes Size 40 query all the search fields including product-name, category, brand and MPN
page integer 1056 pagination for API results that return more than 10 products
geo string us, gb, ca, eu (only possible values) filter online store results by geographical location
formatted string y (only possible value) beautify JSON output - recommended only for web browser use
key string isDzhm4Kav42OD93NEO your unique API key provided (required)
Note: Use multiple API parameters (mpn, product-name, category and/or geo) to filter your search results. The 'search' parameter is used for a more general search-everything response.
Curl Example
curl --include --header 'Accept: application/json' 'https://api.barcodelookup.com/v3/products?barcode=3614272049529&key=your_api_key'
Request URL Example
Response Code
Response Body
{ "products": [ { "barcode_number": "886736874135", "barcode_formats": "UPC 886736874135, EAN 0886736874135", "asin": "B01KUHG2G8", "model": "CE-XL3200", "title": "Nike Red Running Shoes - Size 10", "category": "Apparel & Accessories > Shoes", "brand": "Nike", "color": "Red", "description": "One of a kind, Nike Red Running Shoes that are great for walking, running and sports.", ....., ....., "features": [ "Gender: Female", "Size: US 7½", "Width: Medium", ], "images": [ "https://images.barcodelookup.com/5219/52194594-1.jpg", "https://images.barcodelookup.com/5219/52194594-2.jpg", "https://images.barcodelookup.com/5219/52194594-3.jpg" ], "stores": [ { "name": "Newegg.com", "country": "US", "currency": "USD", "currency_symbol": "$", "price": "41.38", "sale_price": "35.99", "tax": "", "link": "https://www.newegg.com/product-link", "item_group_id": "AB-4312", "availability": "in stock", "condition": "new", "shipping": "", "last_update": "2021-05-19 09:07:42" }, { "name": "Jet.com", "country": "US", "currency": "USD", "currency_symbol": "$", "price": "45.24", "sale_price": "35.99", "tax": "", "link": "https://www.jet.com/product-link", "item_group_id": "AB-4312", "availability": "in stock", "condition": "new", "shipping": "", "last_update": "2021-05-19 09:07:42" }, ....., ..... ], "reviews": [ { "name": "Josh Keller", "rating": "5", "title": "Love these shoes!", "review": "A stylish and great fitting shoe for walking and running.", "date": "2015-03-19 21:48:03" }, ....., ..... ] } ] }
Returned AttributeData TypeExample Value
barcode_formatsstringUPC 865694301167, EAN 4054106219206
titlestringLord Of The Rings
categorystringHome & Garden > Decor
manufacturerstringLEGO Systems, Inc.
brandstringRalph Lauren
contributorsarrayJ. K. Rowling
ingredientsstringTomatoes, Onions, Celery
nutrition_factsstringCalories 85, Protein 7g
energy_efficiency_classstringA+ (A+++ to D)
lengthstring3.7 inches
widthstring4.8 inches
heightstring2.5 inches
weightstring0.64 lbs
last_updatestring2021-05-19 09:07:42
descriptionstringDetailed product description...
featuresarray•Blue •Fast •Batteries Included
reviewsarrayName, Rating, Title, Review, Date
Parameter Data Type Description
formatted string beautify JSON output
key string your unique API key provided (required)
Curl Example
curl --include --header 'Accept: application/json' 'https://api.barcodelookup.com/v3/rate-limits?key=your_api_key'
Request URL Example
Response Code
Response Body
{ "allowed_calls_per_month": "500000", "remaining_calls_per_month": "408498", "allowed_calls_per_minute": "100", "remaining_calls_per_minute": "97" }

Code Examples

Below are a few sample scripts to help you get started. The code examples demonstrate how to make an API call and print output in several popular programming languages.

<?php $api_key = 'ENTER YOUR API KEY HERE'; $url = 'https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=' . $api_key; $ch = curl_init(); // Use only one cURL connection for multiple queries $data = get_data($url, $ch); $response = array(); $response = json_decode($data); echo '<strong>Barcode Number:</strong> ' . $response->products[0]->barcode_number . '<br><br>'; echo '<strong>Title:</strong> ' . $response->products[0]->title . '<br><br>'; echo '<strong>Entire Response:</strong><pre>'; print_r($response); echo '</pre>'; function get_data($url, $ch) { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $data = curl_exec($ch); curl_close($ch); return $data; }
<html> <script> function getAPIdata() { const proxyurl = "https://cors-anywhere.herokuapp.com/"; // Use a proxy to avoid CORS error const api_key = "ENTER_YOUR_API_KEY_HERE"; const url = proxyurl + "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=" + api_key; fetch(url) .then(response => response.json()) .then((data) => { document.getElementById("BarcodeNumber").innerHTML = (data.products[0].barcode_number); document.getElementById("ProductName").innerHTML = (data.products[0].title); document.getElementById("EntireResponse").innerHTML = JSON.stringify(data, null,"<br/>"); }) .catch(err => { throw err }); } </script> <body onload="getAPIdata()"> <strong>Barcode Number: </strong> <div id="BarcodeNumber"></div><br/> <strong>Title: </strong> <div id="ProductName"></div><br/> <strong>Entire Response: </strong> <div id="EntireResponse"></div> </body> </html>
# PYTHON 3 import urllib.request import json import pprint api_key = "ENTER_YOUR_API_KEY_HERE" url = "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=" + api_key with urllib.request.urlopen(url) as url: data = json.loads(url.read().decode()) barcode = data["products"][0]["barcode_number"] print ("Barcode Number: ", barcode, "\n") name = data["products"][0]["title"] print ("Title: ", name, "\n") print ("Entire Response:") pprint.pprint(data) # PYTHON 2 import urllib import json import pprint api_key = "ENTER_YOUR_API_KEY_HERE" url = "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=" + api_key response = urllib.urlopen(url) data = json.loads(response.read()) barcode = data["products"][0]["barcode_number"] print "Barcode Number: ", barcode, "\n" name = data["products"][0]["title"] print "Title: ", name, "\n" print "Entire Response:" pprint.pprint(data)
require "net/http" require "json" api_key = "ENTER_YOUR_API_KEY_HERE" url = "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=" + api_key uri = URI(url) response = Net::HTTP.get(uri) data = JSON.parse(response) barcode = data["products"][0]["barcode_number"] puts "Barcode Number: #{barcode} \n\n" name = data["products"][0]["title"] puts "Title: #{name}" puts "Entire Response:" puts JSON.pretty_generate(data)
import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import com.google.gson.Gson; import com.google.gson.GsonBuilder; public class Sample { public class Store { public String name; public String price; public String link; public String currency; public String currency_symbol; } public class Review { public String name; public String rating; public String title; public String review; public String date; } public class Product { public String barcode_number; public String barcode_formats; public String mpn; public String model; public String asin; public String title; public String category; public String manufacturer; public String brand; public String contributors; public String age_group; public String ingredients; public String nutrition_facts; public String color; public String format; public String multipack; public String size; public String length; public String width; public String height; public String weight; public String release_date; public String description; public Object[] features; public String[] images; public Store[] stores; public Review[] reviews; } public class RootObject { public Product[] products; } public static void main(String[] args) { try { URL url = new URL("https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=ENTER_YOUR_API_KEY_HERE"); BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())); String str = ""; String data = ""; while (null != (str= br.readLine())) { data+=str; } Gson g = new Gson(); RootObject value = g.fromJson(data, RootObject.class); String barcode = value.products[0].barcode_number; System.out.print("Barcode Number: "); System.out.println(barcode); String name = value.products[0].title; System.out.print("Title: "); System.out.println(name); System.out.println("Entire Response:"); System.out.println(data); } catch (Exception ex) { ex.printStackTrace(); } } }
use LWP::Simple; use JSON; use Data::Dumper; my $api_key = "ENTER_YOUR_API_KEY_HERE"; my $url = "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=".$api_key; my $json = get( $url ); die "Could not get $url!" unless defined $json; my $data = decode_json( $json ); my $barcode = $data->{products}->[0]->{barcode_number}; print "Barcode Number: ".$barcode."\n"; my $name = $data->{products}->[0]->{title}; print "Title: ".$name."\n"; print "Entire Response: \n"; print Dumper $data;
using System; using System.Net; using Newtonsoft.Json; using System.Collections.Generic; public class Store { public String name { get; set; } public String price { get; set; } public String link { get; set; } public String currency { get; set; } public String currency_symbol { get; set; } { public class Review { public String name { get; set; } public String rating { get; set; } public String title { get; set; } public String review { get; set; } public String date { get; set; } { public class Product { public String barcode_number { get; set; } public String barcode_formats { get; set; } public String mpn { get; set; } public String model { get; set; } public String asin { get; set; } public String title { get; set; } public String category { get; set; } public String manufacturer { get; set; public String brand { get; set; } public String contributors { get; set; } public String age_group { get; set; } public String ingredients { get; set; } public String nutrition_facts { get; set; } public String color { get; set; } public String format { get; set; } public String multipack { get; set; } public String size { get; set; } public String length { get; set; } public String width { get; set; } public String height { get; set; } public String weight { get; set; } public String release_date { get; set; } public String description { get; set; } public IList<object> features { get; set; } public IList<string> images { get; set; } public IList<Store> stores { get; set; } public IList<Review> reviews { get; set; } } public class RootObject { public IList<Product> products { get; set; } } class Program { static void Main(string[] args) { using (WebClient webClient = new System.Net.WebClient()) { WebClient n = new WebClient(); string api_key = "ENTER_YOUR_API_KEY_HERE"; string url = "https://api.barcodelookup.com/v3/products?barcode=077341125112&formatted=y&key=" + api_key; var data = n.DownloadString(url); var name = JsonConvert.DeserializeObject<RootObject>(data).products[0].title; System.Console.Write("Title: "); System.Console.WriteLine(name); var barcode = JsonConvert.DeserializeObject<RootObject>(data).products[0].barcode_number; System.Console.Write("Barcode Number: "); System.Console.WriteLine(barcode); System.Console.WriteLine("Entire Response: "); System.Console.WriteLine(data); } } }

API Queries

Barcode Search

When you make a call with a UPC, EAN or ISBN number, the barcode parameter is used. A barcode query always returns one product, if data for that item is available. Here's an example:



Every API query must be properly encoded. For example:

The category value: Apparel & Accessories > Shoes is represented as Apparel%20%26%20Accessories%20%3E%20Shoes in an API query.

Search Parameters

You can make a query using the mpn, asin, product-name, category, manufacturer or brand parameters, individually or by combining these fields using the & (AND) operator. The more parameters you use, the more filtered your output is since you can target multiple fields at once with different values.

When you use a search parameter or when you combine parameters, you may retrieve more than 1 result. Similar to how a search engine works: the first result is the most relevant, and the rest of the results become less relevant as you move down the list.

You can loop through search results by using the page parameter. There are up to 10 results per page. Here's an example:


Exact Match

You can use double quotes on manufacturer and brand values to get an exact match. Without quotes, the results may include values with additional words or variations. For example:


Search Everything

You can also use the search parameter to query all the parameters with a single search string. For example:



In the above examples, the formatted parameter is used. Setting this parameter equal to 'y' is convenient for beautifying the JSON output in your browser.

Rate Limits

Your monthly API call limit is determined by your API plan subscription.

The monthly API quota is only deducted when data is returned from a request, which will have a HTTP 200 status response code.

A maximum of 100 requests per minute is allowed. This rate limit can be increased for Enterprise accounts.

HTTP Status Codes

HTTP status codes returned from API:

200 OK
Data returned
403 Forbidden
Invalid API key
404 Not Found
No data returned
429 Too Many Requests
Exceeded API call limits

Update Account & Billing Information

You can update your API customer profile and billing information by logging into your API account.