Product API

Overview

Go-UPC's API makes it easy to programmatically access information on products from all over the world. This documentation provides the details you should need to navigate our product database.

Authentication

We use an API key to verify requests. You should have received an API key when you signed up. If you've lost your API key or need a new one, please just send us an email.

Go-UPC provides two methods for including your API key when making a request. For simplicity and testing we allow you to include your key as a URL parameter; however we recommend the alternative method for production implementations, which involves passing the key via an Authorization header.

Examples

Method One

The API key must be included in the URL as the key query parameter.

curl "https://go-upc.com/api/v1/code/781138811156?key=<api_key>"

Method Two

The API key must be part of the of the HTTP header as a Bearer token.

curl --header "Authorization: Bearer <api_key>" https://go-upc.com/api/v1/code/781138811156

Limits

The number of lookups you're able to perform via the API varies depending on your plan, as do offered data formats and support options. See the table here for specifics.

Developer Startup Enterprise
Lookups Per Month 5,000 45,000 450,000
Available Formats JSON JSON, CSV JSON, CSV, XML
Customer Support Limited email support Email and phone support Email and phone support

In addition to monthly limits, you're permitted a maximum of 2 requests per second. If you need a higher rate-limit, please contact us.

Endpoints

Note: All API endpoints require authentication using your API key, which you should receive upon registration.


Get Product Info

Endpoint

GET /v1/code/:code

Description Searches for the product using the given UPC/EAN/GTIN.
URL Parameters
code [required string] — Any valid UPC (GTIN-12), EAN (GTIN-13), EAN-8 (GTIN-8) or GTIN-14 code.
Example
curl "https://go-upc.com/api/v1/code/781138811156?key=<api_key>&format=true"
Response

200 OK

The response contains JSON of the product corresponding to the provided code.

{
  "code" : "0781138811156",
  "codeType" : "UPC",
  "product" : {
    "name" : "On the Border Jalapeno, Queso Flavored, Spicy 15.25 Oz",
    "description" : "Mexican grill & cantina. Spicy. Made with real cheese. Safety button pops up when original seal is broken.",
    "imageUrl" : "https://go-upc.s3.amazonaws.com/images/99132458.jpeg",
    "brand" : "On the Border",
    "specs" : [
      [ "Department", "Pantry" ],
      [ "Commodity", "Snacks" ],
      [ "Allergens", "Contains Soybean and Milk." ],
      [ "Organic", "No" ],
      [ "Non-GMO", "No" ],
      [ "Height", "4.88 In" ],
      [ "Width", "4.0 In" ],
      [ "Length", "4.0 In" ]
    ],
    "category" : "Salsa",
    "categoryPath" : [ "Food, Beverages & Tobacco", "Food Items", "Dips & Spreads", "Salsa" ],
    "ingredients" : {
      "text" : "Water, Monterey Jack Cheese (Milk, Cheese Cultures, Salt, Enzymes), Jalapeno Peppers, Soybean Oil, Maltodextrin, Modified Corn Starch, Whey Protein Concentrate, Contains Less Than 2% Of: Green Chiles, Salt, Diced Tomatoes In Juice, Sodium Phosphate, Natural Flavors, Datem, Sodium Citrate, Lactic Acid, Vinegar, Sodium Alginate, Sorbic Acid (preservative), Xanthan Gum, Dried Red And/or Green Bell Peppers, Spices, Dried Onions, Dried Garlic, Yellow 5 & Yellow 6, Tomato Powder."
    },
    "upc" : 781138811156,
    "ean" : 781138811156
  },
  "barcodeUrl" : "https://go-upc.com/barcode/781138811156",
  "inferred" : false
}
Error Responses

400 Bad Request

The provided code is not in a recognized format.

401 Unauthorized

Access to the API is denied due to failure to authenticate the request.

404 Not Found

No product information was found for the given code.

429 Too Many Requests

You have exceeded your plan's quota or issued too many requests within a short period of time.

Note, the product categories provided by our API come from the taxonomy used by Google Shopping, which you can find here.

Sample Code

Want to see example code for an API call? Here are sample API integrations for Python, Node.js, C#, PHP, and client-side JavaScript.

Want to see sample code for another programming language? Let us know.