LobbyView API
We provide a public REST API so that researchers can easily query from a huge dataset.
API Usage Counter
0 users
0 requests
Available API Endpoints
The detailed documentation about each endpoints, parameters, and examples of the LobbyView REST API is available at : https://rest-api.lobbyview.org
The list of operators that can be used in the parameters are here.
Please use your token to access the REST API. Add a HTTP header to each request using token as the key and token below as the value.
(It is automatically applied in the below example.)
Your Token
The limit of requests of each user is 100 requests per 24 hours.
The limit of rows of each request is 100 rows.
A user is able to get maximum 10,000 rows per 24 hours.
If the number of result rows of the query is more than 100, you won't be able to get all the results in a single query.
In this case, please use the page parameter.
(e.g. https://rest-api.lobbyview.org/api/legislators?page=2 will retrieve the next 100 rows.)
The total number of pages of a query can be found inside each response.
Legislators Example
Bills Example
Clients Example
Reports Example
Texts Example
Information about John McCain.
Base URL
Combined URL
Python Example
Try the code in your Python interpreter
import http.client
import json

connection = http.client.HTTPSConnection('rest-api.lobbyview.org')
headers = {
  'token': 'Please login to use LobbyView's REST API!'
connection.request('GET', '/api/legislators?legislator_first_name=eq.John&legislator_last_name=eq.McCain', None, headers)

response = connection.getresponse()
data_string = response.read().decode('utf-8')
data = json.loads(data_string)