Questions tagged [wikidata]

Wikidata is a project of the Wikimedia foundation related to open data

Filter by
Sorted by
Tagged with
24
votes
7answers
7k views

How can I download the complete Wikidata database?

Wikidata is a new Wikimedia project: It centralizes access to and management of structured data, such as interwiki references and statistical information. This data would be of enormous interest ...
18
votes
2answers
3k views

Get Wikipedia URLs (sitelinks) in Wikidata SPARQL query

I can use the following query to list all sovereign states via the Wikidata query interface: PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> ...
14
votes
5answers
2k views

Mapping all Wikipedia URLs to Wikidata entity ids

Is there a Wikidata dump that maps all Wikipedia URLs to their corresponding Wikidata entity ids, e.g. the Wikipedia URL https://en.wikipedia.org/wiki/Tom_Hanks to the Wikidata entity id Q2263?
11
votes
2answers
4k views

How to get the name of a Wikidata item

Let's say I have a Wikidata item QID Q19675, and want to get the name of that item in Spanish. While getting a property like P281 postal code is easy, how to get the name, which for some reason is ...
11
votes
2answers
1k views

How to output the description of Wikidata items using SPARQL?

I am trying to output a table using query.wikidata.org and SPARQL, with the name, birthdate, and brief description of notable, living Americans (i.e. those with wikidata entries) who will turn 100 ...
9
votes
4answers
2k views

How to get list of all items that have a particular property, in Wikidata?

How collect Wikidata's entities by a certain property?
9
votes
2answers
1k views

How to include sub-classes in a Wikidata SPARQL query? (example: when querying “bands”, include “rock bands”)

Here is my naive query for bridges: SELECT ?item WHERE { ?item wdt:P31 wd:Q12280. # Item's type is: bridge } Problem: It only returns a small fraction of all bridges, because railway bridges (...
8
votes
3answers
607 views

Querying Wikidata : WDQ vs. WDQS / SPARQL

I'm new to Wikidata and I'm wanting to query it. The official page list several promising syntax / APIs : WDQ "Wikidata Query" syntax : http://wdq.wmflabs.org/api_documentation.html SPARQL syntax via ...
8
votes
2answers
300 views

Is Wikidata up to date with Wikipedia?

I think that DBpedia links to Wikipedia by Wikipedia database dump, making it not up to date with on-line Wikipedia contents. I was wondering if Wikidata uses on-line Wikipedia content or if it also ...
8
votes
2answers
504 views

Wikidata get property of property

This question is related to this. We have the following query: SELECT DISTINCT ?item ?itemLabel ?AuthorLabel ?year WHERE { ?item wdt:P166 wd:Q255032. ?item wdt:P50 ?Author . ?item wdt:P577 ...
8
votes
2answers
777 views

Extract labels from Wikidata entity

Is there a way to extract the labels of the statements (property and object) in Wikidata? I want to get all the information that there is here:https://www.wikidata.org/wiki/Q42, properties and objects ...
7
votes
1answer
273 views

wikidata: (when) will it be possible to query for wikipedia page links?

(When) will the following be possible: For a wikipedia page: get the list of all wikipedia links on that page with their respective wikidata IDs in a single query/API call. Receive additional ...
6
votes
2answers
160 views

Retrieve periodic table information from wikidata

I'm trying to retrieve some basic informations from chemical elements stored in wikidata to create an interactive periodic table. It's my first attempt to use wikidata, so I've understood how to get ...
5
votes
2answers
159 views

Mapping between Wikivoyage article names and their Wikidata identifier

When I want to know the Wikidata identifier of a Wikivoyage article like Barcelona, I usually run this API call: wget --quiet -O - "http://www.wikidata.org/w/api.php?action=wbgetentities&sites=...
5
votes
3answers
512 views

How can I add Wikidata properties of item a on the Wikipedia page of item b?

How would I get the eccentricity (Property:P1096) of Venus (Q313) in the article en:Mars? I have figured out that I have to write {{#property:P1096}} if I want to get a property of the page on that ...
5
votes
2answers
276 views

How can I get a list of currencies from Wikidata?

Some currencies already exist, like [1], [2] and they are all instances of currency [3]. Unfortunately there are no links to all instances from [3]. So is there a possibility to get this list from ...
5
votes
1answer
76 views

Wikidata: How to represent British Hong Kong's under Japanese occupation?

Between 1941 and 1945, British Hong Kong (then a colony) was occupied by the Japanese, see this Wikipedia article. However on British Hong Kong's Wikidata page, there's no mention of the Japaneses ...
5
votes
2answers
1k views

How can I get the Wikidata inter-language links?

I'm trying to get hold of the Wikidata inter-language links, i.e. a file listing all of the articles and which articles they are linked to in other languages. ( http://www.wikidata.org/wiki/Wikidata:...
5
votes
2answers
255 views

How to get urls of entries in wikipedia list articles?

I am trying to retrieve the URL of all articles listed inside wikipedia list articles. For concreteness lets consider the wikimedia list article List_of_American_scientists I know how to use the wiki ...
5
votes
1answer
149 views

Constructing a WordNet-like tree from the Wikidata dataset?

Is there an approach to constructing a semantic tree somewhat like WordNet, but using the vastly more structured and useful Wikidata data instead? How could this work? Could we place similar entities ...
5
votes
1answer
202 views

Wikidata label language: How to fallback to ANY language?

In Wikidata, this shows labels in English, and falls back to Russian if no English is available: SERVICE wikibase:label { bd:serviceParam wikibase:language "en, ru" . } QUESTION: How to fall back ...
5
votes
1answer
78 views

Julian and Gregorian dates from Wikidata

How can I get the Julian birth or death date for someone who was born or died under the Julian Calendar (Isaac Newton, for example) on Wikidata using a SPARQL query? This simple query returns "4 ...
4
votes
1answer
312 views

What are the practical differences between WikiData's infrastructure and SemanticMediawiki?

Wikidata is a new addition to the WikiMedia foundation that focusses on providing machine-readable data that can be re-used by other sites. SemanticMediaWiki is a large extension for mediawiki that ...
4
votes
2answers
497 views

get item's properties know QID

Know QID I can get items's label: SELECT DISTINCT * WHERE { wd:Q302 rdfs:label ?label . FILTER (langMatches( lang(?label), "EN" ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language "...
4
votes
1answer
69 views

Why does Wikidata's query interface return no results for entities with an id of Q10000001 or higher?

I have this SPARQL query to return an item's label and the url of a Wikipedia article: PREFIX schema: <http://schema.org/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?article ?...
4
votes
1answer
39 views

Wikidata differs from Wikipedia

I am trying to retrieve data for a company programmatically using the Wikidata API. However, the data retrieved from Wikidata is different from en.wikipedia.org. Is this expected? Example: Nissan ...
4
votes
1answer
79 views

Sort results by proximity with the “around” service in Wikidata

With this query, I can get a list of German cities around Berlin, within a radius of 50 km. SELECT ?place ?placeLabel ?location WHERE { wd:Q64 wdt:P625 ?arcLoc . ?place wdt:P31 wd:Q515 . ?...
4
votes
1answer
127 views

Publishing (structured?) data about products: information about products, barcodes, photos (incl. packaging)

Is it legal to publish photos of products and their packaging? Can such be done anonymously on some open license? (which would be the best for such data to be open for public use, as products are ...
4
votes
3answers
144 views

Icons set to represent Wikidata classes (hospital, park, waterfall, prison, school, etc)

I am looking for icons that can illustrate Wikidata classes such as: Q16917 hospital Q22698 park Q34038 waterfall Q40357 prison Q3914 school etc I could use each class' image property, but ...
4
votes
2answers
186 views

wikipedia page: get the list of all links with their wikidata ids

For a Wikipedia page: is it possible to get the list of all Wikipedia links on that page with their respective wikidata IDs in a single query/API call? Optional: can additional information of the ...
4
votes
1answer
329 views

Is there any open dataset for named entity linking?

Entity linking is the task of detecting mentions of entities from a knowledge base in a document. Are there any openly available datasets to train and evaluate such systems? The datasets I came ...
4
votes
1answer
90 views

Is the Foundational Model of Anatomy Ontology an Open Data that can incorporated in other Open Databases?

At the moment I'm investigating the state of anatomical knowledge on Wikipedia/Wikidata. I noticed that the Foundational Model of Anatomy has a lot of useful data and while the ID's are usually ...
4
votes
0answers
27 views

Find most-depicted Wikidata items that have no image

Wikimedia Commons has a new feature where a picture can have metadata saying it depicts a given Wikidata item. For instance, https://commons.wikimedia.org/wiki/File:Grandpark_Plaza.jpg depicts https:/...
3
votes
2answers
312 views

Mapping between Wikidata and Geonames

Where can I find a mapping between Wikidata entities and Geonames entities? Wikidata: GeoNames:
3
votes
3answers
222 views

wikidata extract

I have a list of wikidata entity IDs (i.e. Tour Eiffel Q243, Big Ben Q41225...), and a list of properties (i.e. coordinates P625, country P18 ...). Is there any way to gather and extract in Excel (or ...
3
votes
1answer
164 views

Wikidata SPARQL, why an intermediate item is needed in this sample query?

In the Wikidata SPARQL samples, I found this query: What is the relation between Terrell Buckley and Miami Dolphins? Items used: Terrell Buckley (Q5571382), Miami Dolphins (Q223243) SELECT ?l WHERE ...
3
votes
2answers
105 views

Info based on page title?

I'm looking for a way to get info from wikipedia based on the page title. example: If i have a page called "Britney Spears" i want to be able to get a simple bio extracted from wikipedia onto the ...
3
votes
1answer
586 views

Get QID from Wikidata label name, via SPARQL

I use api.php to get the QID of something using its English label. Example: Mozambique → Q1029 $ wget --quiet -O - "http://www.wikidata.org/w/api.php?action=wbgetentities \ &sites=enwiki&...
3
votes
1answer
50 views

How to add a claim to an existing Wikidata item, from command line?

I want to add to Wikidata this claim: Embassy of Switerland, London - is operated by - Switzerland ... using my Linux command-line. Launching a web request via curl is OK too. How to do? I have ...
3
votes
1answer
140 views

Wikidata Query Service reliability

I encountered a partially incorrect result set from Wikidata Query Service. Requested Wikipedia article urls were missing for an item where this information existed, see https://stackoverflow.com/...
3
votes
1answer
119 views

Subquery in wikidata

I would like to get a list of all the current ministers in Germany. Those are CLAIM[39:248352]. This gives me all ministers that have ever been there though. I would like to limit it on the current ...
3
votes
1answer
165 views

Most efficient way to get the Wikidata entity for a city, given as a string

The goal is to get from the string "Lugano", the entity Q7024, knowing that I am searching for Swiss locations, by name in German. So far this is how I do it but it doesn't look very efficient. 1) ...
3
votes
1answer
102 views

Mapping a Wikimedia project URL to the corresponding Wikidata entity id

I am looking for the best method to map a given Wikipedia/Wikisource/Wikibooks/... URL to the corresponding Wikidata entity id (similar to this question but via API calls instead of a full data dump). ...
3
votes
1answer
68 views

Where should I host/contribute a mapping from Stack Overflow tags to Wikipedia articles?

I had asked for a mapping from Stack Overflow tags to Wikipedia articles over at meta.stackoverflow, but no one seemed to find one, so I started building my own. Where is the "right" place for me to ...
3
votes
1answer
55 views

Numerically order SPARQL results that are external identifiers but actually all numbers

I wrote this query to list Wikidata items that have an RFC identifier: SELECT ?rfcId ?itemLabel ?classLabel ?item WHERE { ?item wdt:P31 ?class. ?item wdt:P892 ?rfcId. SERVICE wikibase:label { ...
3
votes
1answer
167 views

Wikidata: QueryTimeoutException: Query deadline is expired

I used to execute successfully the following query: SELECT (COUNT(?r) AS ?count) WHERE { [] <http://www.wikidata.org/prop/direct/P31> ?r } on http://wdqs-beta.wmflabs.org/bigdata/namespace/wdq/...
3
votes
0answers
165 views

What are the limitations of the Wikidata data model?

Wikidata data model is as follows: The following diagram is a more summarized version of it (source): All terms are defined here. I wonder what the limitations Wikidata data model are.
2
votes
2answers
149 views

How to get all Wikidata items in a country?

Using SPARQL I want to show all French embassies in Liberia (spoiler: there is exactly one) So I wrote this naive query: SELECT ?item WHERE { ?item wdt:P17 wd:Q1014. # country: Liberia ?...
2
votes
1answer
34 views

Limiting a SPARQL Query to Lastest Point in Time

I'm trying to get information on Prefectures in Japan out of Wikidata. I succeeded to read the population statement, however there are occasionally several values with different point in time fields. ...
2
votes
2answers
67 views

How to get specific wikipedia data?

I only want to use the link structure and articles’ content of Wikipedia. Therefore, I want to downlaod the dump that contains only the following details. articles content link structure (i.e. re-...