How to search API by location?

Hi team! I’m trying to understand the iNaturalist API - I’m wanting to know how to search for taxa in a specific region.

Say for example, I’m trying to find out all the species of Carrots that grow/or are observed being grown in Australia ? How would I be able to retrieve this info?

At the time of querying, the only information I will have is im looking for “carrots” and in a region “Australia”.
The result im expecting is a list of carrot varieties that have been grown/observed in Australia (note - i’m not looking for a list of observations). How to go about this?

https://api.inaturalist.org/v1/observations/species_counts?place_id=6744&taxon_id=56727
Is this the kind of thing you’re looking for?

2 Likes

Possibly! How is that doing the filtering?
And how can I know the ‘place_id’ and ‘taxon_id’ if i only have “Sydney, Australia” and “carrots” to begin with? I’m trying to do this programmatically.

you can’t find grown, but you can find “observed”. by variety, i assume you mean taxa below species.

this gives “leaf taxa” (species would be the lowest rank here). to get subspecific taxa in a list, you need to use the undocumented lifelist API route: https://api.inaturalist.org/v1/observations/taxonomy?place_id=6744&taxon_id=56727

look it up. there’s are autocomplete and detail versions of /v1/places and /v1/taxa, and there’s also /v1/search.

you need to read:

why are you trying to get this information?

2 Likes

So you’re looking for a checklist, rather than a list of observations?

1 Like

This may seem like a silly question, but how are you defining “carrot” and “being grown”?

I’m asking because it makes a difference whether you mean species in the carrot family (Apiaceae) or varieties/cultivars (not species) of the domesticated carrot (Daucus carota).

It also matters if “being grown” means that you are interested in what types of carrots people are planting, rather than what types of carrots can be found outside cultivation in Sydney.

The main focus of iNaturalist is on wild organisms – this means that 1) it does not really support fine-grained information about horticultural varieties and cultivars and 2) it is unlikely to provide a reliable and comprehensive picture of what types of carrots are being cultivated in Sydney, because most users do not spend their time documenting cultivated plants. If this is what you are interested in, you would probably have more success and get better data from other sources such as gardening databases that allow people to record their plantings.

1 Like

Thanks for this info! I’m still getting familiar with the info that is stored on iNaturalist - ‘domesticated’ is one key that i was thinking about referring to.

Im interested in the wild organisms that are observed here, as well as plants that are grown (cultivated) and also wild/native plants too. By chance are you able to point me to any gardening databases that you’ve found useful/reputable?

From help here and elsewhere I’ve found this kind of query to be helpful:
https://api.inaturalist.org/v1/observations/species_counts?q=carrot&lat=-35.8136276&lng=144.9630576&radius=500&quality_grade=research&per_page=20&page=1&locale=en&rank=subspecies&rank=genus&rank=species&iconic_taxa=Plantae

No, because I’m not in Australia. But this is the sort of information that one ought to be able to find fairly easily by doing an internet search.

I notice that you did not really answer my question. You are more likely to get useful advice if you can clearly articulate your research question (what precisely do you need to know and why), which so far you have not done.