I'm trying to query for all drugs related to a certain disease group (say, for example testicular cancer). How would I structure that query? is this possible?

  • is there a reason not to download the whole dataset? open.fda.gov/api/reference/#downloads – Anthony Damico Mar 6 '17 at 20:45
  • 1
    there are plenty of reasons to not download the whole dataset. its essentially this: api.fda.gov/drug/…, just replace /drug/event.json with the other options they provide for the fields. its not clear to me straight off the bat, and even more confusing there isn't a fields master list. anyways, thats at least spitting back results. think you may need an api key for some of the fields though. – albert Mar 7 '17 at 5:01
  • I am a medical doctor myself and my patients frequently ask me about the approval status of new drugs for treating a certain disease. While the openFDA queries mentioned help a lot, my question is, if there is a way to check the approval status of a given drug. – JumpingJack_2 Jun 5 '17 at 12:29
  • ... to be more precise: I know accessdata.fda.gov/scripts/cder/daf, but is there a way to get this information via the openFDA API? – JumpingJack_2 Jun 5 '17 at 12:32
  • this is a question/comment, not an answer. Recommending for deletion, but please just post this as a comment under the question and/or ask a new question. – albert Jun 5 '17 at 19:26
up vote 7 down vote accepted

I'm Jack Finch with the openFDA team. Looking at what you're trying to do, I'll suggest a couple queries that should satisfy your needs and link you to the appropriate sections of documentation which explains how it works.

If you just want a list of drugs which are related to a specific disease (or any other text string, for that matter), you can search for that string and get the count of substance_name.

For example:

https://api.fda.gov/drug/label.json?search="testicular cancer"&count=substance_name

If you'd prefer to have all of the details for the drugs, you can use the limit field to specify how many results you want maximum (the default is 1). If you search just for testicular cancer (https://api.fda.gov/drug/label.json?search="testicular cancer"), the meta field will include a total field, indicating how many records were found by your search (40 in this case). You can then set the limit to an appropriate amount. Note that while displaying 40 records in the browser is feasible, any more than 100 may result in a delayed response or even a crashed browser - there are limits to the amount of data that we can easily display over the web.

The search with the limit qualifier set looks like this:

https://api.fda.gov/drug/label.json?search="testicular cancer"&limit=40

The basics on searching can be found here. Information about drug label specific fields can be found here. Let me know if that addresses your question adequately.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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