Questions tagged [wikidata-api]

Related to the use of the MediaWiki API on Wikidata. Consider also the tags [wikidata] if your question isn't about the API or [mediawiki-api] if your question isn't about Wikidata.

Documentation for the API is available at mediawiki.org; a summary of all available parameters and short help is available by accessing the API endpoint on the wiki.

Please be sure to read the Etiquette page for best practices and general usage guidelines of using the API.

165 questions
25
votes
3 answers

How to get Wikidata ID for an Wikipedia article by API?

How to obtain Wikidata ID from English Wikipedia article name, also for redirects? Is there API call? Example: Karachi >> Q8660 Karaachi >> Q8660 How to approach changes in assignment? Now Media in Karachi is redirect to Media of Pakistan (Wikidata…
Shoussi Elbril
  • 261
  • 3
  • 5
21
votes
4 answers

How to get Wikipedia page from Wikidata Id?

How to get Wikipedia page (in a particular language, say French) from the Wikidata Id (ex: Q19675)? The question seems obvious but strangely, I find nothing on the web. I'm looking for a url command that I could use with requests Python module,…
Patrick
  • 2,577
  • 6
  • 30
  • 53
21
votes
3 answers

Wikidata entity value from name

Is there a way to get Wikidata page information based on the name of the entity for example if I wanted to get page data for Google. I think it has to be done using "entity" with the corresponding entity value however I am not sure of there is any…
Oroku
  • 443
  • 1
  • 3
  • 15
14
votes
3 answers

How to get image URL property from Wikidata item by API?

I've made an android app that uses the JSON Google image search API to provide images but I have noticed that Google have stopped supporting it. I have also discovered that Wikidata sometimes provides a image property on some items, however I can't…
14
votes
3 answers

Getting readable results from Wikidata

Ok so I'm trying to get information from Wikidata about movies, take this movie for example: https://www.wikidata.org/wiki/Q24871 On the page the data is clearly displayed in a readable format, however when you trying to extract it via the API you…
Oliver at ontoit
  • 185
  • 1
  • 2
  • 13
12
votes
3 answers

Get all Wikidata items that are an instance of a given item

Wikidata has an item called smartphone model. I want to get all instances of it. QUESTION: How to get the identifiers of the instances programmatically, using the live server? Preferably not including false positives that show up in WhatLinksHere…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
10
votes
2 answers

How to get place description using Google API or any other API?

I am using Google API to get the place information and store it into database. Using Google API I am able to get address, opening hours, rating and reviews as shown in below image. But, I am not able to get place description which is highlighted in…
10
votes
3 answers

How to find a Wikidata entity by property?

I would like to know, is there a way to find a Wikidata entity by specified property using their API. For example, there are plenty entities that have Freebase ID property (Property:P646). It's unique identifier and I want to get an entity by this…
Ihor
  • 277
  • 4
  • 16
9
votes
1 answer

How to get Wikidata labels by ID using SPARQL?

How can I get the labels in English or any other language in Wikidata by ID using SPARQL endpoint?
fattah.safa
  • 926
  • 2
  • 14
  • 36
9
votes
2 answers

How can I convert a Freebase query to a Wikidata query?

Using this Freebase query as an example, how can I run the same query using the Wikidata api? [{ "id": null, "name": null, "type": "/film/film", "/film/film/directed_by": "Steven Spielberg", "/film/film/genre": "Drama", …
miguel
  • 341
  • 1
  • 3
  • 10
8
votes
4 answers

How to get a list of all Wikidata properties?

What is the Wikidata API equivalent to this page which lists all known Wikidata properties? I would like to search for a property, e.g. 'doctoral advisor', and get back P184. A similar function exists for items, but I can't seem to find the…
nerab
  • 121
  • 1
  • 7
6
votes
1 answer

get list of desambiguated homonyms from wikipedia / wikidata / linked data

If I search for "George Bush" manually on wikipedia I'll get this page which lists homonyms with short descriptions. I would like to feed my search to an api and get the following info : George H. W. Bush George W. Bush George Bush (biblical…
moodymudskipper
  • 46,417
  • 11
  • 121
  • 167
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
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
1
2 3
10 11