# Codecademy Sample Solution
import requests
import pprint
query_params = { 'apikey': '24115b5bd3d34ed28fc03a8c53eed18c',
'per_page': 3,
# ...
'phrase': 'election night',
'state': 'MD'
}
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