User search api is not working as like in Twitter website.
When we search an user @ailsacook by typing @ailsacoo, api response is empty in all the third part tools. But when we give complete username @ailsacook we got the response. But in Twitter website it listed the user even when we give half username.
It’s reproducable by everyone irrespective of the user token.
Document url: GET users/search | Docs | Twitter Developer Platform
API endpoint: https://api.twitter.com/1.1/users/search.json
q=@ailsacoo
Autocomplete queries are not available in the API unfortunately - you need to use whole tokens only. If you need autocomplete you’ll need to create your own index with elasticsearch or something like that
1 Like
Hi,
I hope search will not work like this. When type @Raji , it list out all the username starts with @Raji like @RajiitGct @rajiiii and so on. So the same way I asked when we search @ailsacoo , it should list out all the usernames including @ailsacook right? But why response is empty?
Yes, this is a limitation: The autocomplete functionality is on the web UI or mobile app only - in the API, this functionality is not available.
Not talking about auto complete. Atleast it should list out the names starts with @ailsa right? That list also not having this username. This user name can be retrived only by giving fullname in API query.
Searching substrings like @alisac to find @alisacook is also not supported in the API
1 Like
system
Closed
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.