Product Data API
API change historyThe Product Data API provides a wide range of data points you can use in your applications, in addition to having a range of endpoints that give you complete control over how you access the data. The end points include everything from accessing specific information like the Amazon ASIN to the full payload of all data points including titles, images, descriptions, attributes, weight, measurements and a lot more.
Code samples
@ECHO OFF
curl -v -X GET "https://api.apigenius.io/products/search?keyword={string}&title={string}&mpn={string}&category={string}&brand={string}&api_key={string}"
-H "ApiGenius_API_Key: {subscription key}"
--data-ascii "{body}"
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;
namespace CSHttpClientSample
{
static class Program
{
static void Main()
{
MakeRequest();
Console.WriteLine("Hit ENTER to exit...");
Console.ReadLine();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("ApiGenius_API_Key", "{subscription key}");
// Request parameters
queryString["keyword"] = "{string}";
queryString["title"] = "{string}";
queryString["mpn"] = "{string}";
queryString["category"] = "{string}";
queryString["brand"] = "{string}";
queryString["api_key"] = "{string}";
var uri = "https://api.apigenius.io/products/search?" + queryString;
var response = await client.GetAsync(uri);
}
}
}
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class JavaSample
{
public static void main(String[] args)
{
HttpClient httpclient = HttpClients.createDefault();
try
{
URIBuilder builder = new URIBuilder("https://api.apigenius.io/products/search");
builder.setParameter("keyword", "{string}");
builder.setParameter("title", "{string}");
builder.setParameter("mpn", "{string}");
builder.setParameter("category", "{string}");
builder.setParameter("brand", "{string}");
builder.setParameter("api_key", "{string}");
URI uri = builder.build();
HttpGet request = new HttpGet(uri);
request.setHeader("ApiGenius_API_Key", "{subscription key}");
// Request body
StringEntity reqEntity = new StringEntity("{body}");
request.setEntity(reqEntity);
HttpResponse response = httpclient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null)
{
System.out.println(EntityUtils.toString(entity));
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"keyword": "{string}",
"title": "{string}",
"mpn": "{string}",
"category": "{string}",
"brand": "{string}",
"api_key": "{string}",
};
$.ajax({
url: "https://api.apigenius.io/products/search?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("ApiGenius_API_Key","{subscription key}");
},
type: "GET",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* path = @"https://api.apigenius.io/products/search";
NSArray* array = @[
// Request parameters
@"entities=true",
@"keyword={string}",
@"title={string}",
@"mpn={string}",
@"category={string}",
@"brand={string}",
@"api_key={string}",
];
NSString* string = [array componentsJoinedByString:@"&"];
path = [path stringByAppendingFormat:@"?%@", string];
NSLog(@"%@", path);
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
[_request setHTTPMethod:@"GET"];
// Request headers
[_request setValue:@"{subscription key}" forHTTPHeaderField:@"ApiGenius_API_Key"];
// Request body
[_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
NSURLResponse *response = nil;
NSError *error = nil;
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
if (nil != error)
{
NSLog(@"Error: %@", error);
}
else
{
NSError* error = nil;
NSMutableDictionary* json = nil;
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
NSLog(@"%@", dataString);
if (nil != _connectionData)
{
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
}
if (error || !json)
{
NSLog(@"Could not parse loaded json with error:%@", error);
}
NSLog(@"%@", json);
_connectionData = nil;
}
[pool drain];
return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://api.apigenius.io/products/search');
$url = $request->getUrl();
$headers = array(
// Request headers
'ApiGenius_API_Key' => '{subscription key}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
'keyword' => '{string}',
'title' => '{string}',
'mpn' => '{string}',
'category' => '{string}',
'brand' => '{string}',
'api_key' => '{string}',
);
$url->setQueryVariables($parameters);
$request->setMethod(HTTP_Request2::METHOD_GET);
// Request body
$request->setBody("{body}");
try
{
$response = $request->send();
echo $response->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>
########### Python 2.7 #############
import httplib, urllib, base64
headers = {
# Request headers
'ApiGenius_API_Key': '{subscription key}',
}
params = urllib.urlencode({
# Request parameters
'keyword': '{string}',
'title': '{string}',
'mpn': '{string}',
'category': '{string}',
'brand': '{string}',
'api_key': '{string}',
})
try:
conn = httplib.HTTPSConnection('api.apigenius.io')
conn.request("GET", "/products/search?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64
headers = {
# Request headers
'ApiGenius_API_Key': '{subscription key}',
}
params = urllib.parse.urlencode({
# Request parameters
'keyword': '{string}',
'title': '{string}',
'mpn': '{string}',
'category': '{string}',
'brand': '{string}',
'api_key': '{string}',
})
try:
conn = http.client.HTTPSConnection('api.apigenius.io')
conn.request("GET", "/products/search?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
require 'net/http'
uri = URI('https://api.apigenius.io/products/search')
query = URI.encode_www_form({
# Request parameters
'keyword' => '{string}',
'title' => '{string}',
'mpn' => '{string}',
'category' => '{string}',
'brand' => '{string}',
'api_key' => '{string}'
})
if query.length > 0
if uri.query && uri.query.length > 0
uri.query += '&' + query
else
uri.query = query
end
end
request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['ApiGenius_API_Key'] = '{subscription key}'
# Request body
request.body = "{body}"
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body
search
This endpoint allows you to search for products using the a keyword, Title, UPC, MPN, Category or Brand.
Try itRequest
Request URL
Request parameters
-
string
A search keyword phrase is required in addition to one of the identifiers below.
-
(optional)string
The title of the product(s).
-
(optional)string
The MPN (manufacturers part number) of the product(s).
-
(optional)string
The category of the product(s).
-
(optional)string
The Brand of the product(s).
-
(optional)string
You can include your api key in the request or in the header.
Request headers
Request body
Responses
200 OK
Successful Request
Representations
{
"success": true,
"status": 200,
"identifier": "30937302731",
"identifier_type": "upc",
"items": {
"ean": "0030937302731",
"title": "1/4Male D.U.Plug",
"description": "California Proposition 65: This product contains a chemical known to the State of California to cause cancer. California Proposition 65: This product contains a chemical known to the State of California to cause birth defects or other reproductive harm.1/4\" MNPT D style plug has a 1/4\" basic flow size and is steel plated to resist rust. Has a maximum inlet pressure of 300 PSI and air flow of 34 SCFM. D style couplers and plugs are ideal for automotive application.",
"upc": "030937302731",
"brand": "MILTON",
"mpn": "0003093730273",
"color": "Gold",
"size": "1/4\" NPT male",
"dimension": "2 X 1 X 1 inches",
"weight": "3.1 Pounds",
"currency": "",
"lowest_pricing": 1.29,
"highest_price": 23.4,
"images": [
"http://8016235491c6828f9cae-6b0d87410f7cc1525cc32b79408788c4.r96.cf2.rackcdn.com/2025/58831473_1.jpg",
"http://images10.newegg.com/ProductImageCompressAll200/A1CS_1_20140804586786911.jpg",
"http://i.walmartimages.com/i/mp/00/03/09/37/30/0003093730273_P255045_500X500.jpg",
"http://ecx.images-amazon.com/images/I/41VUuDB5lrL._SL160_.jpg",
"https://i5.walmartimages.com/asr/dba69ad9-0d8b-4b29-8e54-a86902b6e3e2_1.d27d54b50dc897c8fd95baca320d7de0.jpeg?odnHeight=450&odnWidth=450&odnBg=ffffff",
"https://tshop.r10s.com/6b8/e13/f3dc/a5e6/7074/7cef/c358/1194e996f70242ac110003.JPG?_ex=512x512",
"http://c.shld.net/rpx/i/s/pi/mp/11439/7841384620?src=http%3A%2F%2Fmedia.toolweb.com%2Fdatafeeds%2F250x250%2Fc8295e0c-e3a1-46ee-a0d6-c5ec9816f8f4.jpg&d=e47143512cdf210339d6411a0e22bf94fa99100b",
"http://site.unbeatablesale.com/EB085/mstl16337.gif",
"http://images10.newegg.com/ProductImageCompressAll200/A1CS_1_20140804586786911.jpg"
],
"pricing": [
{
"seller": "Newegg.com",
"website_name": "newegg.com",
"title": "COUPLER P DU FE 1/4NS 032994",
"currency": "",
"price": 9,
"shipping": "6.05",
"condition": "New",
"link": "http://www.newegg.com/Product/Product.aspx?Item=9SIA3FP2TR3685&nm_mc=AFC-C8Junction-MKPL&cm_mmc=AFC-C8Junction-MKPL-_-AT+-+Air+Conditioning+Tools+++Equipment-_-Milton+Industries-_-9SIA3FP2TR3685",
"date_found": 1479242610
},
{
"seller": "UnbeatableSale.com",
"website_name": "unbeatablesale.com",
"title": "MiltonMI797 0.25 in. Npt Male D-Style Plug",
"currency": "",
"price": 17.44,
"shipping": "8.69",
"condition": "New",
"link": "http://www.toolschest.com/mstl16337.html",
"date_found": 1540976863
},
{
"seller": "Sears",
"website_name": "sears.com",
"title": "1/4\" NPT Female D-Style Plug",
"currency": "",
"price": 5.22,
"shipping": "Free Shipping",
"condition": "New",
"link": "http://www.sears.com/shc/s/p_10153_12605_SPM11205917419",
"date_found": 1481112388
},
{
"seller": "Rakuten(Buy.com)",
"website_name": "rakuten.com",
"title": "1/4Male D.U.Plug",
"currency": "",
"price": 17.81,
"shipping": "",
"condition": "New",
"link": "https://www.rakuten.com/shop/zoro/product/G5037229/?sku=G5037229&scid=af_feed",
"date_found": 1558710118
},
{
"seller": "Wal-Mart.com",
"website_name": "walmart.com",
"title": "Milton Industries 1/4Male D.U.Plug (Set of 4)",
"currency": "",
"price": 19.5,
"shipping": "5.99",
"condition": "New",
"link": "://linksynergy.walmart.com/fs-bin/click?id=jniXEdcEVNs&offerid=223073.7200&type=14&catid=8&subid=0&hid=7200&tmpid=1082&RD_PARM1=https%3A%2F%2Fwww.walmart.com%2Fip%2FMilton-797-1-4-MNPT-D-Style-Plug-Box-of-10%2F19258649%3Faffp1%3D%7Capk%7C%26affilsrc%3Dapi",
"date_found": 1543038285
},
{
"seller": "Amazon Marketplace New",
"website_name": "amazon.com",
"title": "Milton (MIL797) 1/4IN MALE IND.",
"currency": "",
"price": 14.55,
"shipping": "",
"condition": "New",
"link": "https://www.amazon.com/Milton-797-MNPT-Style-Plug/dp/B000BHKWG4",
"date_found": 1480369457
},
{
"seller": "Walmart Marketplace",
"website_name": "walmart.com",
"title": "Milton Industries 1/4Male D.U.Plug",
"currency": "",
"price": 15.96,
"shipping": "4.99",
"condition": "New",
"link": "http://www.walmart.com/ip/Milton-Industries-1-4Male-D.U.Plug/19258649",
"date_found": 1430594819
},
{
"seller": "Newegg Canada",
"website_name": "newegg.ca",
"title": "COUPLER P DU FE 1/4NS 032994",
"currency": "CAD",
"price": 9.83,
"shipping": "",
"condition": "New",
"link": "http://www.newegg.ca/Product/Product.aspx?Item=9SIAB0D4722991&nm_mc=AFC-C8JunctionCA&cm_mmc=AFC-C8JunctionCA-_-AT+-+Air+Conditioning+Tools+++Equipment-_-Milton+Industries-_-9SIAB0D4722991",
"date_found": 1498758819
},
{
"seller": "Pricefalls.com",
"website_name": "pricefalls.com",
"title": "Couplers & Plugs 1/4",
"currency": "",
"price": 1.29,
"shipping": "",
"condition": "New",
"link": "http://www.newegg.ca/Product/Product.aspx?Item=9SIAB0D4722991&nm_mc=AFC-C8JunctionCA&cm_mmc=AFC-C8JunctionCA-_-AT+-+Air+Conditioning+Tools+++Equipment-_-Milton+Industries-_-9SIAB0D4722991",
"date_found": 1484935078
}
],
"asin": "B000BHKWG4",
"ebay_id": "253244685081"
}
}