[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trying to retrieve comments with activated API key

Hi everyone,

I'm further along than I was last time. I've installed python and am
running this in spyder. This is the code I'm working with:

import requests
import csv
import time
import sys
api_key = 'my api key'
docket_id = 'ED-2018-OCR-0064'
total_docs = 32068
docs_per_page = 1000

Where the "my api key" is, is actually my api key. I was just told not to
give it out. But I put this into spyder and clicked run and nothing
happened. I went to right before "import requests and clicked run." I
think. I'm better in R. But I'm horrible at both. If you can't already
tell. Well, this might have happened:

runfile('/Users/susan/.spyder-py3/temp.py', wdir='/Users/susan/.spyder-py3')

but I don't know what to do with it, if it actually happened.

But I feel like I'm missing something super important. Like, for instance,
how is python being told to go to the right website? Again, I'm trying to
retrieve these comments
off of regulations.gov. I don't know if this helps, but the interactive API
interface is here <https://regulationsgov.github.io/developers/console/>.

I've installed anaconda. I was told to get postman. Should I get postman?

Help! At the end of the day, I'm trying to use python to get the comments
from regulations.gov into a csv file so that I can analyze them in R.

And then I think that I only need the name, comment, date, and category in
the JSON dictionary. I can't send a picture through the list, but I have
one of what I'm talking about.