Database Reference
In-Depth Information
Books, Films, Music, and Products
Amazon
Amazon has one of the largest catalogs of products in the world, and as long as you're directing
users to its site , it allows you to access its information through an API. It's somewhat iddly to
use, since it was originally all SOAP-based and relies on XML and computing URL signatures,
but there are a lot of libraries that can help . If you're trying to get information on real-world
products, the Barcode/UPC search capability might be particularly useful. Be careful, as there
are a few restrictions hidden in the terms of service, particularly around mobile applications.
If you ind the API too inlexible, you could follow in the footsteps of the shopping search en-
gines and write a web crawler that gathers the information from Amazon's HTML pages. Check
their robots.txtto ensure that it's still permissible, but currently it's open to this sort of use,
though I don't know of any open source examples showing how to do it.
Google Shopping
Like Amazon's, this API has been designed to support websites that want to display products to
their visitors in the hope of beneiting from ailiate fees. As such, its terms of service prohibit
“scraping, database building, or the creation of permanent copies” of the information you re-
trieve. It ofers a variety of ways to track down products, including by UPC or ISBN codes:
curl "https://www.googleapis.com/shopping/search/v1/public/products?key=<key>&\
country=US&q=digital+camera"
{"kind": "shopping#products",
...
"items": [
{
"kind": "shopping#product",
"id": "tag:google.com,2010:shopping/products/10048/16324480569195213774",
"selfLink": "https://www.googleapis.com/shopping/search/v1/
public/products/10048/gid/16324480569195213774",
"product": {
"googleId": "16324480569195213774",
"author": {
"name": "Staples",
"accountId": "10048"
},
"creationTime": "2010-04-18T16:18:40.000Z",
"modificationTime": "2011-01-07T19:15:40.000Z",
"country": "US",
Search WWH ::




Custom Search