The link I am told to use, https://api.fda.gov, redirects me to http://api.data.gov, which does NOT have an FDA option!
In any case, that site has no place to enter the API key I got on the OpenFDA website. Only an invitation to apply. Help!
Open Data Stack Exchange is a question and answer site for developers and researchers interested in open data. It only takes a minute to sign up.
Sign up to join this communityThe link I am told to use, https://api.fda.gov, redirects me to http://api.data.gov, which does NOT have an FDA option!
In any case, that site has no place to enter the API key I got on the OpenFDA website. Only an invitation to apply. Help!
I'm one of the core team members for openFDA. Really sorry to hear that you find the documentation cryptic - one big goal that we have is to make the API as easy to understand as possible!
The main documentation for drugs has a number of sample queries: http://open.fda.gov/drug/event/
You can hit "Run Query" next to any of those and it will show the results right there in the page. You can edit the query, hit Run Query again, and it will update accordingly.
In regards to the API Key, it is optional. When you sign up, you will get an email from api.data.gov, who provides API keys for the entire federal government. We're working on customizing those emails to include an FDA example.
How would you recommend we improve the documentation?
I agree, their documentation seems lacking. Have you looked at http://open.fda.gov/api/reference/ ?
It indicates that an API key is not strictly required, but rather, changes the limitations they put on usage. They offer a sample query which doesn't have an API key in it, and which does work:
But after registering for the key, I got the following email which explains how to use the key:
You can start using this key to make Web service requests. Simply pass your key in the URL when making a Web request. Here's an example:
https://api.data.gov/nrel/alt-fuel-stations/v1/nearest.json?api_key=[put your key here]&location=Denver+CO What Next?
Wow, that's pretty cryptic documentation (what do you expert from a bunch of MDs - lol). I managed to google and find another reference page in addition to the one Joe G found. This one has a field-by-field guide for the drugs/event category.
Just to follow up—with respect to API key use specifically—specific instructions for adding the API key to queries was added some weeks ago to the API basics page: https://open.fda.gov/api/reference/#authentication
Joe and Anthony, I can't respond inline but in response to your questions:
We offer a full explanation of every field at http://open.fda.gov/drug/event/reference/, which is linked to multiple times from the site. Hopefully this satisfied your need for a full dictionary of terms, but if not, please let us know how we can improve it.
In regards to downloading the full dataset, that is on our feature list for the very near future. It's really important to note that this is a beta project and we are moving as fast as we can to get feedback and iterate on it. You can download the entire source dataset at http://www.fda.gov/Drugs/GuidanceComplianceRegulatoryInformation/Surveillance/AdverseDrugEffects/ucm082193.htm, but as you will notice we do a lot of cleanup and additional field matching on top of that. We definitely hear the desire to have a full dump of that improved version.
Sean Herron, openFDA Team Member