Wikidata:Contact the development team/Query Service and search/Archive/2020/01

This page is an archive. Please do not modify it. Use the current page, even to continue an old discussion.

How does the "Auto complete Item ID" function, and can I access it?

Hi,

I'm writing a thesis on semantic web interfaces, and am going to build a user friendly search engine for linked data databases. A search field with auto completion is - according to my research - a great way of guiding the user into making a correct search. The "ctrl-space" feature on Wikidata is fantastic, and exactly what I want to implement in the service. How does it work?

Have you made an index of all items with their labels and a short description which you query, or are you making SPARQL queries in the background? And can I query your service directly for item lookup, or should I build my own index of wikidata item - label/description pairs?

Best Regards, Mats

 – The preceding unsigned comment was added by Matsjsk (talk • contribs).

When performing item completion the UI running on query.wikidata.org is calling the wbsearchentity API module. This API is powered by elasticsearch, we have indeed indexed all the labels and aliases to allow such feature. You can query the service directly as long as you read and follow the mw:API:Etiquette and Wikidata:Data_access guidelines. DCausse (WMF) (talk) 14:36, 16 January 2020 (UTC)