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.
相关问题
- Getting search results from wikidata website, but
- Find which direct property applied in a SPARQL que
- How to represent this statement in RDF?
- SPARQL: How to obtain label in available languages
- How to query Wikidata for “also known as”
相关文章
- Training times for Spacy Entity Linking model
- Wikidata entity value from name
- sparql query on wikidata
- Get WikiData Identifier for city by GPS location
- Wikidata+SPARQL: lookup a company based on it'
- SPARQL Speed up federated query
- How to get Wikidata labels by ID using SPARQL?
- How to get only the most recent value from a Wikid
Maybe you can use sparql, to run a query:
You can use in python using pywikibot:
If you are familiar with Python you could do it programmatically with the Wikidata api, using Pywikibot The following python script, obtains the wikidata entities. If you want the data objects for each individual wikidata entity, you need to uncomment the last two lines
which results in
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.), the search engine (Google Web Search), the verb (to google) and even a Wikipedia disambiguation page.
After you somehow decide which entity to access, use
wbgetentities
to actually get the information you want:https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q95&languages=en
Or, if you can't decide which entity to use, you could get information for all of them at the same time:
https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q95|Q9366|Q961680|Q1156923&languages=en