{"id":34326488,"url":"https://github.com/yoavaviram/python-amazon-simple-product-api","last_synced_at":"2026-04-08T19:31:40.503Z","repository":{"id":2958268,"uuid":"3972591","full_name":"yoavaviram/python-amazon-simple-product-api","owner":"yoavaviram","description":"A simple Python wrapper for the Amazon.com Product Advertising API ⛺","archived":false,"fork":false,"pushed_at":"2021-03-24T12:26:26.000Z","size":211,"stargazers_count":822,"open_issues_count":38,"forks_count":208,"subscribers_count":60,"default_branch":"master","last_synced_at":"2026-02-20T07:16:51.865Z","etag":null,"topics":["advertising","affiliate","amazon","amazon-product-advertising","products"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoavaviram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-09T14:57:39.000Z","updated_at":"2026-01-06T06:55:10.000Z","dependencies_parsed_at":"2022-07-30T08:38:10.089Z","dependency_job_id":null,"html_url":"https://github.com/yoavaviram/python-amazon-simple-product-api","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/yoavaviram/python-amazon-simple-product-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoavaviram%2Fpython-amazon-simple-product-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoavaviram%2Fpython-amazon-simple-product-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoavaviram%2Fpython-amazon-simple-product-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoavaviram%2Fpython-amazon-simple-product-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoavaviram","download_url":"https://codeload.github.com/yoavaviram/python-amazon-simple-product-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoavaviram%2Fpython-amazon-simple-product-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advertising","affiliate","amazon","amazon-product-advertising","products"],"created_at":"2025-12-17T16:18:58.912Z","updated_at":"2026-04-08T19:31:40.495Z","avatar_url":"https://github.com/yoavaviram.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Amazon Simple Product API\n==========================\nA simple Python wrapper for the Amazon.com Product Advertising API.\n\n[![Build Status](https://secure.travis-ci.org/yoavaviram/python-amazon-simple-product-api.png?branch=master)](http://travis-ci.org/yoavaviram/python-amazon-simple-product-api)\n[![Documentation Status](https://readthedocs.org/projects/python-amazon-simple-product-api/badge/?version=latest)](http://python-amazon-simple-product-api.readthedocs.org/en/latest/?badge=latest)\n[![Coverage Status](https://coveralls.io/repos/github/yoavaviram/python-amazon-simple-product-api/badge.svg?branch=master\u0026bust=1)](https://coveralls.io/github/yoavaviram/python-amazon-simple-product-api?branch=master)\n[![PyPI version](https://badge.fury.io/py/python-amazon-simple-product-api.svg)](https://badge.fury.io/py/python-amazon-simple-product-api)\n![PyPI - License](https://img.shields.io/pypi/l/python-amazon-simple-product-api.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/python-amazon-simple-product-api.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-amazon-simple-product-api.svg)\n[![Code Shelter](https://www.codeshelter.co/static/badges/badge-flat.svg)](https://www.codeshelter.co/)\n\nFeatures\n--------\n\n* An object oriented interface to Amazon products\n* Supports both item search and item lookup\n* Compatible with Google App Engine\n\n\nDependencies\n--------------\nBefore you get started, make sure you have:\n\n* Installed [Bottlenose](https://github.com/lionheart/bottlenose) (`pip install bottlenose`)\n* Installed lxml (`pip install lxml`)\n* Installed [dateutil](http://labix.org/python-dateutil) (`pip install python-dateutil`)\n* An Amazon Product Advertising account\n* An AWS account\n\nInstallation\n-------------\n     pip install python-amazon-simple-product-api\n\nUsage\n-----\n\nLookup:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e product = amazon.lookup(ItemId='B00EOE0WKQ')\n     \u003e\u003e\u003e product.title\n     'Amazon Fire Phone, 32GB (AT\u0026T)'\n     \u003e\u003e\u003e product.price_and_currency\n     (199.0, 'USD')\n     \u003e\u003e\u003e product.ean\n     '0848719035209'\n     \u003e\u003e\u003e product.large_image_url\n     'http://ecx.images-amazon.com/images/I/51BrZzpkWrL.jpg'\n     \u003e\u003e\u003e product.get_attribute('Publisher')\n     'Amazon'\n     \u003e\u003e\u003e product.get_attributes(['ItemDimensions.Width', 'ItemDimensions.Height'])\n     {'ItemDimensions.Width': '262', 'ItemDimensions.Height': '35'}\n\n(the API wrapper also supports many other product attributes)\n\nLookup on amazon.de instead of amazon.com by setting the region:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e import bottlenose.api\n     \u003e\u003e\u003e region_options = bottlenose.api.SERVICE_DOMAINS.keys()\n     \u003e\u003e\u003e region_options\n     ['US', 'FR', 'CN', 'UK', 'IN', 'CA', 'DE', 'JP', 'IT', 'ES']\n     \u003e\u003e\u003e amazon_de = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG, region=\"DE\")\n     \u003e\u003e\u003e product = amazon_de.lookup(ItemId='B0051QVF7A')\n     \u003e\u003e\u003e product.title\n     u'Kindle, WLAN, 15 cm (6 Zoll) E Ink Display, deutsches Men\\xfc'\n     \u003e\u003e\u003e product.price_and_currency\n     (99.0, 'EUR')\n\nBulk lookup requests are also supported:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e products = amazon.lookup(ItemId='B00KC6I06S,B005DOK8NW,B00TSUGXKE')\n     \u003e\u003e\u003e len(products)\n     5\n     \u003e\u003e\u003e products[0].asin\n     'B0051QVESA'\n\nIf you'd rather get an empty list intead of exceptions use lookup_bulk() instead.\n\nSearch:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e products = amazon.search(Keywords='kindle', SearchIndex='All')\n     \u003e\u003e\u003e for i, product in enumerate(products):\n     \u003e\u003e\u003e     print \"{0}. '{1}'\".format(i, product.title)\n     0. 'Kindle, Wi-Fi, 6\" E Ink Display - includes Special Offers \u0026 Sponsored Screensavers'\n     1. 'Kindle Fire, Full Color 7\" Multi-touch Display, Wi-Fi'\n     2. 'Kindle US Power Adapter (Not included with Kindle or Kindle Touch)'\n     3. 'Kindle Touch, Wi-Fi, 6\" E Ink Display - includes Special Offers \u0026 Sponsored Screensavers'\n     4. 'Kindle Keyboard 3G, Free 3G + Wi-Fi, 6\" E Ink Display - includes Special Offers \u0026 Sponsored Screensavers'\n     5. 'Kindle Touch 3G, Free 3G + Wi-Fi, 6\" E Ink Display - includes Special Offers \u0026 Sponsored Screensavers'\n     ...\n     49. 'Kindle Wireless Reading Device (6\" Display, U.S. Wireless)'\n\nThe search method returns an iterable that will iterate through all products,\non all pages available. Additional pages are retrieved automatically as needed.\nKeep in mind that Amazon limits the number of pages it makes available.\n\nValid values of SearchIndex are: 'All','Apparel','Appliances','ArtsAndCrafts','Automotive',\n'Baby','Beauty','Blended','Books','Classical','Collectibles','DVD','DigitalMusic','Electronics',\n'GiftCards','GourmetFood','Grocery','HealthPersonalCare','HomeGarden','Industrial','Jewelry',\n'KindleStore','Kitchen','LawnAndGarden','Marketplace','MP3Downloads','Magazines','Miscellaneous',\n'Music','MusicTracks','MusicalInstruments','MobileApps','OfficeProducts','OutdoorLiving','PCHardware',\n'PetSupplies','Photo','Shoes','Software','SportingGoods','Tools','Toys','UnboxVideo','VHS','Video',\n'VideoGames','Watches','Wireless','WirelessAccessories'\n\nThere is also a convenience method to search and return a list of the first N results:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e products = amazon.search_n(1, Keywords='kindle', SearchIndex='All')\n     \u003e\u003e\u003e len(products)\n     1\n     \u003e\u003e\u003e products[0].title\n     'Kindle, Wi-Fi, 6\" E Ink Display - includes Special Offers \u0026 Sponsored Screensavers'\n\nSimilarity Lookup:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e products = amazon.similarity_lookup(ItemId='B0051QVESA,B005DOK8NW')\n     \u003e\u003e\u003e len(products)\n     4\n\nBrowse Node Lookup:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)\n     \u003e\u003e\u003e bn = amazon.browse_node_lookup(BrowseNodeId=2642129011)\n     \u003e\u003e\u003e bn.name\n     'eBook Readers'\n\nCreate and manipulate Carts:\n\n     \u003e\u003e\u003e from amazon.api import AmazonAPI\n     \u003e\u003e\u003e amazon = AmazonAPI(AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG)     \n     \u003e\u003e\u003e product = amazon.lookup(ItemId=\"B0016J8AOC\")\n     \u003e\u003e\u003e item = {'offer_id': product.offer_id, 'quantity': 1}\n     \u003e\u003e\u003e cart = amazon.cart_create(item)\n     \u003e\u003e\u003e fetched_cart = amazon.cart_get(cart.cart_id, cart.hmac)\n     \u003e\u003e\u003e another_product = amazon.lookup(ItemId='0312098286')\n     \u003e\u003e\u003e another_item = {'offer_id': another_product.offer_id, 'quantity': 1}\n     \u003e\u003e\u003e another_cart = amazon.cart_add(another_item, cart.cart_id, cart.hmac)     \n     \u003e\u003e\u003e cart_item_id = None\n     \u003e\u003e\u003e for item in cart:\n     \u003e\u003e\u003e     cart_item_id = item.cart_item_id\n     \u003e\u003e\u003e modify_item = {'cart_item_id': cart_item_id, 'quantity': 3}\n     \u003e\u003e\u003e modified_cart = amazon.cart_modify(item, cart.cart_id, cart.hmac)     \n     \u003e\u003e\u003e cleared_cart = amazon.cart_clear(cart.cart_id, cart.hmac)\n\nFor the 'Books' SearchIndex a [Power Search](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/PowerSearchSyntax.html) option is avaialble:\n\n     \u003e\u003e\u003e products = amazon.search(Power=\"subject:history and (spain or mexico) and not military and language:spanish\",SearchIndex='Books')\n\n\nFor more information about these calls, please consult the [Product Advertising\nAPI Developer Guide](http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html).\n\nTests\n------\nTo run the test suite please follow these steps:\n\n* Make sure [Nose](http://readthedocs.org/docs/nose/en/latest/) is installed: (`pip install nose`)\n* Create a local file named: `test_settings.py` with the following variables set to the relevant values: `AMAZON_ACCESS_KEY`, `AMAZON_SECRET_KEY`, `AMAZON_ASSOC_TAG`\n* Run `nosetests`\n\nPull Requests\n--------------\n\n* All code should be unit tested\n* All tests must pass\n* Source code should be PEP8 complient \n* Coverage shouldn't decrease\n* All Pull Requests should be rebased against master before submitting the PR\n\n**This project is looking for core contributors. Please message me.**\n\nLicense\n-------\n\nCopyright \u0026copy; 2012 Yoav Aviram\n\nSee LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoavaviram%2Fpython-amazon-simple-product-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoavaviram%2Fpython-amazon-simple-product-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoavaviram%2Fpython-amazon-simple-product-api/lists"}