wikidata-api

How to get list of statements for a given Wikidata ID?

拜拜、爱过 提交于 2019-12-05 09:29:42
The only thing I managed to do is this link: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q568&format=jsonfm But this produces lots of useless data. What I need is to get all the statements for the given item, but I can't see any of the statements in the query above. here it will be: { "instance of" : "chemical element", "element symbol" : "Li", "atomic number" : 3, "oxidation state" : 1, "subclass of" : ["chemical element", "alkali metal"] // etc... } Is there an API for this or must I scrape the web page? The information you want is in your query, except it's hard to decode.

Retrieving the Interlanguage links from an exported Wikipedia article?

别来无恙 提交于 2019-12-05 00:25:08
问题 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 Ore Mountains has no language links anymore in the export. The language links are now on Q4198. How can I export the language links? 回答1: You are now encouraged to use the Wikidata aPI : http://wikidata.org/w/api.php For your case, use props

How to get all links and their Wikidata IDs for a Wikipedia page?

纵饮孤独 提交于 2019-12-04 15:12:47
(When) will the following be possible? get the list of all links on a Wikipedia page with their respective Wikidata IDs in a single query/API call. receive additional information of the respective Wikidata items like a property value with the query. To get all Wikipedia page links you have to use Wikipedia API , and to get all Wikidata item properties you need Wikidata API , so it is not possible to create one query with two requests to both APIs. But! The first part of your question is already possible. And about the second... you didn't say anything for this what information you need from

How to get a list of all films on Wikidata?

让人想犯罪 __ 提交于 2019-12-04 13:58:01
I was using Freebase to get all movies/films there for my website, but it's getting shut down soon. so I was searching for another free database for movies and came across Wikidata. To be honest it's too complicated to understand how to query all the movies. So I thought you guys could help me to get all the movies in Wikidata. In the future I want to include TV shows and series as well. Programming language doesn't matter, I want to use web query with a link. you can look for all the entities that are an instance of film, which in Wikidata is translated as: P31 (instance of) -> Q11424 (film)

How to get Wikidata labels by ID using SPARQL?

99封情书 提交于 2019-12-04 07:42:01
How can I get the labels in English or any other language in Wikidata by ID using SPARQL endpoint? Suppose wd:Q146190 is your wikidata entity ID get the label in a specific language of your specific entity ID: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX wd: <http://www.wikidata.org/entity/> SELECT * WHERE { wd:Q146190 rdfs:label ?label . FILTER (langMatches( lang(?label), "EN" ) ) } LIMIT 1 live example in english live example in german get all the labels in any language of your specific entity ID: SELECT * WHERE { wd:Q146190 rdfs:label ?label } here the link to the live try

Wikidata entity value from name

ぃ、小莉子 提交于 2019-12-03 15:18:14
问题 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 easy way to determine the entity value. 回答1: If you want to do this using the API, you would first use wbsearchentities to find out which entity do you want. For example: https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Google

Retrieving the Interlanguage links from an exported Wikipedia article?

懵懂的女人 提交于 2019-12-03 14:12:48
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 Ore Mountains has no language links anymore in the export. The language links are now on Q4198 . How can I export the language links? You are now encouraged to use the Wikidata aPI : http://wikidata.org/w/api.php For your case, use props=labels . This url is self explicative : http://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki

Wikidata entity value from name

五迷三道 提交于 2019-12-03 05:53:03
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 easy way to determine the entity value. If you want to do this using the API, you would first use wbsearchentities to find out which entity do you want. For example: https://www.wikidata.org/w/api.php?action=wbsearchentities&search=Google&language=en The problem with this is that there are multiple entities called "Google": the company (Google Inc.),

How to get all properties for only a specific category in Wikidata?

ⅰ亾dé卋堺 提交于 2019-12-01 11:24:46
Is there an rdf data/other format that allow me to get all the properties that can exist in a category e.g. Person, then I should be returned properties like sex, date of birth How to query this information at https://query.wikidata.org/ ? What i want is this https://www.wikidata.org/wiki/Wikidata:List_of_properties/Summary_table But is there a better format for this ? I want to access programmatically UPDATE This query is too heavy, causes timeout. SELECT ?p ?attName WHERE { ?q wdt:P31 wd:Q5. ?q ?p ?statement. ?realAtt wikibase:claim ?p. ?realAtt rdfs:label ?attName. FILTER(((LANG(?attName))

How to get all properties for only a specific category in Wikidata?

你说的曾经没有我的故事 提交于 2019-12-01 08:24:04
问题 Is there an rdf data/other format that allow me to get all the properties that can exist in a category e.g. Person, then I should be returned properties like sex, date of birth How to query this information at https://query.wikidata.org/ ? What i want is this https://www.wikidata.org/wiki/Wikidata:List_of_properties/Summary_table But is there a better format for this ? I want to access programmatically UPDATE This query is too heavy, causes timeout. SELECT ?p ?attName WHERE { ?q wdt:P31 wd:Q5