Wikidata SPARQL
live ResearchDataFull SPARQL access to Wikidata Query Service (~100M items, 1.5B statements). Complements the wikidata pack (entity search).
Tools
query Run a SPARQL query against the Wikidata Query Service. Returns JSON bindings by default.
No parameters required.
Try it
current_officeholder Who currently holds a political office / leadership position for a place — answers "who is the current mayor of London", "who is the prime minister of Japan", "president of France", "governor of Calif
No parameters required.
Try it
instances_of Convenience: list all items that are an instance of a Wikidata class.
No parameters required.
Try it
subclasses_of Return all subclasses of a Wikidata class via transitive P279 (subclass-of) traversal; takes a Wikidata entity id (e.g. Q11424) and returns labelled subclass items up to the specified limit.
No parameters required.
Try it
properties_of Convenience: all statements (property → value) about an entity.
No parameters required.
Try it
entities_at Geo-spatial query: items near a point. Use instance_of to filter by class.
No parameters required.
Try it
Test with curl
The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.
curl -X POST https://gateway.pipeworx.io/wikidata-sparql/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' curl -X POST https://gateway.pipeworx.io/wikidata-sparql/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"query","arguments":{}}}' Use with the SDK
Install @pipeworx/sdk to call tools from any TypeScript/Node project.
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("query", {}); // Or ask in plain English:
const answer = await px.ask("full sparql access to wikidata query service (~100m items, 1");