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
1
vote
1 answer

Loading wikidata dump

I'm loading all geographic entries (Q56061) from wikidata json dump. Whole dump contains about 16M entries according to Wikidata:Statistics page. Using python3.4 + ijson + libyajl2 it comes to take about 93 hours of CPU (AMD Phenom II X4 945 3GHz)…
QwiglyDee
  • 789
  • 8
  • 18
1
vote
1 answer

Get list of eye colors via wikidata API

For example, I need to get list of eye colors with wikidata API: https://www.wikidata.org/wiki/Property:P1340 Is it possible to receive names of the colors without SPARQL…
Enstl
  • 15
  • 3
1
vote
0 answers

invalid csrf token in wikidata api even on logging in through java

I was making a request to wikidata for editing a label through java. Here below I used Jsoup to make a request. Response res = (Response) Jsoup.connect("https://www.wikidata.org/w/index.php?title=Special:UserLogin&returnto=Wikidata%3AMain+Page") …
1
vote
1 answer

Check whether an item with a certain label and description already exists on Wikidata by Pywikibot

I am looking for a way to find out whether an item with a certain label and description already exists on Wikidata. This task should be performed by the Pywikibot. I don't want my Bot to create a new item if it already exists. So far, my code looks…
TIlls
  • 55
  • 5
1
vote
1 answer

How to use the Wikidata API or an alternative to Freebase

I have a couple of years of programming experience in Java (Android) and this is my first time with the use of API's to retrieve JSON data. So to get basic facts on a queried topic I thought of using Freebase API however this is now going to be…
KISHORE_ZE
  • 1,466
  • 3
  • 16
  • 26
1
vote
0 answers

Wikidata api autocomplete for books and Movies search

I am working on a autocomplete, I am using a jQuery autocomplete and extracting data from wikidata api. It is working fine. I got some help from following link https://github.com/ouisharelabs/wikidata-autocomplete I want to modify this search bit…
1
vote
1 answer

Wikimedia Commons API: search for Commons categories near a location

After reading Wikimedia Commons API search images by (latitude, longitude), I know that we can find pages around a specified location using the MediaWiki API with the GeoData extension. However, I am looking to obtain Commons categories around a…
1
vote
2 answers

Get VIAF identifier from a Wikidata Item

I've been playing around with the Wikidata API for a while. I know how to get item (entities) by name and by their Q number. but I can't seem to figure out how to get their properties right. What I'm looking for is P214 (viaf identifiers for…
svarog
  • 9,477
  • 4
  • 61
  • 77
1
vote
1 answer

Query Wikidata for entity type(s)

I want to get the types according to Freebase of a Wikipedia page. For example, for Jeb Bush I should get, Politician, Organization leader, Organization founder, Person, Family member, Film actor, Political Appointer I know how to do this in…
shyamupa
  • 1,528
  • 4
  • 16
  • 24
1
vote
2 answers

Wikidata API search like wikipedia searchbox

I have a problem with the Wikidata API which I cant figure out. I'm searching if a Wikipedia article exists for a given landmark. For example the temple "Tiger's Nest" in Bhutan. The temple's name on Wikipedia is "Paro Taktsang", but if you search…
NLAnaconda
  • 1,534
  • 3
  • 14
  • 38
1
vote
1 answer

Get description of a Wikidata property?

How can we get a human readable property description of a Wikidata property (e.g.: P31) using pywikibot?
1
vote
1 answer

Accessing data from Wikidata JSON file

I'm trying to access the following properties from the Wikidata API: id, url, aliases, description and label but so far have been unsuccessful. I'm sure I'm making basic mistakes and so far only have the following code. Any suggestions as to the…
Oroku
  • 443
  • 1
  • 3
  • 15
0
votes
1 answer

Querying Wikidata API using Javascript shows error related to CORS

What I know Getting data from the Wikidata API using curl Getting data from the Wikidata API using jQuery The problem The question What I know Getting data from the Wikidata API using curl I know that it is possible to get data of Wikidata…
rdrg109
  • 265
  • 1
  • 8
0
votes
0 answers

Querying for a country Speed limits

I'm trying to get a list of general speed limits for a given country from WikiData using SPARQLE. For example France: SELECT ?speed ?qualifierLabel WHERE { wd:Q142 wdt:P3086 ?speed ; p:P3086 [ ps:P3086 ?speed ; …
leuk98743
  • 131
  • 7
0
votes
1 answer

How to make the value of a claim in wikidata a hyperlink or link to another external page

I am trying to create a script in Wikidata that creates a claim for certain entities. The claim should have a property of "external identifier" and a value that is the identifier generated by an external organization. Additionally, I want the value…
James_00
  • 5
  • 2