2

The API call

https://api.fda.gov/device/classification.json?search=medical_specialty_description=%22ophthalmic%22

is returning (limiting) the number of records to 1 for ophthalmic devices data. I am trying to download all the records for ophthalmic data. I would appreciate if anyone could help me with the api call that can download all the records of ophthalmic data from device_classification end point.

2

Simply use limit and skip URL parameters described here.

  • hello Denis! Thanks for the answer. But, in my case, lets say, I need all the records for ophthalmic devices and I don't know the upper limit of the number ophthalmic device records. so, if I need all the records, should I query with certain limit (say 100) multiple times skipping the number of records I already got in previous queries each time, until I completely extract all the records? Hypothetical query parameters: 1. limit=100, skip =0, 2. limit=100, skip=100, 3. limit =100, skip=200 ... n. limit =100, skip=max_records-100 – Sri Kadiyala Jan 5 '17 at 22:37
  • You can find out the upper limit by inspecting meta.results.total of the returned JSON. – Denis Krylov Jan 6 '17 at 15:51

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.