0

I'm a little stuck on if a SPARQL query is possible for what I want to do:

I get that

?human wdt:P31 wd:Q5

would give me all items that are an instance of human.

Is there a similar way to find all items that are an instance of a place (e.g., town, city, country, river, continent, museum, building, etc.)?

logi-kal
  • 7,107
  • 6
  • 31
  • 43

1 Answers1

1

The trick will likely be to find Wikidata class which is a good proxy for what you consider "place". The statement

  ?item wdt:P31/wdt:P279* wd:Q618123 .

will give you all the instances of "geographical objects" and its subclasses which might be a good starting point to explore.

Tom Morris
  • 10,490
  • 32
  • 53
  • Thanks Tom! Unfortunately, I seem to be timing out with this. (Server error: Unexpected end of JSON input). Any clever ways to get around this limitation? – Registered User Jan 08 '21 at 23:40