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

How can I get wikipedia xml page including all information which I need?

I have enwiki-20110115-abstract.xml as the follwing in the image 1: enter image description here I have also enwiki-20110115-pages-articles.xml as the following image 2 : enter image description here What I need is the all information tags in the…
0
votes
0 answers

Extracting companies and all their properties from Wikidata

I want to extract all companies from a specific stock index, e.g. Dow Jones together with all their properties from Wikidata. Take IBM for example, then the output should somehow look like this: instance of -> software company... part of -> Dow…
BeginnerGinner
  • 15
  • 1
  • 1
  • 4
0
votes
1 answer

Retrieving all Wikipedia articles about people

I'm trying to retrieve all articles from Wikipedia that are about people. More specifically, I'm looking for: only the page title (and perhaps the page ID) of articles that are about people, separated by gender (for the sake of simplicity, male and…
vvye
  • 1,208
  • 1
  • 10
  • 25
0
votes
0 answers

Query entity by label

From Wikidata Query Service I want to query the entity ethanol (i.e. Q153). I can simply do this by querying for the CAS using the following SPARQL: SELECT ?cas ?casLabel WHERE { ?cas wdt:P231 "64-17-5". SERVICE wikibase:label { bd:serviceParam…
andschar
  • 3,504
  • 2
  • 27
  • 35
0
votes
1 answer

How to get Wikidata ID for an entity of a property ? Is there an API available for python?

The MediaWiki API is able to find ID for an item with the request URL: /w/api.php?action=query&format=json&prop=pageprops&titles=skype&formatversion=2&ppprop=wikibase_item The result is: { "batchcomplete": true, "query": { …
Xue Li
  • 1
0
votes
1 answer

Finding wikidata identifiers (properties & lexemes)

My problem: I'm writing an NLP program in python and I need to get the entity ID for properties and lexemes. So what I basically want is, e.g. if the input is the word/property "father" I want the return value to be "P22" (property number for…
0
votes
1 answer

How to retrieve a list using Wikidata's web API?

I need to simply retrieve this footballers list in JSON format : https://en.wikipedia.org/wiki/List_of_footballers_in_England_by_number_of_league_appearances So i'm trying out this wikidata query ( with the wikidata ID linked to this…
harmonius cool
  • 337
  • 1
  • 2
  • 23
0
votes
1 answer

What is profile in accept heading of wiki api request

For example, when you perform an call from summary api of wikipedia, there is this header in the request accept:application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.3.7" What is the purpose of this particular…
Loredra L
  • 1,485
  • 2
  • 16
  • 32
0
votes
1 answer

How to check if a person exists on Wikipedia?

So I need a function. An example input would be like "donald trump" (I don't want it to be case-sensitive) If an article about the person exists on Wikipedia, function returns a summary and a picture. If not returns false Is this even possible? I…
Saadat
  • 163
  • 4
  • 15
0
votes
0 answers

How to query wikidata by name (fuzzysearch) and third-parties ID

I wish to leverage on wikidata (and learning a bit Sparql if necessary) for entity matching, and want to: query an entity by its name AND by name of a list of properties (both fuzzysearch) => so to be sure in case of disambiguations! (CATS as cats,…
user305883
  • 1,635
  • 2
  • 24
  • 48
0
votes
0 answers

Accuracy of wbsearchentities in wikidata API

I am currently using the MediaWiki API (through SPARQL SERVICE wikidata:mwapi) to query entities from Wikidata, using the wbsearchentities endpoint. However, I have noticed that the search results are not that good (example searching for charlton or…
0
votes
2 answers

How to check if a table sub-field exist in Lua?

I'm trying to use Wikidata's Lua models. I need to search for a specific ID in Wikidata's entities : subjectitemofthisproperty = 'Q' .. tostring( entity['claims']['P1629'][1]["mainsnak"]["datavalue"]["value"]["numeric-id"] ) The main problem is…
Xiiryo
  • 3,021
  • 5
  • 31
  • 48
0
votes
1 answer

Get categories from Wikipedia:Vital articles

I'm trying to get a "category tree" from wikipedia for a project I'm working on. The problem is I only want more common topics and fields of study, so the larger dumps I've been able to find have way too many peripheral articles included. I recently…
M.K.
  • 3
  • 2
0
votes
1 answer

How to get description of an entity/search query from Wikidata API

I want to get description of a search query using Wikidata API. I have found that setting parameter action to wbsearchentities give description of all strings that matches the entity.Can anyone tell me how to get more description about any selected…
0
votes
1 answer

How to read data response from Wikidata API?

I am making a ReactJS application to show information about people when they search for it. I am trying to use MediaWiki to get the information about a person from Wikipedia. I am making an API call and the response is very weird. I am getting this…
EdG
  • 2,243
  • 6
  • 48
  • 103
1 2 3
10
11