As most recently discussed in https://forum.inaturalist.org/t/prefix-matches-on-snow-better-match-than-the-aou-code-snow-for-snowy-owl/7061/14 , the
/v1/taxa/autocomplete interface appears to be better than
/v1/taxa at more reliably matching from the terms typed what the “best” result is.
v1/taxa/autocomplete interface had a
taxon_id filter, just as
/v1/taxa supports, it would allow users to be able to search subtrees of the iNat Taxonomy and get more accurate results. The filter would weed out irrelevant results, while the superior scoring system from autocomplete would help them zero in quicker on the expected match. That is, ideally, this would make their expected match the topmost match, or if not, then close to the top.
The same outcome can’t be practically achieved with either interface due to considerations I elaborated on in the discussion linked above. On the one hand, /v1/taxa/autocomplete doesn’t return enough results (maximum 30) to cover the case where 30 or more records match the terms, but none of them are in the desired Taxonomy subtree. On the other hand, the
/v1/taxa results don’t contain a complete enough set of fields for downstream code to be able to impose a better ranking system on the results that more closely matches users’ implicit expectations (i.e. that the results should be similar to what they get with the
/v1/taxa/autocomplete interface, which I use for all other calls except taxon_id, since autocomplete doesn’t support it).