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
0
votes
1 answer

Getting only english property value

I am trying to get a list countries including the english short names: # get a list countries with the corresponding ISO code PREFIX rdfs: PREFIX wd: PREFIX wdt:…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
0
votes
0 answers

I used MAX here to pick the maximum of the net worth of the billionaires, but it seems to not work in cases like, Bill Gates, Elon Musk etc

SELECT DISTINCT ?item ?itemLabel ?itemDescription (MAX(?billion) as ?billions) ?locationLabel (SAMPLE(?image) AS ?picture) ?page_titleEN WHERE { ?item wdt:P2218 ?worth. OPTIONAL {?item wdt:P19 ?location .} FILTER(?worth>1000000000). …
0
votes
0 answers

How can I get the list of Wonders of the World using SPARQL from wikidata?

SELECT ?item ?itemLabel ?itemDescription ?countryLabel ?picture { ?item wdt:P31 wd:Q209287 OPTIONAL { ?item wdt:P17 ?country } OPTIONAL { ?item wdt:P18 ?picture } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }
0
votes
2 answers

Cannot create Wikidata schema in OpenRefine

Would anyone know why I cannot create a Wikidata schema in OpenRefine? I've reconciled all columns necessary for the project, but when I go to the schema tab, no column will drag/drop into the boxes. stubbon schema Thank you! J
Jane
  • 11
0
votes
1 answer

WIKIDATA/SPARQL: How to get the used language when using SERVICE wikibase:label with [AUTO_LANGUAGE] parameter

About everything in the title : When I use SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } I may get some results with the detected [AUTO_LANGUAGE] and others in 'en'. Is it possible to get the used language for…
Okilele
  • 85
  • 1
  • 5
0
votes
0 answers

Swift - parsing wikidata with urlsession and json decoder not working

I'm trying to build a engine that will take a few pieces of data and parse them through a wikidata query...there are two url session tasks here is my code, but for some reason I can't get the functions to perform the networking to execute...what am…
Benjamin B.
  • 521
  • 7
  • 15
0
votes
0 answers

How to get the label of the relationship from WikiData's SPARQL endpoint?

Most questions in SO asks for the label of a property. I want the label of the relationship. This is my first attempt. SELECT ?h ?hLabel ?kLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } wd:Q11462 ?h ?k. …
Realdeo
  • 449
  • 6
  • 19
0
votes
2 answers

Wikidata SPARQL : get subclasses but also return parent class

I am writing SPARQL queries on Wikidata entities, and I would like to get all the entities matching "is entity Q3 OR one of its subclasses". I know how to get the subclasses only with the following query : SELECT DISTINCT ?item WHERE { { ?item…
Ewaren
  • 1,343
  • 1
  • 10
  • 18
0
votes
1 answer

How to get all person instances with its height from DBpedia?

I'm working on a project that displays celebs height and Wikidata does not always provide the information needed. So I considered DBpedia as another option and spent days trying to find out how to deal with it how can I fetch every instance of…
reham501
  • 109
  • 1
  • 1
  • 9
0
votes
1 answer

Duplicated items on SPARQL query (Wikidata)

I'm trying to clean some results from a WikiData query. If you lookup for IBM, for example, you'll see multiple entries of it... I'd like to show only the first result of a same "wd:" item. Is there a way to user FILTER or EXISTS on this case? Like,…
crzy
  • 23
  • 5
0
votes
1 answer

Lists the most viewed pages Wikimedia projects (Wikipedia) with more than 1000 results

I have seen that there are various APIs and various tools that allow you to see the most visited pages of the Wikimedia projects such as Wikipedia, but all these services have a limit, they do not allow to show more than 1000 pages, while I would…
Overflow992
  • 31
  • 2
  • 5
0
votes
1 answer

Wikidata get Industry of Person

Wikidata provides Person’s occupation information. I there a way to get Industry of that occupation? Like Actor, Choreographer, Director belongs to Entertainment industry. Is that information available on wikidata?
user4981459
0
votes
1 answer

Retrieve Wikipedia page title when performing full text search in Wikidata API

I want to search a term using Wikidata API, and retrieve a list of corresponding entities identifiers and related Wikipedia page titles (if available). I'm currently using the following…
0
votes
1 answer

Access statements of Wikidata entities by id

I would like to know if there's a way to find a Wikidata entity by specified property using their API. This is my request:https://www.wikidata.org/w/api.php?action=wbgetclaims&format=json&entity=Q85670252 Output…
0
votes
1 answer

Getting Wikipedia infoxbox data from Wikidata

I am trying to get Wikipedia infoxbox data from Wikidata's API, for a number of companies. For example,…
Max888
  • 3,089
  • 24
  • 55