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

MediaWiki Query and/or WikidataQuery to find Wikipedia article

This isn't so much a question abut AngularJS as it is about the Wikimedia and Wikidata query API's. Although I am trying to display the content of a Wikipedia article in AngularJS after doing a certain query that isn't the problem. I already know…
Livi17
  • 1,620
  • 3
  • 25
  • 43
2
votes
1 answer

Omit disambiguation results from wbsearchentities

I'm looking to do a fuzzy text search for entities in wikidata and would like to prevent the "disambiguation" results from being returned by the…
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
1
vote
1 answer

How to get formatter url from wikidata?

I'm trying to get all of the links that wikidata has stored for a person and display them. However most of the links use a formatter url, which means they have a code which tells them the main part of the url and then only the extension for that…
1
vote
1 answer

Search for Q-ID (from Wikidata) with Twitter Username ID. (Python)

I have a list of verified Twitter User-IDs. data['screen_name'] = [MOFAJapan_en, serenawilliams, JeffBezos ....] data['twitter_ids'] = [303735625, 26589987, 15506669 ....] and I want to get their respective Q-IDs from Wikidata. For the above…
1
vote
0 answers

Getting only external identifiers from Wikidata SPARQL query

I am trying to create a SPARQL query that will retrive only the external identifiers for a record. Basically, I want to retrieve the items listed under the "Identifers" section on one of the dedicated pages, e.g.…
Everett
  • 8,746
  • 5
  • 35
  • 49
1
vote
1 answer

Filter, subset and download Wikidata

Is there any easier way to filter data in Wikidata and download a portion of claims? For e.g., let us say that I want a list of all humans that are alive currently and have an active Twitter profile. I would like to download a file containing their…
abhinavkulkarni
  • 2,284
  • 4
  • 36
  • 54
1
vote
1 answer

wikidata sparql query timeout optimisation

I want to retrieve all instances of musicians (Q639669) in a given city (P131) born after 1900. When I pass in the wikidata example city Rotterdam (Q34370) it works. However, replacing the city with a larger city (e.g., Paris, Q90) it will…
kraftwerk
  • 35
  • 3
1
vote
1 answer

What it takes to edit wikidata from my web application?

I am developing a web application which shows basic information about basketball players. I get all the data from wikidata by basic sparql queries. However, some players are missing some basic information(height, weight, their current team, etc.).…
Riomare
  • 65
  • 1
  • 10
1
vote
1 answer

Query wikidata for wikipedia urls in multiple langauges

I'm trying to use Wikidata as an intermediary to get from a unique identifier listed in Wikidata (for example VIAF ID) to a Wikipedia description. I've managed to piece together this query to get the Wikipedia page ID from a given VIAF ID…
zkwsk
  • 1,960
  • 4
  • 26
  • 34
1
vote
1 answer

Get Wikidata item view count / popularity index

Here's my SPARQL query to list mathematicians with their Wikipedia links and images: SELECT DISTINCT ?pers ?persLabel ?nameLabel ?persDescription ?link ?img WHERE { ?pers wdt:P31 wd:Q5. {?pers wdt:P101* wd:Q395} union {?pers wdt:P106*…
s0mbre
  • 361
  • 2
  • 14
1
vote
1 answer

clientlogin to wikidata through API gives ambigous error messages

I want to login to Wikidata using their API: https://www.wikidata.org/w/api.php I had prepared a few requests and tried them against the test instance of Wikidata: https://test.wikidata.org/w/api.php. Everything worked fine and I changed the call to…
Becczor
  • 175
  • 1
  • 10
1
vote
0 answers

How can I find the path distance between any two entities in wikidata? Also, how can I found the path length from the very top of the taxonomy?

I tried looking the SPARQL documentation but couldn't find anything that helps. This is what I need to do. (PathL is pathlength)
1
vote
1 answer

Wikidata query CORS issue when making requests with frontend code running from localhost server

I am trying to get the results from wikidata API using a POST XMLHttpRequest to get the results of the query. But only few of the requests pass and some return CORS issue error which is pretty confusing. My request looks like this, I have set the…
MJ2410
  • 468
  • 1
  • 9
  • 26
1
vote
1 answer

API for the number of sitelinks and statements

Which API response the number of sitelinks and statements given a query like the picture below? Seems to me it is not wbgetclaims and wbsearchentities.
Minh Triet
  • 1,190
  • 1
  • 15
  • 35
1
vote
0 answers

WikiData property update using Python

I am trying to update an existing wikidata property programatically using Python. Currently I am using wikidataintegrator and here is example code : # obtaining the wikidata item directly from WikiData item =…
SpmiR
  • 45
  • 1
  • 7