2

I am new to OpenFDA API, and I just got my API key and I want to get a food recalls that falls within range of dates. Could anyone provide me with an example of what would be the URL with range of dates for food recalls?

2 Answers 2

5

You might want to try hurl.it for testing your calls: https://www.hurl.it/ it's really useful.

I looked at the API reference: https://open.fda.gov/api/reference/ which has directions, but all of the info there is geared towards drugs, not food.

This URL has food recall info: https://open.fda.gov/food/enforcement/

The examples are pretty good. Does that page help, or did you have a more specific question? Just remove the limit from the first example,

https://api.fda.gov/food/enforcement.json?search=report_date:[20040101+TO+20131231] and that should be your call. You may not need an API key if you are below the limit. Otherwise, you would probably add it in:

https://api.fda.gov/food/enforcement.json?api_key=yourAPIKeyHere&search=report_date:[20040101+TO+20131231]

1
0

Also if you just want to visualize this call this might help - http://www.researchae.com/recalls Code is on Github here - https://github.com/GeekNurse/ResearchAE-Open-Source/blob/master/app.rb#L1609

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.