Add taxon_id filter to /v1/taxa/autocomplete

I think having taxon_id as a parameter for the autocomplete endpoint is a fine addition, and I’ve just added it along with a few other parameters, rank, rank_level and all_names which returns all taxon names in the response. I do not know the requirements if what you’re building, so I don’t have an opinion on whether this parameter is what you need.

Please keep in mind that we still cannot guarantee for either the search or autocomplete endpoints that matched_term will be the term you are expecting. The logic for choosing the matched term is the same for each endpoint, but the queries we use are different, so it’s up to Elasticsearch what the best match is. But maybe with the addition of a way to get all names you can pick the match you feel is best.

If you’d like to see more things added to the API, it would be helpful to have separate posts for each request.

2 Likes