Querying The API For Multiple taxon_id Values

Hiiiii I love iNat with my whole heart, it changed my life. This is my first post here, I’m 98% sure I’m posting in the right place, but if not I’m happy to post it somewhere else!

Does anyone know if it’s possible the query the API for multiple taxa? For example, this search for Lamiaceae in my general area:

https://www.inaturalist.org/observations.json?d1=2024-01-29&taxon_id=48623&nelat=30.3330346054105&nelng=-89.33128176732069&place_id=any&swlat=29.504614129552973&swlng=-90.57273684544569

But I also want to see other things in that same area, Limpkins for instance. So a query like:

https://www.inaturalist.org/observations.json?d1=2024-01-29&taxon_id=48623,7&nelat=30.3330346054105&nelng=-89.33128176732069&place_id=any&swlat=29.504614129552973&swlng=-90.57273684544569

Would replace 2 API calls with only one. I’ve tried it with commas and I’ve tried it like taxon_id[]=324726&taxon_id[]=14889 but neither seem to work. Is it actually possible?

Thank you for your patience!

2 Likes

Oh my goodness. Every time I ask for help, I then immediately stumble upon the answer by chance. I guess I just need to be humbled a bit!

I tried changing taxon_id to taxon_ids and Viola sororia, that works!

https://www.inaturalist.org/observations.json?d1=2024-01-29&taxon_ids=48623,7&nelat=30.3330346054105&nelng=-89.33128176732069&place_id=any&swlat=29.504614129552973&swlng=-90.57273684544569

2 Likes

it looks like you’re trying to make requests from the deprecated API. you should consider using the current API. see http://api.inaturalist.org.

1 Like

LOL Viola sororia. Have to use that around botanist friends.