# Codecademy Sample Solution
import requests
import pprint
query_params = { 'apikey': '24115b5bd3d34ed28fc03a8c53eed18c',
'per_page': 3,
# ...
'phrase': 'holiday season',
'start_date': '2012-11-01',
'end_date': '2012-12-31'
}
endpoint = 'http://capitolwords.org/api/text.json'
response = requests.get(endpoint, params=query_params)
data = response.json
pprint.pprint(data)
No comments:
Post a Comment