Treaties API
parliament · Data
An API exposing details of the treaties laid before Parliament.
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Returns a list of treaties.
Returns a list of treaties.
https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty?Skip=1&Take=1&House=example&Series=example&SearchText=example&DebateScheduled=true&MotionToNotRatify=true&ParliamentaryProcess=example&RecommendedNotRatify=true&GovernmentOrganisationId=1
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty?Skip=1&Take=1&House=example&Series=example&SearchText=example&DebateScheduled=true&MotionToNotRatify=true&ParliamentaryProcess=example&RecommendedNotRatify=true&GovernmentOrganisationId=1"
import requests
params = {
"Skip": "1",
"Take": "1",
"House": "example",
"Series": "example",
"SearchText": "example",
"DebateScheduled": "true",
"MotionToNotRatify": "true",
"ParliamentaryProcess": "example",
"RecommendedNotRatify": "true",
"GovernmentOrganisationId": "1"
}
response = requests.get(
"https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty');
url.searchParams.set('Skip', '1');
url.searchParams.set('Take', '1');
url.searchParams.set('House', 'example');
url.searchParams.set('Series', 'example');
url.searchParams.set('SearchText', 'example');
url.searchParams.set('DebateScheduled', 'true');
url.searchParams.set('MotionToNotRatify', 'true');
url.searchParams.set('ParliamentaryProcess', 'example');
url.searchParams.set('RecommendedNotRatify', 'true');
url.searchParams.set('GovernmentOrganisationId', '1');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty")
q := baseURL.Query()
q.Set("Skip", "1")
q.Set("Take", "1")
q.Set("House", "example")
q.Set("Series", "example")
q.Set("SearchText", "example")
q.Set("DebateScheduled", "true")
q.Set("MotionToNotRatify", "true")
q.Set("ParliamentaryProcess", "example")
q.Set("RecommendedNotRatify", "true")
q.Set("GovernmentOrganisationId", "1")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty")
uri.query = URI.encode_www_form({
"Skip" => "1",
"Take" => "1",
"House" => "example",
"Series" => "example",
"SearchText" => "example",
"DebateScheduled" => "true",
"MotionToNotRatify" => "true",
"ParliamentaryProcess" => "example",
"RecommendedNotRatify" => "true",
"GovernmentOrganisationId" => "1"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/Treaty?" . http_build_query([
"Skip" => "1",
"Take" => "1",
"House" => "example",
"Series" => "example",
"SearchText" => "example",
"DebateScheduled" => "true",
"MotionToNotRatify" => "true",
"ParliamentaryProcess" => "example",
"RecommendedNotRatify" => "true",
"GovernmentOrganisationId" => "1"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Returns all government organisations.
Returns all government organisations.
https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/GovernmentOrganisation";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Returns all series memberships.
Returns all series memberships.
https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/parliament.uk/treaties/v1/api/SeriesMembership";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Treaties API?
Treaties API is a Data API. Developers commonly use data APIs for:
- enriching your app with third-party datasets
- building data pipelines and ETL workflows
- querying and searching large datasets
- powering research, analysis, and reporting tools
- syncing reference data into your own systems
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Treaties API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide