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!

5 Answers 5


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?

  • 1
    @scottherron - thanks for the email. Here's my suggestion. First, the users of the API are going to be programmers, possibly contract programmers. Assume they will have little and possible no knowledge of the corresponding medical terminology. They need to get going fast (time is money)! I would create a reference that details the semantics for "search:term". It should list all valid values for "search" in one place. For each search value, there should be a list (or link) to all the valid "term" for each "search" value. Commented Jun 3, 2014 at 15:36
  • @seanherron sorry if this is explained somewhere: why can't we just download the entire data set? Commented Jun 4, 2014 at 15:16
  • I found this, it may be the entire dataset. @seanherron could clarify fda.gov/Drugs/GuidanceComplianceRegulatoryInformation/… -- but it would be nice if it were lined up tidily along the lines of www2.census.gov Commented Jun 4, 2014 at 21:07
  • @seanherron Would you like to add an answer to this question? It could be a easily shareable overview for accessing the openFDA opendata.stackexchange.com/q/1677/1511
    – philshem
    Commented Jun 27, 2014 at 9:07

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.