API for local (Polish) insect name

Hello!

tl;dr how to get local species name via iNaturalist API? If not possible, what’s the policy for webpage fetching (low rate, always caching)?

I’m using APIs for sorting my photos. For adding taxons (and hence moving to proper directories/folders) I’m extensively using iNaturalist and for translations to Polish* I’m using WikiData.

WikiData is quite fine with translations of higher than species taxa, it often fails with getting Polish name for specimen (like in case on screenshot with Arma custos (pl: Wojnica drapieżna). I noticed it’s present on iNaturalist HTTP page (in span.comname.display-name:first element).

While my tool has a fallback allowing you to enter the name manually, I’d really love to be able to get Polish data from some API, possibly iNaturalist - if that would be possible, it would also simplify tool, because I wouldn’t have to use two different APIs. I could fetch HTML page, but 1) I find it rude to access by bot pages that weren’t meant to be accessed this way; 2) while it seems to be a trivial task, HTTP parsing is not as reliable as API.

PS: I know local names can be ambiguous, but at my level of knowledge it’s much easier to have Polish names alongside real scientific names

1 Like

If you have the taxon id (e.g. 48256), the following url will include all the names iNat has:
https://api.inaturalist.org/v1/taxa?taxon_id=48256&all_names=true

1 Like

You can also add &locale=pl and then the preferred common name is the Polish name.

3 Likes

you could just download the DWCA taxonomy export, which is a (monthly?) snapshot of the active taxa in iNaturalist, along with all the different names for each taxon.

if you hit the API, you should just abide by the developer guidelines here and in related pages: https://www.inaturalist.org/pages/developers.

2 Likes

Solved! Thank you all! I didn’t know these API guidelines, so I used it with throttling and caching - and after reading, I see I was quite within the limits, even if I’d do 10000 more requests than now (a few per hour).

Actually, I was mistaken what I needed the most (polish>latin/id), but with that taxa dump, that’s solves my problem and even more - now I’d be able to do it totally offline :D

That’s way more than I counted for. :kissing_heart:

1 Like

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