On Wed, Nov 5, 2014 at 11:41 AM, Adrian Pohl <pohl(a)hbz-nrw.de> wrote:
I have a list of place names and want to find the according wikidata item
with this name. The list includes "Köln, "Düsseldorf" but also parts of
towns which are recorded as compounds of the superior administrative entity
and the district like "Schmallenberg-Westernbödefeld" or
If I lookup these via the Wikidata API with the wbsearchentities action I
get no problems with "Köln" and the like  but won't get any results for
compounds, see e.g.  although both strings are part of the label and the
description of a wikidata item.
The Wikidata wbsearchentities API is currently a prefix-search only.
Via the wikidata interface I get the right result, though.
I have looked quite some time but couldn't find a way to query wikidata
programatically and get results similar to the website search. Thus, my
Is there a way to query wikidata via an API over both the label fields and
You could use the mediawiki search module, that should give you the
same results that you got on the website search:
I am working at the North Rhine-Westphalian Library Service Center (hbz)and
we are currently building a new website for the Northrhine-Westphalian
bibliography.  This bibliography collects articles, books and other media
about places in the German federal state of Northrhine- Westphalia. Each
record contains a string which indicates which place a resource is about. As
soon as we have those links to Wikidata we will think about how to link to a
list of bibliographic resources about a place from the place's wikipedia
page. See the GitHub issue on this particular problem at .
All the best
Hope that helps!
Good luck with your project!
Software Developer & SCRUM Master - Wikidata - http://www.wikidata.org
Imagine a world, in which every single human being can freely
share in the sum of all knowledge. That‘s our commitment.
Wikimedia Deutschland e.V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone +49 (0)30 219 158 260
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.