0

I am new to APIs and am having problems in accessing data from catalog.data.gov. I have successfully used the below code to search my dataset of interest, but can't figure out how I can fetch the data for the collection "Monthly Traffic Volume Trends". I am interested in getting all the 154 datasets in this collection. Please guide me through this

import urllib3
from urllib.parse import quote
import json
import pprint

# Make the HTTP request.
http = urllib3.PoolManager()
response = http.request('GET','http://catalog.data.gov/api/3/search/dataset?q="monthly_traffic_volume_trends_may_2002"&rows=10')
# Use the json module to load CKAN's response into a dictionary.
response_dict = json.loads(response.data)
# Check the contents of the response.
result = response_dict['results']
pprint.pprint(result)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.