Product-API

FREEMIUM
By dev.laurent
Updated 2 months ago
Food
5.2/10
Popularity Score
1261ms
Latency
46%
Success Rate

Product-API API Documentation

Receive food product informations by providing just the barcode of the product

View API Details
GETProduct
GETProduct

Get product by UPC or EAN-13

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
product_codeSTRING
REQUIREDUPC or EAN-13
Code Snippet
unirest.get("https://product-api.p.rapidapi.com/openfood/product?product_code=8000500015711")
.header("X-RapidAPI-Host", "product-api.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://product-api.p.rapidapi.com/openfood/product
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://product-api.p.rapidapi.com/openfood/product?product_code=8000500015711")
.header("X-RapidAPI-Host", "product-api.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication