Government roll call vote
curl --request GET \
--url https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"congress": 119,
"session": 1,
"rollNumber": 1,
"chamber": "house",
"positions": [
{
"bioguideId": "G000578",
"name": "Matt Gaetz",
"party": "R",
"stateCode": "FL",
"position": "Not Voting",
"personKey": "USGVP01452"
},
{
"bioguideId": "J000288",
"name": "Henry C. \"Hank\" Johnson, Jr.",
"party": "D",
"stateCode": "GA",
"position": "Not Voting",
"personKey": "USGVP00262"
}
],
"available": true,
"found": true
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Macro
Government roll call vote
One roll call by its natural key, including how each member voted. Separate from the bills page to keep large rosters bounded to one selected vote.
GET
/
api
/
v1
/
countries
/
{iso}
/
government
/
votes
/
{congress}
/
{chamber}
/
{session}
/
{roll}
Government roll call vote
curl --request GET \
--url https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/countries/{iso}/government/votes/{congress}/{chamber}/{session}/{roll}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"congress": 119,
"session": 1,
"rollNumber": 1,
"chamber": "house",
"positions": [
{
"bioguideId": "G000578",
"name": "Matt Gaetz",
"party": "R",
"stateCode": "FL",
"position": "Not Voting",
"personKey": "USGVP01452"
},
{
"bioguideId": "J000288",
"name": "Henry C. \"Hank\" Johnson, Jr.",
"party": "D",
"stateCode": "GA",
"position": "Not Voting",
"personKey": "USGVP00262"
}
],
"available": true,
"found": true
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Authorizations
apiKeycognitoIdToken
Astreus API key (pk_live_...), created on the Developers page in the terminal. Also accepted as Authorization: Bearer pk_live_....
Path Parameters
ISO alpha-2 country code.
congress
Chamber code from the source vote reference.
session
roll