Is it possible to get order/family of an observation from the iNat API?

Im working on a project using the api and need to get the family/order of specific observations.

For example if I make the api call:
https://api.inaturalist.org/v1/observations?verifiable=true&photos=true&?hrank=species?lrank=species&taxon_id=40151&place_id=&order_by=votes&quality_grade=research&per_page=1

I get the results for an Eastern Muskrat, but the only information provided is the genus/species as well as iconic taxa (Mammalia) while I need to get the order (which would be Rodentia)

I’ve been able to get it using ancestor_ids, however this is flawed since the order is placed differently for different species.
Example: for some species the order would be ancestor_ids[5] but for others it could be ancestor_ids[6]

Any ideas would be greatly appreciated.

see https://forum.inaturalist.org/t/add-ancestor-rank-level-to-get-observations-response-api/38992

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.