Overview
Go-UPC's API makes it easy to programatically 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 been given 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.
The API key must be part of the of the HTTP header as a Bearer
token.
See examples of this below.
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 | 300,000 |
Available Formats | JSON | JSON, CSV | JSON, CSV, XML |
Customer Support | Limited email support | Email and phone support | Email and phone support |
Endpoints
Note: All endpoints require basic authentication using the API key you received during account 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, EAN, or GTIN code
Example:
curl --header 'Authorization: Bearer <api_key>' https://go-upc.com/api/v1/code/829576019311 |
Response |
200 Okay
{ "code": "829576019311", "codeType": "UPC", "product": { "name": "Goodfellow and Co No. 01 Blue Sage Tonka Texturizing Fiber, 4 Oz.", "description": "No. 01 Blue Sage and Tonka Texturizing Fiber from Goodfellow and Co gives you...", "imageUrl": "https://go-upc.s3.amazonaws.com/images/54066938.jpeg", "brand": "Goodfellow and Co", "specs": [ ["Item Form", "Clay"], ["Liquid Volume", "4 Fluid Ounces"], ["Scent", "Lime, Amber"] ], "category": "Hair Care" }, "barcodeUrl": "https://go-upc.com/barcode/829576019311" } |
Error Response |
404 Not Found |
Get Product Image
Endpoint | GET /v1/image/:code |
Description | Searches for the product image using the given UPC/EAN/GTIN, and provides the final image URL, if available, by way of a 302 redirect. | URL Parameters: |
code [required string] - Any valid UPC, EAN, or GTIN code
Example:
curl --header 'Authorization: Bearer <api_key>' https://go-upc.com/api/v1/image/829576019311 |
Response |
302 Location: [Image URL] |
Error Response |
404 Not Found |
Sample Code
Want to see example code for an API call? Here are sample API integrations for Python, JavaScript/Node.js, and PHP.
Want to see sample code for another programming language? Let us know.