Hi Ricardo,

To answer your questions, 

1. I would use the following query to get the info you need.

SELECT ?item ?itemLabel
 ?item wdt:P31 wd:Q6256 ;
       rdfs:label "Portugal"@en .
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

2. There are a few ways to SPARQL most used properties, but the size of the graph will definitely time out. You may want to start with the Wikidata Property Explorer.

best regards,


Darnelle O. Melvin

Special Collections and Archives Metadata Librarian

Assistant Professor
University Libraries
University of Nevada, Las Vegas

Office: 702-895-2146

Twitter  ORCID

On Thu, Dec 16, 2021 at 11:37 AM Federico Leva (Nemo) <nemowiki@gmail.com> wrote:
Forwarding to the list a question sent to -owners.


-------- Messaggio Inoltrato --------
Oggetto: Using wikidata to extract aditional information about entities
Data: Thu, 16 Dec 2021 10:33:49 +0000
Mittente: Ricardo Pinto

Good afternoon!

My name is Ricardo Pinto, I am currently doing my thesis, and I am trying
to make calls to Wikidata. I am presently using SPARQLWrapper in python to
make the calls, but I am having trouble with some things that I hope you
can help me with.

1. How can I get the entity identifier? Given an entity (e.g. Portugal) I
need to get its identifier (e.g., Q45). Currently, I am doing this
by searching on google, but I need this to be systematic. Can you help me?
2. While searching for entities related to another entity, I need to make
calls using properties. Is there a way to know what the most used
properties are? I need a systematic way to choose properties to search. Can
you help me?

Best regards,
Ricardo Pinto.
Wikidata mailing list -- wikidata@lists.wikimedia.org
To unsubscribe send an email to wikidata-leave@lists.wikimedia.org