Help:Contributing/query

From Wikibase
Revision as of 10:03, 19 August 2026 by SeedBot (talk | contribs) (docs: migrate contribution guide §9 (querying) from docs/contribution-guide.md (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Languages: English · français · Esperanto


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