Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # API Amazon Scraper
- # www.rainforestapi.com
- import requests
- import csv
- # set up the request parameters
- params = {
- 'api_key': 'C5EE46DD672E4F9386CA39EC3F66876B',
- 'type': 'search',
- 'customer_location': 'us',
- 'cache_max_age_minutes': '5',
- 'amazon_domain': 'amazon.com',
- 'output': 'csv',
- 'search_term': 'metabolism booster',
- 'page': '1',
- 'total_pages': '10'
- }
- # make the http GET request to Rainforest API
- api_result = requests.get('https://api.rainforestapi.com/request', params)
- # print the CSV response from Rainforest API
- print(api_result.content)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement