sparql

Execute SPARQL 1.1 queries against the UK Parliament DDP graph.

1|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/danbri/forgetmenot --skill sparql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparql
Source: https://github.com/danbri/forgetmenot/tree/main/skills/sparql
Command: npx skills add https://github.com/danbri/forgetmenot --skill sparql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the challenge of querying complex, interconnected parliamentary data—such as linking people, procedures, and statutory instruments—which are otherwise siloed across multiple REST APIs.

Core Features & Use Cases

  • Cross-Domain Joins: Perform complex queries that join data across people, parties, government positions, and procedural steps using a single SPARQL endpoint.
  • Schema Discovery: Explore the parl: ontology, including class hierarchies and instance counts, to understand the structure of the DDP graph.
  • Use Case: Identify all ministers who held a specific government position and were simultaneously members of a select committee during a specific parliamentary period.

Quick Start

Use the sparql skill to query the parliament endpoint for a list of all current members and their associated political parties.

Frequently Asked Questions about sparql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query the UK Parliament's linked data API for members and parties?

You can query the UK Parliament linked data API by executing SPARQL 1.1 queries against the api.parliament.uk/sparql endpoint to retrieve current members and their political parties. The skill handles read-only access to retrieve this interconnected data.

What is the best way to join parliamentary procedures and legislation data?

The best way to join parliamentary procedures and legislation data is using SPARQL to query the Parliament DDP graph. It facilitates complex cross-domain analysis by joining disparate parliamentary entities through shared URIs and identifier bridges.

Can I use SPARQL to find ministers who were also on select committees?

Yes, you can use SPARQL to identify all ministers who held a specific government position and were simultaneously members of a select committee during a specific parliamentary period by joining data across people, parties, and procedures.

How do I explore the Parliament ontology to understand available data classes?

You can explore the parl: ontology to discover class hierarchies and instance counts, which helps you understand the structure of the DDP graph before querying the Parliament endpoint for specific linked data.

Do I need to know the parl: schema to query the Parliament graph?

Yes, you need to adhere to the parl: schema when querying the Parliament DDP graph. Understanding the schema allows you to correctly join disparate parliamentary entities through shared URIs and identifier bridges.

Why use a SPARQL endpoint instead of multiple REST APIs for parliamentary data?

You use a SPARQL endpoint to solve the problem of siloed parliamentary data. It allows you to perform complex cross-domain queries joining people, parties, government positions, and procedural steps using a single endpoint instead of multiple REST APIs.