GET/taxa API cannot find valid taxa with very long names

When using the GET/taxa API (v1) to search for taxa, no results are returned for queries that contain very long words, even though the name is valid. However, the expected taxon is found when the same query is made using other search methods (such as the website interface, or other APIs like GET/search or GET/taxa/autocomplete).

For example, the following website query works:

but the equivalent GET/taxa API query does not:

It seems there’s an artificial limit of twenty characters per word, because trimming the query gets the expected result:

I’m pretty sure this is a fairly recent change, because I’ve used the GET/taxa API to find matches for names like Subcoccinella vigintiquatuorpunctata many times before without encountering this problem (as well as even longer ones, such as Coeliodes transversealbofasciatus).

1 Like

i vaguely recall something like this having been discussed before on the forum, but i can’t find the relevant thread.

i’m not sure exactly what you’re trying to do, but i think if you’re trying to search by name, you can also use the site search: https://api.inaturalist.org/v1/search?q=subcoccinella+vigintiquatuorpunctata&sources=taxa&include_taxon_ancestors=false

taxon autocomplete works, too:
https://api.inaturalist.org/v1/taxa/autocomplete?q=subcoccinella%20vigintiquatuorpunctata

1 Like

The 20 character limit on location searches has come up a few times, e.g. https://forum.inaturalist.org/t/boundaries-of-the-northwest-territories/40001/4

I don’t think we’ve discussed a character limit on taxon searches, but I could be mistaken

1 Like

I’m simply trying to use the GET/taxa API in the way it’s documented to work. I’ve now edited my bug report to make it clear that it only relates to that specific API. I already know there are several other ways of searching for taxa.

I’ve been using GET/taxa for many years without ever encountering this limit. It’s used in a GUI front-end to the iNaturalist taxa search which is part of a larger application that I use for uploading my observations. Every taxon I have ever uploaded has been checked at least once using that tool, and the results are only cached only a daily basis. There are several common species with names longer than 20 characters that I quite regularly upload, so it’s very hard to see how I could have missed this weird limitation. But admittedly, I have no way to prove that I’ve definitely made such queries before.