Hello,
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 "Kerpen-Manheim".
If I lookup these via the Wikidata API with the wbsearchentities action
I get no problems with "Köln" and the like [1] but won't get any results
for compounds, see e.g. [2] although both strings are part of the label
and the description of a wikidata item.
Via the wikidata interface I get the right result, though.[3]
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
question is:
Is there a way to query wikidata via an API over both the label fields
and the description?
Background
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. [4] 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 [5].
All the best
Adrian
[1]
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Köln&language=de&format=json
[2]
https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Kerpen%20Manheim&language=de&format=json
[3] https://www.wikidata.org/w/index.php?search=Kerpen+Manheim
[4] http://lobid.org/nwbib
[5] https://github.com/hbz/nwbib/issues/42
--
Adrian Pohl
hbz - Hochschulbibliothekszentrum des Landes NRW
Tel: (+49)(0)221 - 400 75 235
http://www.hbz-nrw.de
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech