Loading

API Documentation

The Barcode API describes how to use our RESTful API service. All API responses are returned in JSON format. If you have any questions, please complete the questionnaire below. support.


Authentication

Each user account is assigned a unique API key when creating an account. Verify your account by including your API key in all requests.

https://www.barcodeapi.nl/api/?key=your_api_key

Endpoints

Parameter Data Type Example value Description
ean integer 5425037233606 ean value must be 7, 8, 10, 11, 12, 13 or 14 digits.
mpn string LXCF9426B07 the MPN parameter is the manufacturer part number.
product-name string Red Running Shoes search by product name for any item.
category string Home & Garden > Decor search by category for any item.
search string Air Jordan Red Shoes Size 40 query all the search fields including product-name, category, brand and EAN and MPN.
page integer 1056 pagination for API results that return more than 10 products.
formatted string y (only possible value) beautify JSON output - only to be used in a browser
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://www.barcodeapi.nl/api/?ean=3614272049529&key=your_api_key'
Request URL example
https://www.barcodeapi.nl/api/?ean=3614272049529&formatted=y&key=your_api_key
Response Code
200
Response Body
[ { "name": "Dirkje Rompertje lange mouw light pink - Maat 74\/80", "ean": "8719052003816", "merk": "Dirkje", "description": "collectie: Romper * Fijne basic kledingstuk van Dirkje babywear, onmisbaar in iedere garderobe van een baby of peuter. * Oerdegelijke kwaliteit, comfortabel materiaal: 95% katoen en 5% elastan. * Bekijk hier alle . SPECIALE AANBIEDING: koop 3 items in dezelfde maat en kleur en u krijgt 25% korting. Wijzig het aantal naar 3 en de korting wordt automatisch toegepast in de winkelwagen.", "images": [ { "image_1": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079000011_1.jpg" }, { "image_2": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079000011_2.jpg" }, { "image_3": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079000011_3.jpg" }, { "image_4": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079000011_4.jpg" }, { "image_5": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079000011_6.jpg" } ] }, { "name": "[en.casa]® Design wandplank - planken - wit model 9", "ean": "4251155596580", "merk": "en.casa", "description": " Design wandplank De trendy retro stijl wandplank is de perfecte keuze voor uw huis. Productbeschrijving: - stijlvol wandplank - eenvoudige en snelle installatie - Draagcapaciteit: ca. 15kg - MDF, mat gelakt Afmetingen: - Volledige grootte (L x B x H): 60x11x12cm Materiaal: MDF Kleur: wit, gelakt - mat Merk: [en.casa]\u00ae De pakket bevat: 1x wandplank met alle benodigde montagemateriaal ", "images": [ { "image_1": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000098800011_1.jpg" }, { "image_2": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000098800011_2.jpg" }, { "image_3": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000098800011_3.jpg" } ] }, { "name": "Zebra Trends Riem Kids 65 - brown", "ean": "7106584309669", "merk": "Zebra trends", "description": "Leren meisjes riem in de mooie kleur Shiny Brown van het merk Zebra trends.De riem heeft een lengte van 65 CM.", "images": [ { "image_1": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000079800011_1.jpg" } ] }, { "name": "Jaxon Hats Herringbone Flat Cap Bruin - S", "ean": "5055303799026", "merk": "Jaxon Hats", "description": "De Herringbone Flat Cap van Jaxon Hats. Deze iconische cap is een must voor elke flat cap collectie en heeft een uitstekende prijs kwaliteit verhouding. Herkenbaar herringbone patroon De flat cap komt in het klassieke herringbone patroon, een veel gezien patroon wat leuk past bij verschillende outfits en veel warmte uitstraalt. De cap is een mix van 40% wol en 60% polyester. De binnenkant heeft een satijnen voering en voelt daardoor heerlijk zacht aan. De cap is geschikt te dragen in alle seizoenen. Onmisbare toevoeging De Herringbone Flat Cap van Jaxon Hats komt in een licht bruine kleur waardoor het herringbone patroon er goed weet uit te springen. De cap geeft je een iconische look en is een onmisbare toevoeging voor elke cap collectie.", "images": [ { "image_1": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_1.jpg" }, { "image_2": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_2.jpg" }, { "image_3": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_3.jpg" }, { "image_4": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_4.jpg" }, { "image_5": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_5.jpg" }, { "image_6": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000056010011_6.jpg" } ] }, { "name": "JURK ROSALITA SENORITAS 104", "ean": "8433875104795", "merk": "Rosalita Senoritas", "description": "DESIGN JURK, KORT, MET WIT ROND KRAAGJE, RITSEN, STUDS, PRINT, APPLICATIES EN BORDUURSELS EN MET RITSSLUITING OP HET ACHTERPAND VAN ROSALITA SENORITAS IN MAAT 104", "images": [ { "image_1": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000072910011_1.jpg" }, { "image_2": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000072910011_2.jpg" }, { "image_3": "https:\/\/barcodeapi.nl\/imgbase0\/imagebase3\/large\/FC\/1\/1\/0\/0\/9200000072910011_3.jpg" } ] } ]
Returned AttributeData TypeExample value
ean_numberinteger5425037233606
mpnstringFCB16-045-2J
Product nameStringPyjama Kids -2J
CategoryStringBaby & Kids Nightwear
StringClub Brugge
SeizoensjaarString2018
KleurStringBlauw / Zwart
MateriaalbeschrijvingStringKatoen
DoelgroepStringKinderen
SeizoenscollectieStringLente/Zomer
ModelStringVoor unisex
Parameter Data Type Description
formatted string beautify JSON output - only to be used in a browser
key string your unique API key provided (required)
Curl example
curl --include --header 'Accept: application/json' 'https://www.barcodeapi.nl/api/?key=your_api_key'
Request URL Example
https://www.barcodeapi.nl/api/?formatted=y&key=your_api_key
Response Code
200
Response Body
{ "allowed_calls_per_month": "500000", "remaining_calls_per_month": "408498", "allowed_calls_per_minute": "100", "remaining_calls_per_minute": "97" }

How search works

When you combine the manufacturer, mpn, brand, name or category parameters, these specific fields are joined using the & (AND) operator. So the more parameters you use, the more filtered your output is since you can target multiple fields at once with different values. For example:

https://www.barcodeapi.nl/api/?category=Apparel%20%26%20Accessories%20%3E%20Shoes&brand=Nike&mpn=885691-001&formatted=y&key=your_api_key
The category parameter must be encoded. Apparel & Accessories > Shoes is represented as Apparel%20%26%20Accessories%20%3E%20Shoes in the above URL.

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

https://www.barcodeapi.nl/api/?search=olive%20oil%20from%20italy&formatted=y&key=your_api_key

Most of the time, you'll get more than 1 result when you use the search parameter or when you combine parameters. It's similar to how a search engine works: the first result is the most relevant, with the rest of the results becoming less relevant as you move down the list.


Code examples (Codes are all in english)

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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=' . $api_key; $ch = curl_init(); // Use only one cURL connection per query en 100 queries per minute. $data = get_data($url, $ch); $response = array(); $response = json_decode($data); echo '<strong>EAN:</strong> ' . $response->products[0]->ean_number . '<br><br>'; echo '<strong>Product name:</strong> ' . $response->products[0]->product_name . '<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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=" + api_key; fetch(url) .then(response => response.json()) .then((data) => { document.getElementById("EAN").innerHTML = (data.products[0].ean_number); document.getElementById("Product name").innerHTML = (data.products[0].product_name); document.getElementById("Entire Response").innerHTML = JSON.stringify(data, null,"<br/>"); }) .catch(err => { throw err }); } </script> <body onload="getAPIdata()"> <strong>EAN: </strong> <div id="EAN"></div><br/> <strong>Product name: </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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=" + api_key with urllib.request.urlopen(url) as url: data = json.loads(url.read().decode()) ean = data["products"][0]["ean_number"] print ("EAN: ", ean, "\n") name = data["products"][0]["product_name"] print ("Product name: ", 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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=" + api_key response = urllib.urlopen(url) data = json.loads(response.read()) ean = data["products"][0]["ean_number"] print "EAN: ", ean, "\n" name = data["products"][0]["product_name"] print "Product name: ", name, "\n" print "Entire Response:" pprint.pprint(data)
require "net/http" require "json" api_key = "ENTER YOUR API KEY HERE" url = "https://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=" + api_key uri = URI(url) response = Net::HTTP.get(uri) data = JSON.parse(response) ean = data["products"][0]["ean_number"] puts "EAN: #{barcode} \n\n" name = data["products"][0]["product_name"] puts "Product name: #{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 store_name; public String store_price; public String product_url; public String currency_code; public String currency_symbol; } public class Review { public String name; public String rating; public String title; public String review; public String datetime; } public class Product { public String ean_number; public String barcode_type; public String barcode_formats; public String mpn; public String product_name; public String title; public String category; public String brand; public String release_date; public String description; public Object[] features; public String[] images; public Store[] stores; } public class RootObject { public Product[] products; } public static void main(String[] args) { try { URL url = new URL("https://www.barcodeapi.nl/api/?ean=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 ean= value.products[0].ean_number; System.out.print("Ean: "); System.out.println(barcode); String name = value.products[0].product_name; System.out.print("Product name: "); 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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=".$api_key; my $json = get( $url ); die "Could not get $url!" unless defined $json; my $data = decode_json( $json ); my $eancode = $data->{products}->[0]->{ean_number}; print "EAN: ".$eancode."\n"; my $name = $data->{products}->[0]->{product_name}; print "Product name: ".$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 store_name { get; set; } public String store_price { get; set; } public String product_url { get; set; } public String currency_code { 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 datetime { get; set; } { public class Product { public String ean_number { get; set; } public String barcode_type { get; set; } public String barcode_formats { get; set; } public String mpn { get; set; } public String product_name { get; set; } public String title { get; set; } public String category { get; set; } public String brand { 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://www.barcodeapi.nl/api/?ean=077341125112&formatted=y&key=" + api_key; var data = n.DownloadString(url); var name = JsonConvert.DeserializeObject<RootObject>(data).products[0].product_name; System.Console.Write("Product name: "); System.Console.WriteLine(name); var ean= JsonConvert.DeserializeObject<RootObject>(data).products[0].ean_number; System.Console.Write("Ean Number: "); System.Console.WriteLine(ean); System.Console.WriteLine("Entire Response: "); System.Console.WriteLine(data); } } }

API call limits

You can make a maximum of 100 requests per minute.

Each request is considered 1 API call if data is returned.

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


Error 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.

Ask your question

First, check the FAQ page if the question is already mentioned here: FAQ PAGE
If not, fill in the form below.