Questions tagged [wikidata]

Wikidata is a free, collaborative, multilingual database, collecting structured data to provide support for Wikipedia, Wikimedia Commons, and the other wikis of the Wikimedia movement. One can retrieve all data using Wikidata Query Service (Wikidata SPARQL endpoint) or Wikidata API (Wikidata MediaWiki API extension). If you are completely new both to SPARQL and MediaWiki API, please consider to ask your question on opendata.stackexchange.com.

Wikidata is a free, collaboratively edited knowledge base operated by the Wikimedia Foundation. It is intended to provide a common source of certain data types (for example, birth dates) which can be used by Wikimedia projects such as Wikipedia. This is similar to the way Wikimedia Commons provides storage for media files and access to those files for all Wikimedia projects.

Concepts:

Wikidata is a document-oriented database, focused around items. Each item represents a topic (or an administrative page used to maintain Wikipedia) and is identified by a unique number, prefixed with the letter Q — for example, the item for the topic Politics is Q7163. This enables the basic information required to identify the topic the item covers to be translated without favouring any one language.

Information is added to items by creating statements. Statements take the form of key-value pairs, with each statement consisting of a property (the key) and a value linked to the property.

Wikidata statement

Further reference:

887 questions
6
votes
2 answers

SPARQL query including a subquery on Wikidata gives unexpected results

I know the following SPARQL against Wikidata SPARQL Endpoint query is senseless. A similar query is automatically generated from within my application. Please disregard the conceptual soundness, and let's dig into this strange (for me at least)…
Median Hilal
  • 1,483
  • 9
  • 17
6
votes
1 answer

How to get only the most recent value from a Wikidata property?

Suppose I want to get a list of every country (Q6256) and its most recently recorded Human Development Index (P1081) value. The Human Development Index property for the country contains a list of data points taken at different points in time, but I…
Brian
  • 165
  • 1
  • 3
  • 6
6
votes
1 answer

SPARQL Wikidata - Retrieve members of Wikimedia Category

I want to retrieve the members of the Wikimedia Category American rock singers. I must use Wikidata and it tells me to use P31 with Q4167836 . The query below only returns information about the Category page and not about its members. Is there any…
grajkowski
  • 349
  • 1
  • 3
  • 14
6
votes
3 answers

How to get Wikipedia page id from Wikidata id?

I want to get the Wikipedia page id from the Wikidata id, how can I get it from the Wikidata Query Service or other methods with python? Because I do not see any attribute in wikidata called something like wikipedia id.
Yue Cao
  • 61
  • 1
  • 3
6
votes
3 answers

How to retrieve aliases from wikidata

I'm trying to retrieve some information from Wikidata and I have found interesting to collect the aliases of the voices. For examples Francesco Totti is also known as il Capitano or er Pupone : I'm trying to retrieve all the serie a's football…
Lupanoide
  • 3,132
  • 20
  • 36
6
votes
2 answers

How I can know the equivalent DBPedia and Wikidata properties

Could someone tell me how i can find the synonym property of DBPedia in Wikidata? for example, the property "name" in DBpedia is "label" in Wikidata. How I can find all the synonyms properties?
6
votes
2 answers

Getting members of a category from Wikidata

I would like to get all the members of a specific category from Wikidata. For example, I would like to get all the films (instances of film: P31 Q11424) from the category "Category:Films set in Stockholm" (Q7519614). However, I can't seem to find…
user2987808
  • 1,387
  • 1
  • 12
  • 28
6
votes
1 answer

Efficiently extract WikiData entities from text

I have a lot of texts (millions), ranging from 100 to 4000 words. The texts are formatted as written work, with punctuation and grammar. Everything is in English. The problem is simple: How to extract every WikiData entity from a given text? An…
6
votes
1 answer

How to get all Property value's Labels of an Wikidata Item?

How would you request the set of all Properties that an Item has? Specifically, I'm looking for the English Labels for each Item that is the Value of an Item's Property. E.g. "Earth": { "Challenger Deep", "Solar System", "oblate…
Ware
  • 97
  • 6
6
votes
0 answers

Getting Wikidata incremental triples

I would like to know if it is possible to get the latest incremental n-triple dumps of Wikidata. I'm using Wikidata Toolkit to download the latest version of the dumps and convert them automatically in n-triple files (using…
Ortzi
  • 363
  • 1
  • 6
  • 17
6
votes
2 answers

Retrieving the Interlanguage links from an exported Wikipedia article?

I used to retrieve the interlanguage links from an exported Wikipedia article by parsing the export with some regular expressions. In phase 1 of the WikiData project these links have been moved to a separate page on Wikidata. For example the article…
Dawied
  • 897
  • 10
  • 16
5
votes
0 answers

get claims of entity wikidata by wbgetentities search label

I was wondering what the simplest way is to get data from wikidata by labels searching like : API_ENDPOINT = "https://www.wikidata.org/w/api.php" query = "cobalt-70" params = { 'action': 'wbsearchentities', 'format': 'json', 'language':…
5
votes
0 answers

Jena tdbloader performance and limits

When trying to load a current Wikidata dump as documented in Get Your Own Copy of WikiData by following the procedure describe in https://muncca.com/2019/02/14/wikidata-import-in-apache-jena/ i am running into some performance problems and limits of…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
5
votes
2 answers

Training times for Spacy Entity Linking model

I'm trying to train a Spacy Entity Linking model using Wikidata and Wikipedia, using the scripts in https://github.com/explosion/spaCy/tree/master/bin/wiki_entity_linking. I've generated the KB and moved to training the model, but that is not done…
Alessandro
  • 51
  • 3
5
votes
1 answer

POST (not GET) wikidata query

I'm following these instructions to submit a SPARQL query, preferring the POST method as queries may be quite long. But it seems to fail even though the GET works - any way to make a POST query work? sparql = <
mahemoff
  • 44,526
  • 36
  • 160
  • 222
1 2
3
59 60