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.

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
  • Got it! Thanks for the help! :) – Sri Kadiyala Jan 7 '17 at 23:48

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.