Parliament

Commons Votes API

An API that allows querying of Commons Votes data.

Data & analytics#openapi#open-data

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

An API that allows querying of Commons Votes data.

Endpoints 5

Divisions

  • GETReturn a Division/data/division/:divisionId.:formatSingle Division which has the specified Id
  • GETReturn Divisions results grouped by party/data/divisions.:format/groupedbyparty?queryParameters.searchTerm=string&queryParameters.memberId=0&queryParameters.includeWhenMemberWasTeller=true&queryParameters.startDate=2024-01-01T00:00:00Z&queryParameters.endDate=2024-01-01T00:00:00Z&queryParameters.divisionNumber=0Division results which meet the specified criteria grouped by parties
  • GETReturn voting records for a Member/data/divisions.:format/membervoting?queryParameters.memberId=1&queryParameters.skip=0&queryParameters.take=0&queryParameters.searchTerm=string&queryParameters.includeWhenMemberWasTeller=true&queryParameters.startDate=2024-01-01T00:00:00Z&queryParameters.endDate=2024-01-01T00:00:00Z&queryParameters.divisionNumber=0List of voting records for a member which meet the specified criteria.
  • GETReturn a list of Divisions/data/divisions.:format/search?queryParameters.skip=0&queryParameters.take=0&queryParameters.searchTerm=string&queryParameters.memberId=0&queryParameters.includeWhenMemberWasTeller=true&queryParameters.startDate=2024-01-01T00:00:00Z&queryParameters.endDate=2024-01-01T00:00:00Z&queryParameters.divisionNumber=0List of Divisions which meet the specified criteria
  • GETReturn total results count/data/divisions.:format/searchTotalResults?queryParameters.searchTerm=string&queryParameters.memberId=0&queryParameters.includeWhenMemberWasTeller=true&queryParameters.startDate=2024-01-01T00:00:00Z&queryParameters.endDate=2024-01-01T00:00:00Z&queryParameters.divisionNumber=0Total count of Divisions meeting the specified criteria

API details

Base URL
https://commonsvotes-api.parliament.uk
Authentication
None declared in the description
Operations
5 operations on 5 pathsGET 5
Main resources
Divisions 5
Description format
Swagger 2.0, API version v1
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Commons Votes API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Commons Votes API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Return a Division” (GET /data/division/:divisionId.:format), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Commons Votes API?

An API that allows querying of Commons Votes data. It is listed under Data & analytics and has 5 endpoints.

Who publishes the Commons Votes API?

It is listed from Parliament's public API description (an OpenAPI document), not published by Parliament on Swastik Codes. Anyone who controls parliament.uk can claim the profile by adding a DNS TXT record.

What is the base URL of the Commons Votes API?

Requests go to https://commonsvotes-api.parliament.uk. Endpoint paths are added to this base URL.

How do I authenticate with the Commons Votes API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the Commons Votes API have?

5 operations on 5 paths (5 GET). The largest groups are Divisions.

Is forking the Commons Votes API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.