Preferred ways of batch downloading a subset of the iNaturalist data?

there is no preferred way to download a bunch of photos from iNaturalist, since there is no officially supported feature that i’m aware of that provides this kind of functionality.

that said, there are ways to download a bunch of photos. the problem really consists of 2 parts – getting a list of photo URLs and downloading that set of photos.

to accomplish the first part, you can either use the observation CSV export or the get observations endpoint in the iNaturalist API. if going with the CSV approach, you’ll be limited to sets of 200,000 observations, and when you choose to get the image_url field, it will give you the URL for only the first photo for each observation. If going with the API approach, you will be limited to 10,000 observations per set of parameters, but you will be able to get all the photo URLs associated with each observation. you can work around the 200k and 10k observation limits by specifying slightly different sets of parameters for each set (easiest to do using a date range or id range).

to go with the CSV approach, you’ll have to go to the export page, and then put in the parameters you want (ex. has%5B%5D=photos&quality_grade=any&identifications=any&taxon_id=47114&photo_license=CC0%2CCC-BY&verifiable=true ) in the gray box in section 1.

to go with the API approach, you’ll just make API requests using your favorite tool / language (ex. https://api.inaturalist.org/v1/observations?sound_license=cc-by%2Ccc-by-nc&taxon_id=47114&order=desc&order_by=created_at).

there are many methods to accomplish the second part. i’ve described how to accomplish this using Windows batch files + curl (along with notes about image sizes / names, download limits, etc.), but something similar could also be done in R or whatever your favorite language is.

3 Likes