2

The openFDA.gov reference website says to use the following webpage for queries: https://api.fda.gov. But when I go to that page, there is no where to type in a query and run it. Where can I type in and run a query on this database?

3

@Joe Germuska - we built something like you mentioned (user-friendlier web interface to search Open FDA adverse events API) at http://searchopenfda.socialhealthinsights.com

  • 1
    Thanks so much. It looks like your interface is very simple. Can you get count data from this interface or does it just return the record? – Anne Dwyer Jun 5 '14 at 17:38
  • @AnneDwyer - it includes counts for things we've included in the "Graphs" tab and "Stats" page. Feel free to email us at info@socialhealthinsights.com with additional feature requests! – Mark Silverberg Jun 5 '14 at 22:08
2

If you want to type queries, you are probably not the intended audience of the openFDA API. An API is designed for software developers to access an application or data resource with code.

However, looking around that site, I don't see any more user-friendly way to search the database. A simple reference application that provides a friendly search API would be a good proof-of-concept application for either OpenFDA or some civic-minded coders to create.

I think that the source data for the resource is at http://www.fda.gov/Drugs/GuidanceComplianceRegulatoryInformation/Surveillance/AdverseDrugEffects/ucm082193.htm but that probably isn't any more user friendly for most people.

UPDATE: see also Mark Silverberg's answer in this thread pointing to a simple OpenFDA search interface he created which might help the original asker.

  • I agree with your assessment. A simple interface would be very useful. – Anne Dwyer Jun 5 '14 at 17:37
1

I just typed it into the browser address bar:

https://api.fda.gov/drug/event.json?search=patient.drug.openfda.pharm_class_epc:"nonsteroidal+anti-inflammatory+drug"&count=patient.reaction.reactionmeddrapt.exact

Returns the same result as the example query on the API basics webpage (http://open.fda.gov/api/reference/)

if you eliminate the perimeters after the "=" sign, you can search for drugs by name.

  • Thank you so much for this information. I thought that there would be a box on the api.fda.gov website where you typed in your request and it was driving me crazy! – Anne Dwyer Jun 5 '14 at 17:36
  • By the way, I would love to upvote your comment but I don't have enough reputation points! – Anne Dwyer Jun 5 '14 at 17:39
1

To query the OpenFDA, check out Social Health Insights, which is a tool we built so you can interact with the dataset and get insights.

  • 1
    Could you expand on this @Brian? – Jeanne Holm Jun 5 '14 at 18:29
  • 1
    I just tried this site out. It's a pretty good user interactive interface to the Open FDA data. – Andrew - OpenGeoCode Jun 5 '14 at 21:41
1

Query parameters and syntax are documented comprehensively here, including the AND modifier, grouping, and limit and skip.

http://open.fda.gov/api/reference/#query-parameters

0

I agree with Anthony, the documentation for the actual search terms is very unfriendly to a programmer. But as you start using it, you slowing pick up on things. Most queries will take the form:

http://api.fda.gov/drug/event.json?search=field:term[&count][&limit=N1][&skip=N2]

Where the [..] are optional.

field: this is a keyword referring to a category
term: this is a keyword referring to a value within the category.

By default, the API will return upto the first 1000 records.

&count: this will return the number of matching records instead of the record data.
&limit=N1: this overrides the default number of maximum number of records to return (e.g., limit=100 returns 100 records).
&skip=N2: Without this argument, the first 1000 (default) or N1 records are returned. To get the next group of records,specify &skip=N2 to skip N2 number of records. So, to get the 3rd group of 100 records (201 .. 300), specify &limit=100&skip=200

There are also a variety of search modifiers:

field1:term1+AND+field2:term2 : (AND) both field1:term1 and field2:term2 must be matched
field1:term1+field2:term2 : (OR) either field1:term1 or field2:term2 must be matched

There is more modifiers, but I have not deciphered them yet (lol).

Your Answer

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

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