Le 20/12/2015 21:55, Sage Ross a écrit :
If I'm, say, building a web app that could benefit from that kind of search suggestion tool, is there an API I can use?
The API endpoing is action=cirrus-suggest[1] and accepts 2 parameters: text for the user input and limit (5 by default).
Example : /w/api.php?action=cirrus-suggest&format=json&text=albert%20einstein&limit=5
Note that this API is highly experimental and is subject to change. I'd suggest to use it only for evaluation purpose at this point. We may provide a better integration in the mediawiki API ecosystem (i.e. generators[2]) in the coming weeks.
[1] https://en.wikipedia.org/wiki/Special:ApiSandbox#action=cirrus-suggest&t... [2] https://www.mediawiki.org/wiki/API:Query#Generators
David