Skip to main content

A python package to get amazon product and search data in json form. The package does not require any API keys as it works by scraping the amazon page.

Project description

amazondata

PyPI version

A python package to get amazon product and search data in json form. The package does not require any API keys as it works by scraping the amazon page.

Reference: How To Scrape Amazon Product Details and Pricing using Python

Install

pip install amazondata

Usage

To get Amazon product details from the url, use the following function.

get_product_from_url(url)

from amazondata.product_details_extractor import ProductDetailsExtractor

product_details_extractor = ProductDetailsExtractor()

data = product_details_extractor.get_product_from_url('https://www.amazon.in/dp/B09JSYVNZ2')

print(data)

To get Amazon product details from the ASIN (Amazon Standard Identification Number) code, use the following function.

get_product_from_asin_code(asin_code)

from amazondata.product_details_extractor import ProductDetailsExtractor

product_details_extractor = ProductDetailsExtractor()

data = product_details_extractor.get_product_from_asin_code('B09JSYVNZ2')

print(data)

To get the list of products from search query use the following function

search(query, page)

from amazondata.search_result_extractor import SearchResultExtractor

search_result_extractor = SearchResultExtractor()

data = search_result_extractor.search('perfume for men', 3)

print(data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amazondata-0.1.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

amazondata-0.1.0-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page