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

Query Wikidata REST API with related identifier

I am attempting to do alignments for a set of known VIAF IDs. I would like to query the Wikidata REST API with a VIAF ID (P214) and get back a set of one or more Wikidata entity IDs (QXXXXX) that correspond to that VIAF entity. I am unable to find…
sarcanon
  • 23
  • 2
2
votes
1 answer

Why "Invalid snak data" on updating wikibase?

I am trying to learn how to update values on Wikidata using the API. Login and csrf cookies work ok, but when I try to update a value I get an invalid-snak error. The request body looks like this: POST /w/api.php HTTP/1.1 Accept-Encoding:…
simone
  • 4,667
  • 4
  • 25
  • 47
2
votes
1 answer

How to use rdflib to query WikiData?

I mean that I want to use rdflib to query WIkidata in my local computer, but rdflib.Graph() need to parse the namespace firstly.THerefore, How can I get the Wikidata NameSpace to use the rdflib local code?
zqhead
  • 21
  • 2
2
votes
0 answers

Retrieve linked wikidata entities having a wikipedia page

I want to query wikidata by free text or by category, to return entities who has a corresponding wikipedia page. For each page (or for a selected page) I want to fetch all the linked wikidata entities who have a corresponding wikipedia article. Note…
user305883
  • 1,635
  • 2
  • 24
  • 48
2
votes
0 answers

Failed to execute goal on project blazegraph-service:

I am trying to install wikidata-query-rdf according to this link git clone --recurse-submodules https://gerrit.wikimedia.org/r/wikidata/query/rdf wikidata-query-rdf cd wikidata-query-rdf mvn package I've fixed error with maven following this…
2
votes
0 answers

how to get all Wikidata items that are subclasses or instances of the Wikidata items in wikimedia commons

I was working on the Issue https://github.com/commons-app/apps-android-commons/issues/3114 to add all wikidata items that are sublasses or instances of the given wikidata item(depictions) I was using this API…
2
votes
1 answer

fetching wikidata labels in other languages from reconciled column

I want to use wikidata reconciliation to translate a column of terms into various languages by fetching the labels in those languages. Using SPARQL, I'd filter a query for label by language (this is the approach suggested in various similar cases).…
Will Hanley
  • 457
  • 3
  • 16
2
votes
1 answer

Wikidata SPARQL - Countries and their (still existing) neighbours

I want to query the neighbours to a country with SPARQL from Wikidata like this: SELECT ?country ?countryLabel WHERE { ?country wdt:P47 wd:Q183 . FILTER NOT EXISTS{ ?country wdt:P576 ?date } # don't count dissolved country - at least filters…
timguy
  • 2,063
  • 2
  • 21
  • 40
2
votes
1 answer

Comparison of dates from the Wikidata api in Python

I would like to make date comparisons between dates given by the Wikidata API. At first I though to use Python's datetime module, but I bumped into two problems: Wikidata handles dates that span over billions of years in the past or the future in…
Ash_Crow
  • 111
  • 1
  • 7
2
votes
1 answer

Using the WikiData API to retrieve the entities listed in a disambiguation page

I have a WikiData id corresponding to a Wikipedia disambiguation page, for instance Q1811449. I want to get the ids of the entities listed on this page. Is it possible to do so using the WikiData API? I could not find any property in Q1811449 that…
Vincent Labatut
  • 1,788
  • 1
  • 25
  • 38
2
votes
1 answer

How to add picture credits to the query?

I have an example query of PREFIX xsd: SELECT ?person ?personLabel ?image WHERE { ?person wdt:P31 wd:Q5. ?person wdt:P18 ?image. SERVICE wikibase:label { bd:serviceParam wikibase:language "de". } } And I…
Aurelius Schnitzler
  • 511
  • 2
  • 8
  • 18
2
votes
1 answer

how to programmatically get all available information from a Wikidata entity?

I'm really new to wikidata. I just figured that wikidata uses a lot of reification. Suppose we want to get all information available for Obama. If we are going to do it from DBpedia, we would just use a simple query: select * where…
al3xtouch
  • 491
  • 4
  • 19
2
votes
1 answer

Fill Autocomplete From Wikidata api by passing Category

I am stuck on a problem . I am having Code to fill autocomplete with results from wipipedia using wikidata api I have used the following git hub resource . My HTML CODE
2
votes
0 answers

Query Person Names using Wikidata Api

I am now trying to query the aliases of specific person names (which correspond to the article title in Wikipedia) using Wikidata API. I am using R and there is a WikidataR package for Wikidata query. E.g., the person name "Martin Luther", I use…
Frown
  • 259
  • 1
  • 12
2
votes
0 answers

Querying over #Entity dbpedia

3 types of resource ways that dbpedia provides. Just like given below. 1) http://dbpedia.org/page/Akshay_Kumar 2) http://www.wikidata.org/entity/Q95 3) #Paris 1) It uses RDF schema. technique. Using SPARQL query …
iNikkz
  • 3,729
  • 5
  • 29
  • 59