Wikibase Registry is now Wikibase World. Learn more on the project talk page.

User:Kghbln/queries

From Wikibase World
< User:Kghbln
Revision as of 12:41, 13 September 2023 by Kghbln (talk | contribs) (chg)
Jump to navigation Jump to search

Wikibase instances that are hosted independently.

query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>

SELECT ?item ?itemLabel ?url
WHERE {
  ?item wdt:P2 wd:Q5.
  ?item wdt:P1 ?url .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
query result

tinyurl.com - short URL / wikibase.world/query/ - long URL

Wikibase instances that are hosted independently and are online.

query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>

SELECT ?item ?itemLabel ?url
WHERE {
  ?item wdt:P2 wd:Q5.
  ?item wdt:P1 ?url .
  ?item wdt:P13 wd:Q54.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
query result

tinyurl.com - short URL / wikibase.world/query/ - long URL

Wikibase instances that are hosted independently and are online. Explicitly show the status.

query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>

SELECT ?item ?itemLabel ?url ?online
WHERE {
  ?item wdt:P2 wd:Q5.
  ?item wdt:P1 ?url .
  ?item wdt:P13 ?online.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
query result

tinyurl.com - short URL / wikibase.world/query/ - long URL