- Introduction
- Initialization
- Members
- Office Expenses
- Privately Funded Travel
- Bills
- Votes
- Personal Explanations
- Get Recent Personal Explanations
- Get Recent Personal Explanation Votes
- Get Recent Personal Explanation Votes by Category
- Get Recent Personal Explanations by a Specific Member
- Get Recent Personal Explanation Votes by a Specific Member
- Get Recent Personal Explanation Votes by a Specific Member by Category
- Congressional Statements
- Congressional Committee Statements
- Committees
- Official Communications
A wrapper for the ProPublica Congress API
Unit tests and TypeScript implementation in progress. Anticipated completion by November 2020.
const propublicaAPI = new PropublicaAPI(apiKey)
// optionally, pass congress and chamber to set as global defaults
const propublicaAPI = new PropublicaAPI(apiKey, {
congress: 114,
chamber: "house"
})
Obtain a ProPublica API key here
Wrapper around the Members ProPublica API. More details can be found here.
https://api.propublica.org/congress/v1/{congress}/{chamber}/members.json
congress: 102-116 for House, 80-116 for Senate chamber: house
or senate
const response = await propublicaAPI.Members
.congress(116)
.chamber("house")
.fetch()
// filter by democrats
const response = await propublicaAPI.Members
.congress(116)
.chamber("house")
.democrat()
.fetch()
// filter by republicans
const response = await propublicaAPI.Members
.congress(116)
.chamber("house")
.republican()
.fetch()
// filter by state
const response = await propublicaAPI.Members
.congress(116)
.chamber("house")
.state("CA")
.fetch()
https://api.propublica.org/congress/v1/members/{id}.json
id: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request.
const id = "K000388"
const response = await propublicaAPI.Members
.show(id)
.fetch()
`
https://api.propublica.org/congress/v1/members/new.json
const response = await propublicaAPI.Members
.new()
.fetch()
chamber: house
or senate
state: Two-letter state abbreviation district: House of Representatives district number (House requests only)
https://api.propublica.org/congress/v1/members/{chamber}/{state}/current.json
const state = "RI"
const chamber = "senate"
const response = await propublicaAPI.Members
.chamber(chamber)
.state(state)
.fetch()
https://api.propublica.org/congress/v1/members/{chamber}/{state}/{district}/current.json
const district = 48
const response = await propublicaAPI.Members
.chamber("house")
.state("CA")
.district(district)
.fetch()
https://api.propublica.org/congress/v1/{congress}/{chamber}/members/leaving.json
congress: 111-116 chamber: house
or senate
const chamber = "house"
const response = await propublicaAPI.Members
.congress(115)
.chamber(chamber)
.leaving()
.fetch()
id: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request.
https://api.propublica.org/congress/v1/members/{id}/votes.json
const id = "K000388"
const response = await propublicaAPI.Members
.votes(id)
.fetch()
firstMemberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. secondMemberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 102-116 for House, 101-116 for Senate chamber: house
or senate
https://api.propublica.org/congress/v1/members/{firstMemberID}/votes/{secondMemberID}/{congress}/{chamber}.json
const firstMemberID = "G000575"
const secondMemberID = "D000624"
const response = await propublicaAPI.Members
.congress(114)
.chamber("house")
.compareVotes(firstMemberID, secondMemberID)
.fetch()
firstMemberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. secondMemberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 102-116 for House, 101-116 for Senate chamber: house
or senate
https://api.propublica.org/congress/v1/members/{firstMemberID}/bills/{secondMemberID}/{congress}/{chamber}.json
const firstMemberID = "B001283"
const secondMemberID = "C001101"
const response = await propublicaAPI.Members
.congress(114)
.chamber("house")
.compareSponsorships(firstMemberID, secondMemberID)
.fetch()
id: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. type: cosponsored
or withdrawn
https://api.propublica.org/congress/v1/members/{id}/bills/{type}.json
const id = "K000388"
const type = "cosponsored"
const response = await propublicaAPI.Members
.cosponsored(id, type)
.fetch()
Wrapper around the Office Expenses ProPublica API. More details can be found here.
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. year: 2009-2019 quarter: 1, 2, 3, 4
https://api.propublica.org/congress/v1/members/{memberID}/office_expenses/{year}/{quarter}.json
const memberID = "A000374"
const year = 2017
const quarter = 4
const response = await propublicaAPI.Members.OfficeExpenses
.member(memberID)
.year(year)
.quarter(quarter)
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. category: travel
or personnel
or rent-utilities
or other-services
or supplies
or franked-mail
or printing
or equipment
or total
https://api.propublica.org/congress/v1/members/{memberID}/office_expenses/category/{category}.json
const memberID = "A000374"
const category = "travel"
const response = await propublicaAPI.Members.OfficeExpenses
.member(memberID)
.category(category)
.fetch()
category: travel
or personnel
or rent-utilities
or other-services
or supplies
or franked-mail
or printing
or equipment
or total
year: 2009-2019 quarter: 1, 2, 3, 4 offset: The API returns the first 20 results ordered by amount descending and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/office_expenses/category/{category}/{year}/{quarter}.json
const category = "travel"
const year = 2017
const quarter = 4
const offset = 40
const response = await propublicaAPI.Members.OfficeExpenses
.category(category)
.year(2017)
.quarter(4)
.offset(offset)
.fetch()
Wrapper around the Privately Funded Travel ProPublica API. More details can be found here
congress: 110-116
https://api.propublica.org/congress/v1/{congress}/private-trips.json
const congress = 116
const offset = 20
const response = await propublicaAPI.Members.Travel
.congress(congress)
.offset(20)
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request.
https://api.propublica.org/congress/v1/members/{memberID}/private-trips.json
const memberID = "W000797"
const response = await propublicaAPI.Members.Travel
.member(memberID)
.fetch()
Wrapper around the Bills ProPublica API. More details can be found here
query: keyword or phrase sort: _score
or date
(default is date
) dir: asc
or desc
(default) is desc
offset: You can paginate through bills using the offset
querystring parameter that accepts multiples of 20.
https://api.propublica.org/congress/v1/bills/search.json?query={query}
const query = "megahertz"
const response = await propublicaAPI.Bills
.search(query)
.fetch()
type: The order of the results depends on the value of type
and all results are sorted in descending order: introduced
, updated
, active
, passed
, enacted
or vetoed
congress: 105-116 chamber: house
, senate
or both
offset: You can paginate through bills using the offset
querystring parameter that accepts multiples of 20.
https://api.propublica.org/congress/v1/{congress}/{chamber}/bills/{type}.json
const congress = 115
const chamber = "house"
const type = "introduced"
const offset = 40
const response = await propublicaAPI.Bills
.congress(congress)
.chamber(chamber)
.type(type)
.offset(offset)
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. type: The order of the results depends on the value of type
and all results are sorted in descending order: introduced
, updated
, active
, passed
, enacted
or vetoed
https://api.propublica.org/congress/v1/members/{memberID}/bills/{type}.json
const memberID = "L000287"
const type = "introduced"
const response = await propublicaAPI.Bills
.member(memberID)
.type(type)
.fetch()
subject: A slug version of a legislative subject, displayed as url_name
in subject responses.
https://api.propublica.org/congress/v1/bills/subjects/{subject}.json
const subject = "meat"
const response = await propublicaAPI.Bills
.subject(subject)
.fetch()
chamber: house
or senate
https://api.propublica.org/congress/v1/bills/upcoming/{chamber}.json
const chamber = "senate"
const response = await propublicaAPI.Bills
.chamber(chamber)
.fetch()
congress: 105-116 billID: a bill slug, for example hr4881
- these can be found in the recent bill response.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}.json
const congress = 116
const billID = "hr502"
const response = await propublicaAPI.Bills
.congress(congress)
.show(billID)
.fetch()
congress: 105-116 billID: a bill slug, for example hr4881
- these can be found in the recent bill response.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}/amendments.json
const congress = 115
const billID = "hr502"
const response = await propublicaAPI.Bills
.congress(congress)
.bill(billID)
.amendments()
.fetch()
congress: 105-116 billID: a bill slug, for example hr4881
- these can be found in the recent bill response.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}/subjects.json
const congress = 114
const billID = "hr502"
const response = await propublicaAPI.Bills.Subjects
.congress(congress)
.bill(billID)
.fetch()
congress: 105-116 billID: a bill slug, for example hr4881
- these can be found in the recent bill response.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}/related.json
const congress = 114
const billID = "hr502"
const response = await propublicaAPI.Bills
.congress(congress)
.bill(billID)
.related()
.fetch()
query: a word or phrase to search
https://api.propublica.org/congress/v1/bills/subjects/search.json
const query = "climate"
const response = await propublicaAPI.Bills.Subjects
.search(query)
.fetch()
congress: 105-116 billID: a bill slug, for example hr4881
- these can be found in the recent bill response.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}/cosponsors.json
const congress = 115
const billID = "hr4249"
const response = await propublicaAPI.Bills
.congress(congress)
.bill(billID)
.cosponsors()
.fetch()
Wrapper around the Votes ProPublica API. More details can be found here
chamber: house
, senate
or both
offset: You can paginate through bills using the offset
querystring parameter that accepts multiples of 20.
https://api.propublica.org/congress/v1/{chamber}/votes/recent.json
const chamber = "house"
const response = await propublicaAPI.Votes
.chamber(chamber)
.offset(40)
.fetch()
congress: 102-116 for House, 80-116 for Senate chamber: house
or senate
sessionNumber: 1
or 2
, depending on year (1 is odd-numbered years, 2 is even-numbered years) rollCallNumber: integer
https://api.propublica.org/congress/v1/{congress}/{chamber}/sessions/{sessionNumber}/votes/{rollCallNumber}.json
const congress = 115
const chamber = "house"
const sessionNumber = 2
const rollCallNumber = 17
const response = await propublicaAPI.Votes
.congress(congress)
.chamber(chamber)
.sessionNumber(sessionNumber)
.rollCallNumber(rollCallNumber)
.fetch()
congress: 102-116 for House, 80-116 for Senate chamber: house
or senate
type: missed
, party
, loneno
or perfect
https://api.propublica.org/congress/v1/{congress}/{chamber}/votes/{type}.json
const congress = 115
const chamber = "house"
const type = "missed"
const response = await propublicaAPI.Votes
.congress(congress)
.chamber(chamber)
.type(type)
.fetch()
For year and month requests:
chamber: house
, senate
or both
year: YYYY format month: MM format
For date range requests:
chamber: house
, senate
or both
before: YYYY-MM-DD format after: YYYY-MM-DD format
https://api.propublica.org/congress/v1/{chamber}/votes/{date1}/{date2}.json
// year and month requests:
const chamber = "house"
const date1 = "2017"
const date2 = "01"
const response = await propublicaAPI.Votes
.chamber(chamber)
.before(date1)
.after(date2)
.fetch()
// date range requests:
const chamber = "house"
const date1 = "2017-01-03"
const date2 = "2017-01-31"
const response = await propublicaAPI.Votes
.chamber(chamber)
.before(date1)
.after(date2)
.fetch()
congress: 101-116
https://api.propublica.org/congress/v1/{congress}/nominations.json
const congress = 116
const response = await propublicaAPI.Votes
.congress(congress)
.fetch()
Wrapper around the Personal Explanations ProPublica API. More details can be found here
congress: 107-116 offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/explanations.json
const congress = 116
const offset = 40
const response = await propublicaAPI.Votes.PersonalExplanations
.congress(congress)
.offset(40)
.fetch()
congress: 110-116 offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/explanations/votes.json
const congress = 116
const offset = 40
const response = await propublicaAPI.Votes.PersonalExplanations
.congress(congress)
.offset(40)
.votes()
.fetch()
voted-incorrectly: Voted yes or no by mistake official-business: Away on official congressional business ambiguous: No reason given travel-difficulties: Travel delays and issues personal: Personal or family reason claims-voted: Vote made but not recorded medical: Medical issue for lawmaker (not family) weather: Inclement weather memorial: Attending memorial service misunderstanding: Not informed of vote leave-of-absence: Granted leave of absence prior-commitment: Attending to prior commitment election-related: Participating in an election military-service: Military service other: Other
congress: 110-116 category: see parameter list above offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/explanations/votes/{category}.json
const congress = 116
const category = "official-business"
const response = await propublicaAPI.Votes.PersonalExplanations
.congress(congress)
.category(category)
.offset(40)
.votes()
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 110-116 offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}.json
const memberID = "S001193"
const congress = 116
const response = await propublicaAPI.Votes.PersonalExplanations
.member(memberID)
.congress(116)
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 110-116 offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}/votes.json
const memberID = "S001193"
const congress = 116
const response = await propublicaAPI.Votes.PersonalExplanations
.member(memberID)
.congress(116)
.votes()
.fetch()
Categories:
voted-incorrectly: Voted yes or no by mistake official-business: Away on official congressional business ambiguous: No reason given travel-difficulties: Travel delays and issues personal: Personal or family reason claims-voted: Vote made but not recorded medical: Medical issue for lawmaker (not family) weather: Inclement weather memorial: Attending memorial service misunderstanding: Not informed of vote leave-of-absence: Granted leave of absence prior-commitment: Attending to prior commitment election-related: Participating in an election military-service: Military service other: Other
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 110-116 category: see parameter list above offset: The API returns the 20 most recent results in the specified congress and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}/votes.json
const memberID = "S001193"
const congress = 116
const category = "military-service"
const response = await propublicaAPI.Votes.PersonalExplanations
.member(memberID)
.congress(116)
.category(category)
.votes()
.fetch()
Wrapper around the Congressional Statements ProPublica API. More details can be found here.
offset: The API returns the 20 most recent statements published on congressional websites and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/latest.json
const offset = 20
const response = await propublicaAPI.CongressionalStatements
.offset(offset)
.recent()
.fetch()
date: YYYY-MM-DD format offset: The API returns the 20 most recent statements published on congressional websites on a particular date and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/date/{date}.json
const date = "2017-05-08"
const offset = 40
const response = await propublicaAPI.CongressionalStatements
.on(date)
.offset(offset)
.fetch()
term: search term offset: The API returns the 20 most recent statements published on congressional websites on a particular date and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/search.json?query={term}
const term = "AHCA"
const offset = 20
const response = await propublicaAPI.CongressionalStatements
.term(term)
.offset(offset)
.fetch()
https://api.propublica.org/congress/v1/statements/subjects.json
const response = await propublicaAPI.CongressionalStatements
.subjects()
.fetch()
subject: slug version of subject offset: The API returns the 20 most recent results and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/subject/{subject}.json
const subject = "immigration"
const offset = 20
const response = await propublicaAPI.CongressionalStatements
.subject(subject)
.offset(offset)
.fetch()
memberID: The ID of the member to retrieve; it is assigned by the Biographical Directory of the United States Congress or can be retrieved from a member list request. congress: 113-116 offset: The API returns the 20 most recent results and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/members/{memberID}/statements/{congress}.json
const memberID = "C001084"
const congress = 114
const offset = 20
const response = await propublicaAPI.CongressionalStatements
.member(memberID)
.congress(congress)
.offset(offset)
.fetch()
billID: a bill slug, for example s19
- these can be found in bill responses. congress: 113-116 offset: The API returns the 20 most recent results and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/bills/{billID}/statements.json
const billID = "s19"
const congress = 115
const response = await propublicaAPI.CongressionalStatements
.bill(billID)
.congress(congress)
.fetch()
Wrapper around the Congressional Committee Statements ProPublica API. More details can be found here.
offset: The API returns the 20 most recent statements published on congressional websites and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/committees/latest.json
const offset = 20
const response = await propublicaAPI.CommitteeStatements
.offset(offset)
.recent()
.fetch()
date: YYYY-MM-DD format offset: The API returns the 20 most recent statements published on congressional websites and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/committees/date/{date}.json
const date = "2019-07-02"
const response = await propublicaAPI.CommitteeStatements
.on(date)
.fetch()
committeeID: Optional committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations. offset: The API returns the 20 most recent statements published on congressional websites and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/committees/{committeeID}.json
const committeeID = "HSRU"
const response = await propublicaAPI.CommitteeStatements
.committee(committeeID)
.fetch()
term: search term offset: The API returns the 20 most recent statements published on congressional websites and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/statements/committees/search.json?query={term}
const term = "cryptocurrency"
const response = await propublicaAPI.CommitteeStatements
.term(term)
.offset(20)
.fetch()
Wrapper around the Committees ProPublica API. More details can be found here
congress: 110-116 chamber: house
, senate
or joint
https://api.propublica.org/congress/v1/{congress}/{chamber}/committees.json
const congress = 115
const chamber = "house"
const response = await propublicaAPI.Committees
.congress(congress)
.chamber(chamber)
.fetch()
congress: 110-116 chamber: house
, senate
or joint
committeeID: Committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations.
https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}.json
const congress = 115
const chamber = "senate"
const committeeID = "SSAF"
const response = await propublicaAPI.Committees
.congress(congress)
.chamber(chamber)
.show(committeeID)
.fetch()
congress: 114-116 offset: The API returns the first 20 results ordered by date and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/committees/hearings.json
const congress = 116
const response = await propublicaAPI.Committees.Hearings
.congress(congress)
.fetch()
congress: 114-116 chamber: house
or senate
offset: The API returns the first 20 results and supports pagination using an offset
URI parameter set to multiples of 20.
https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/hearings.json
const congress = 116
const chamber = "house"
const committeeID = "HSRU"
const response = await propublicaAPI.Committees.Hearings
.congress(congress)
.chamber(chamber)
.committee(committeeID)
.fetch()
congress: 114-116 chamber: house
or senate
committeeID: Committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations. subcommitteeID: Committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations.
https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/subcommittees/{subcommitteeID}.json
const congress = 116
const chamber = "house"
const committeeID = "HSRU"
const subcommitteeID = "HSAS28"
const response = await propublicaAPI.Committees.Subcommittees
.congress(congress)
.chamber(chamber)
.committee(committeeID)
.subcommittee(subcommitteeID)
.fetch()
congress: 114-116 chamber: house
or senate
committeeID: Committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations. subcommitteeID: Committee abbreviation, for example HSAG
. Use the full committees response to find abbreviations.
https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/subcommittees/{subcommitteeID}.json
const congress = 116
const chamber = "house"
const committeeID = "HSRU"
const subcommitteeID = "HSAS28"
const response = await propublicaAPI.Committees.Subcommittees
.congress(congress)
.chamber(chamber)
.committee(committeeID)
.subcommittee(subcommitteeID)
.fetch()
Wrapper around the Congressional Official Communications ProPublica API. More details can be found here
congress: 114-116 for House, 96-116 for Senate
https://api.propublica.org/congress/v1/{congress}/communications.json
const response = await propublicaAPI.Committees.Communications
.congress("116")
.fetch()
congress: 114-116 for House, 96-116 for Senate category: ec
, pm
, pom
https://api.propublica.org/congress/v1/{congress}/communications/category/{category}.json
const category = "ec"
const response = await propublicaAPI.Committees.Communications
.congress("116")
.category(category)
.fetch()
date: yyyy-mm-dd format
https://api.propublica.org/congress/v1/communications/date/{date}.json
const response = await propublicaAPI.Committees.Communications
.on("2018-03-21")
.category(category)
.fetch()
congress: 114-116 for House, 96-116 for Senate chamber: house
, senate
https://api.propublica.org/congress/v1/{congress}/communications/{chamber}.json
const response = await propublicaAPI.Committees.Communications
.congress(115)
.chamber("house")
.fetch()