4

I am trying to build a code that download all files from the provided end points. However, I do not want to download the files everytime and will only download the files if the data in the endpoints is changed/added. I assume that this is provided by the "last_updated" field in the JSON as shown in the API reference JSON snippet - https://open.fda.gov/api/reference/. What is the URL that provides me similar JSON output?

prakul
  • 41
  • 2

2 Answers2

2

The endpoint for downloads is: https://api.fda.gov/download.json

I would log a bug on https://github.com/FDA/open.fda.gov letting them know that the above endpoint should be documented.

Hans Nelsen
  • 619
  • 3
  • 6
1

Confusing indeed -- the site doesn't appear to provide a query URL to get the provided JSON output, as you noticed.

For now, it seems like your best bet might be paginating through AWS S3 directory listings available at http://download.open.fda.gov/ and looking at each <Content>'s <Key> and <LastModified> timestamp.

Mark Silverberg
  • 5,184
  • 14
  • 25