Top Brands
GEThttps://api-barcode-lookup.dataandapis.com/v1/brands
Top Brands is an endpoint of the Barcode Lookup API. Product name, brand, ingredients and Nutri-Score for 4.3 million barcodes.
Send your key in the X-Api-Key header. Each call costs 1 token; a free key includes 500 tokens a month.
Request
Query parameters
| Parameter | Example | |
|---|---|---|
| dataset | food | Optional |
Example request
curl
curl "https://api-barcode-lookup.dataandapis.com/v1/brands?dataset=food" \
-H "X-Api-Key: YOUR_API_KEY"JavaScript / TypeScript (dataandapis package)
// npm install dataandapis
import { DataAndApis } from "dataandapis";
const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY
const data = await client.barcodeLookup.topBrands({ dataset: "food" });Node.js (fetch)
const res = await fetch("https://api-barcode-lookup.dataandapis.com/v1/brands?dataset=food", {
headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();Python (dataandapis package)
# pip install dataandapis
from dataandapis import DataAndApis
client = DataAndApis() # reads DATAANDAPIS_API_KEY
data = client.barcode_lookup.top_brands(dataset="food")Python (requests)
import os, requests
r = requests.get(
"https://api-barcode-lookup.dataandapis.com/v1/brands?dataset=food",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Guide to the dataandapis npm package →Guide to the dataandapis Python package →
Example response
Example response{
"ok": true,
"count": 8,
"brands": [
{
"brand": "Carrefour",
"products": 27509
},
{
"brand": "Auchan",
"products": 18104
},
{
"brand": "Coop",
"products": 13934
},
{
"brand": "Lidl",
"products": 13689
},
{
"brand": "Aldi",
"products": 11700
},
{
"brand": "Hacendado",
"products": 10337
},
…
Show full response
Example response
{
"ok": true,
"count": 8,
"brands": [
{
"brand": "Carrefour",
"products": 27509
},
{
"brand": "Auchan",
"products": 18104
},
{
"brand": "Coop",
"products": 13934
},
{
"brand": "Lidl",
"products": 13689
},
{
"brand": "Aldi",
"products": 11700
},
{
"brand": "Hacendado",
"products": 10337
},
…{
"ok": true,
"count": 8,
"brands": [
{
"brand": "Carrefour",
"products": 27509
},
{
"brand": "Auchan",
"products": 18104
},
{
"brand": "Coop",
"products": 13934
},
{
"brand": "Lidl",
"products": 13689
},
{
"brand": "Aldi",
"products": 11700
},
{
"brand": "Hacendado",
"products": 10337
},
{
"brand": "Tesco",
"products": 10225
},
{
"brand": "Delhaize",
"products": 9742
}
]
}