Help:Contributing/query
Jump to navigation
Jump to search
This page shows how to query the knowledge base with SPARQL. Start at the Help:Contributing hub if you are new here.
The endpoint
The public SPARQL endpoint is https://wikibase.ronzz.org/sparql.
A first query
All books in the knowledge base:
SELECT ?book ?bookLabel WHERE {
?book wdt:P1 wd:Q9 . # instance of (P1) → book (Q9)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
The wdt: prefix reads the values of a property; wd: names an entity. On this instance, instance of is P1 and book is Q9.
The Wikidata SPARQL tutorial works verbatim on this instance.
See also
- Help:Contributing — the hub
- SPARQL 1.1 specification (official)