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

**URL:** <https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782>\
**Category:** Bug Reports\
**Tags:** search, api, taxonomy\
**Created:** [May 5, 2025, 2:20pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782 "2025-05-05T14:20:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bazwal](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/bazwal/32/109_2.png) [@bazwal](https://forum.inaturalist.org/u/bazwal)\
**Post date:** [May 5, 2025, 2:20pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782/1 "2025-05-05T14:20:55Z")

</div>

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:

- [https://www.inaturalist.org/taxa/search?q=Subcoccinella+vigintiquatuorpunctata](https://www.inaturalist.org/taxa/search?q=Subcoccinella+vigintiquatuorpunctata)

but the equivalent `GET/taxa` API query does not:

- [https://api.inaturalist.org/v1/taxa?q=Subcoccinella%20vigintiquatuorpunctata&only\_id=true](https://api.inaturalist.org/v1/taxa?q=Subcoccinella%20vigintiquatuorpunctata&only_id=true)

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

- [https://api.inaturalist.org/v1/taxa?q=Subcoccinella%20vigintiquatuorpuncta&only\_id=true](https://api.inaturalist.org/v1/taxa?q=Subcoccinella%20vigintiquatuorpuncta&only_id=true)

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_).

---

<div class="post-metadata">

**Author:** ![pisum](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@pisum](https://forum.inaturalist.org/u/pisum)\
**Post date:** [May 5, 2025, 8:32pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782/2 "2025-05-05T20:32:51Z")

</div>

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](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](https://api.inaturalist.org/v1/taxa/autocomplete?q=subcoccinella%20vigintiquatuorpunctata)

---

<div class="post-metadata">

**Author:** ![jwidness](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@jwidness](https://forum.inaturalist.org/u/jwidness)\
**Post date:** [May 5, 2025, 9:02pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782/3 "2025-05-05T21:02:57Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![bazwal](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/bazwal/32/109_2.png) [@bazwal](https://forum.inaturalist.org/u/bazwal)\
**Post date:** [May 5, 2025, 9:45pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782/4 "2025-05-05T21:45:58Z")

</div>

> [@pisum](#):
>
> i’m not sure exactly what you’re trying to do

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.

---

<div class="post-metadata">

**Author:** ![bazwal](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/bazwal/32/109_2.png) [@bazwal](https://forum.inaturalist.org/u/bazwal)\
**Post date:** [May 5, 2025, 10:23pm UTC](https://forum.inaturalist.org/t/get-taxa-api-cannot-find-valid-taxa-with-very-long-names/64782/5 "2025-05-05T22:23:35Z")

</div>

> [@jwidness](#):
>
> The 20 character limit on location searches has come up a few times … I don’t think we’ve discussed a character limit on taxon searches, but I could be mistaken

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.
