Skip to content

A wrapper for the ProPublica Congress API. Unit tests and TypeScript implementation in progress. Anticipated completion by November 2020.

Notifications You must be signed in to change notification settings

joshbarrow/ProPublica-Congress-API-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Introduction

A wrapper for the ProPublica Congress API

Unit tests and TypeScript implementation in progress. Anticipated completion by November 2020.

Initialization

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

Members

Wrapper around the Members ProPublica API. More details can be found here.

Index

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/members.json

Params:

congress: 102-116 for House, 80-116 for Senate chamber: house or senate

Examples:

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()

Get a Specific Member

URL:

https://api.propublica.org/congress/v1/members/{id}.json

Params:

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.

Example:

const id = "K000388"
const response =  await propublicaAPI.Members
  .show(id)
  .fetch()
`

Get New Members

URL:

https://api.propublica.org/congress/v1/members/new.json

Example:

const response =  await propublicaAPI.Members
  .new()  
  .fetch()

Get Current Members by State and District

Params:

chamber: house or senate state: Two-letter state abbreviation district: House of Representatives district number (House requests only)

URL:

Senate Request:

https://api.propublica.org/congress/v1/members/{chamber}/{state}/current.json

Example:

const state = "RI"
const chamber = "senate"
const response =  await propublicaAPI.Members
  .chamber(chamber)   
  .state(state)  
  .fetch()

House Request:

https://api.propublica.org/congress/v1/members/{chamber}/{state}/{district}/current.json

Example:

const district = 48
const response =  await propublicaAPI.Members
  .chamber("house")   
  .state("CA")
  .district(district)  
  .fetch()

Get Members Leaving Office

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/members/leaving.json

Params:

congress: 111-116 chamber: house or senate

Example:

const chamber =  "house"
const response =  await propublicaAPI.Members
  .congress(115)
  .chamber(chamber)  
  .leaving()  
  .fetch()

Get Specific Member Vote Positions

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{id}/votes.json

Example:

const id = "K000388"
const response =  await propublicaAPI.Members
  .votes(id)
  .fetch()

Compare Two Member Vote Positions

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{firstMemberID}/votes/{secondMemberID}/{congress}/{chamber}.json

Example:

const firstMemberID = "G000575"
const secondMemberID = "D000624"
const response =  await propublicaAPI.Members
  .congress(114)
  .chamber("house")
  .compareVotes(firstMemberID, secondMemberID)
  .fetch()

Compare Member Bill Sponsorships

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{firstMemberID}/bills/{secondMemberID}/{congress}/{chamber}.json

Example:

const firstMemberID = "B001283"
const secondMemberID = "C001101"
const response =  await propublicaAPI.Members
  .congress(114)
  .chamber("house")
  .compareSponsorships(firstMemberID, secondMemberID)
  .fetch()

Get Bills Cosponsored by a Specific Member

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{id}/bills/{type}.json

Example:

const id = "K000388"
const type = "cosponsored"
const response =  await propublicaAPI.Members
  .cosponsored(id, type)
  .fetch()

Office Expenses

Wrapper around the Office Expenses ProPublica API. More details can be found here.

Get Quarterly Office Expenses by a Specific House Member

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{memberID}/office_expenses/{year}/{quarter}.json

Example:

const memberID =  "A000374"
const year = 2017
const quarter = 4
const response =  await propublicaAPI.Members.OfficeExpenses
  .member(memberID)
  .year(year)
  .quarter(quarter)  
  .fetch()

Get Quarterly Office Expenses by Category for a Specific House Member

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{memberID}/office_expenses/category/{category}.json

Example:

const memberID =  "A000374"
const category = "travel"
const response =  await propublicaAPI.Members.OfficeExpenses
  .member(memberID)
  .category(category)  
  .fetch()

Get Quarterly Office Expenses for a Specified Category

Params:

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.

URL:

https://api.propublica.org/congress/v1/office_expenses/category/{category}/{year}/{quarter}.json

Example:

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()

Privately Funded Travel

Wrapper around the Privately Funded Travel ProPublica API. More details can be found here

Get Recent Privately Funded Trips

Params:

congress: 110-116

URL:

https://api.propublica.org/congress/v1/{congress}/private-trips.json

Example:

const congress = 116
const offset = 20
const response =  await propublicaAPI.Members.Travel
  .congress(congress)
  .offset(20)
  .fetch()

Get Recent Privately Funded Trips by a Specific House Member

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{memberID}/private-trips.json

Example:

const memberID = "W000797"
const response =  await propublicaAPI.Members.Travel
  .member(memberID)
  .fetch()

Bills

Wrapper around the Bills ProPublica API. More details can be found here

Search Bills

Params:

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.

URL:

https://api.propublica.org/congress/v1/bills/search.json?query={query}

Example:

const query = "megahertz"
const response =  await propublicaAPI.Bills
  .search(query)
  .fetch()

Get Recent Bills

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/bills/{type}.json

Example:

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()

Get Recent Bills by a Specific Member

Params:

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

URL:

https://api.propublica.org/congress/v1/members/{memberID}/bills/{type}.json

Example:

const memberID = "L000287"
const type = "introduced"
const response =  await propublicaAPI.Bills
  .member(memberID)
  .type(type)
  .fetch()

Get Recent Bills by a Specific Subject

Params:

subject: A slug version of a legislative subject, displayed as url_name in subject responses.

URL:

https://api.propublica.org/congress/v1/bills/subjects/{subject}.json

Example:

const subject = "meat"
const response =  await propublicaAPI.Bills
  .subject(subject)
  .fetch()

Get Upcoming Bills

Params:

chamber: house or senate

URL:

https://api.propublica.org/congress/v1/bills/upcoming/{chamber}.json

Example:

const chamber = "senate"
const response =  await propublicaAPI.Bills
  .chamber(chamber)
  .fetch()

Get Specific Bill

Params:

congress: 105-116 billID: a bill slug, for example hr4881 - these can be found in the recent bill response.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}.json

Example:

const congress = 116
const billID = "hr502"
const response =  await propublicaAPI.Bills
  .congress(congress)
  .show(billID)
  .fetch()

Get Amendments for a Specific Bill

Params:

congress: 105-116 billID: a bill slug, for example hr4881 - these can be found in the recent bill response.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}/amendments.json

Example:

const congress = 115
const billID = "hr502"
const response =  await propublicaAPI.Bills
    .congress(congress)
    .bill(billID)
    .amendments()
    .fetch()

Get Subjects for a Specific Bill

Params:

congress: 105-116 billID: a bill slug, for example hr4881 - these can be found in the recent bill response.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}/subjects.json

Example:

const congress = 114
const billID = "hr502"
const response =  await propublicaAPI.Bills.Subjects
    .congress(congress)
    .bill(billID)
    .fetch()

Get Related Bills for a Specific Bill

Params:

congress: 105-116 billID: a bill slug, for example hr4881 - these can be found in the recent bill response.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}/related.json

Example:

const congress = 114
const billID = "hr502"
const response =  await propublicaAPI.Bills
    .congress(congress)
    .bill(billID)
    .related()
    .fetch()

Get a Specific Bill Subject

Params:

query: a word or phrase to search

URL:

https://api.propublica.org/congress/v1/bills/subjects/search.json

Example:

const query = "climate"
const response =  await propublicaAPI.Bills.Subjects
    .search(query)
    .fetch()

Get Cosponsors for a Specific Bill

Params:

congress: 105-116 billID: a bill slug, for example hr4881 - these can be found in the recent bill response.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}/cosponsors.json

Example:

const congress = 115
const billID = "hr4249"
const response =  await propublicaAPI.Bills
    .congress(congress)
    .bill(billID)
    .cosponsors()
    .fetch()

Votes

Wrapper around the Votes ProPublica API. More details can be found here

Get Recent Votes

Params:

chamber: house, senate or both offset: You can paginate through bills using the offset querystring parameter that accepts multiples of 20.

URL:

https://api.propublica.org/congress/v1/{chamber}/votes/recent.json

Example:

const chamber = "house"
const response =  await propublicaAPI.Votes
  .chamber(chamber)
  .offset(40)
  .fetch()

Get a Specific Roll Call Vote

Params:

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

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/sessions/{sessionNumber}/votes/{rollCallNumber}.json

Example:

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()

Get Votes by Type

Params:

congress: 102-116 for House, 80-116 for Senate chamber: house or senate type: missed, party, loneno or perfect

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/votes/{type}.json

Example:

const congress = 115
const chamber = "house"
const type = "missed"
const response =  await propublicaAPI.Votes
  .congress(congress)
  .chamber(chamber)
  .type(type)
  .fetch()

Get Votes by Date

Params:

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

URL:

https://api.propublica.org/congress/v1/{chamber}/votes/{date1}/{date2}.json

Examples:

// 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()

Get Senate Nomination Votes

Params:

congress: 101-116

URL:

https://api.propublica.org/congress/v1/{congress}/nominations.json

Example:

const congress = 116
const response =  await propublicaAPI.Votes
  .congress(congress)
  .fetch()

Personal Explanations

Wrapper around the Personal Explanations ProPublica API. More details can be found here

Get Recent Personal Explanations

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/explanations.json

Example:

const congress = 116
const offset = 40
const response =  await propublicaAPI.Votes.PersonalExplanations
  .congress(congress)
  .offset(40)
  .fetch()

Get Recent Personal Explanation Votes

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/explanations/votes.json

Example:

const congress = 116
const offset = 40
const response =  await propublicaAPI.Votes.PersonalExplanations
  .congress(congress)
  .offset(40)
  .votes()
  .fetch()

Get Recent Personal Explanation Votes by Category

Params:

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

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.

URL:

https://api.propublica.org/congress/v1/{congress}/explanations/votes/{category}.json

Example:

const congress = 116
const category = "official-business"
const response =  await propublicaAPI.Votes.PersonalExplanations
  .congress(congress)
  .category(category)
  .offset(40)
  .votes()
  .fetch()

Get Recent Personal Explanations by a Specific Member

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}.json

Example:

const memberID = "S001193"
const congress = 116
const response =  await propublicaAPI.Votes.PersonalExplanations
  .member(memberID)
  .congress(116)
  .fetch()

Get Recent Personal Explanation Votes by a Specific Member

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}/votes.json

Example:

const memberID = "S001193"
const congress = 116
const response =  await propublicaAPI.Votes.PersonalExplanations
  .member(memberID)
  .congress(116)
  .votes()
  .fetch()

Get Recent Personal Explanation Votes by a Specific Member by Category

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{memberID}/explanations/{congress}/votes.json

Example:

const memberID = "S001193"
const congress = 116
const category = "military-service"
const response =  await propublicaAPI.Votes.PersonalExplanations
  .member(memberID)
  .congress(116)
  .category(category)
  .votes()
  .fetch()

Congressional Statements

Wrapper around the Congressional Statements ProPublica API. More details can be found here.

Get Recent Congressional Statements

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/latest.json

Example:

const offset = 20
const response =  await propublicaAPI.CongressionalStatements
  .offset(offset)
  .recent()
  .fetch()

Get Congressional Statements by Date

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/date/{date}.json

Example:

const date = "2017-05-08"
const offset = 40
const response =  await propublicaAPI.CongressionalStatements
  .on(date)
  .offset(offset)
  .fetch()

Get Congressional Statements by Search Term

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/search.json?query={term}

Example:

const term = "AHCA"
const offset = 20
const response =  await propublicaAPI.CongressionalStatements
  .term(term)
  .offset(offset)
  .fetch()

Get Statement Subjects

URL:

https://api.propublica.org/congress/v1/statements/subjects.json

Example:

const response =  await propublicaAPI.CongressionalStatements
  .subjects()
  .fetch()

Get Congressional Statements by Subject

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/subject/{subject}.json

Example:

const subject = "immigration"
const offset = 20
const response =  await propublicaAPI.CongressionalStatements
  .subject(subject)
  .offset(offset)
  .fetch()

Get Congressional Statements by Member

Params:

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.

URL:

https://api.propublica.org/congress/v1/members/{memberID}/statements/{congress}.json

Example:

const memberID = "C001084"
const congress = 114
const offset = 20
const response =  await propublicaAPI.CongressionalStatements
  .member(memberID)
  .congress(congress)
  .offset(offset)
  .fetch()

Get Congressional Statements by Bill

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/bills/{billID}/statements.json

Example:

const billID = "s19"
const congress = 115
const response =  await propublicaAPI.CongressionalStatements
  .bill(billID)
  .congress(congress)
  .fetch()

Congressional Committee Statements

Wrapper around the Congressional Committee Statements ProPublica API. More details can be found here.

Get Recent Congressional Committee Statements

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/committees/latest.json

Example:

const offset = 20
const response =  await propublicaAPI.CommitteeStatements
  .offset(offset)
  .recent()
  .fetch()

Get Congressional Committee Statements by Date

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/committees/date/{date}.json

Example:

const date = "2019-07-02"
const response =  await propublicaAPI.CommitteeStatements
  .on(date)
  .fetch()

Get Congressional Committee Statements by Committee

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/committees/{committeeID}.json

Example:

const committeeID = "HSRU"
const response =  await propublicaAPI.CommitteeStatements
  .committee(committeeID)
  .fetch()

Get Congressional Committee Statements by Search Term

Params:

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.

URL:

https://api.propublica.org/congress/v1/statements/committees/search.json?query={term}

Example:

const term = "cryptocurrency"
const response =  await propublicaAPI.CommitteeStatements
  .term(term)
  .offset(20)
  .fetch()

Committees

Wrapper around the Committees ProPublica API. More details can be found here

Lists of Committees

Params:

congress: 110-116 chamber: house, senate or joint

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/committees.json

Example:

const congress = 115
const chamber = "house"
const response =  await propublicaAPI.Committees
  .congress(congress)
  .chamber(chamber)
  .fetch()

Get a Specific Committee

Params:

congress: 110-116 chamber: house, senate or joint committeeID: Committee abbreviation, for example HSAG. Use the full committees response to find abbreviations.

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}.json

Example:

const congress = 115
const chamber = "senate"
const committeeID = "SSAF"
const response =  await propublicaAPI.Committees
  .congress(congress)
  .chamber(chamber)
  .show(committeeID)
  .fetch()

Get Recent Committee Hearings

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/committees/hearings.json

Example:

const congress = 116
const response =  await propublicaAPI.Committees.Hearings
  .congress(congress)
  .fetch()

Get Hearings for a Specific Committee

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/hearings.json

Example:

const congress = 116
const chamber = "house"
const committeeID = "HSRU"
const response =  await propublicaAPI.Committees.Hearings
  .congress(congress)
  .chamber(chamber)
  .committee(committeeID)
  .fetch()

Get a Specific Subcommittee

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/subcommittees/{subcommitteeID}.json

Example:

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()

Get a Specific Subcommittee

Params:

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.

URL:

https://api.propublica.org/congress/v1/{congress}/{chamber}/committees/{committeeID}/subcommittees/{subcommitteeID}.json

Example:

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()

Official Communications

Wrapper around the Congressional Official Communications ProPublica API. More details can be found here

Get Recent Official Communications

Params:

congress: 114-116 for House, 96-116 for Senate

URL:

https://api.propublica.org/congress/v1/{congress}/communications.json

Example:

const response =  await propublicaAPI.Committees.Communications
  .congress("116")
  .fetch()

Get Recent Official Communications by Category

Params:

congress: 114-116 for House, 96-116 for Senate category: ec, pm, pom

URL:

https://api.propublica.org/congress/v1/{congress}/communications/category/{category}.json

Example:

const category = "ec"
const response =  await propublicaAPI.Committees.Communications
  .congress("116")
  .category(category)
  .fetch()

Get Recent Official Communications by Date

Params:

date: yyyy-mm-dd format

URL:

https://api.propublica.org/congress/v1/communications/date/{date}.json

Example:

const response =  await propublicaAPI.Committees.Communications
  .on("2018-03-21")
  .category(category)
  .fetch()

Get Recent Official Communications by Date

Params:

congress: 114-116 for House, 96-116 for Senate chamber: house, senate

URL:

https://api.propublica.org/congress/v1/{congress}/communications/{chamber}.json

Example:

const response =  await propublicaAPI.Committees.Communications
  .congress(115)
  .chamber("house")
  .fetch()

About

A wrapper for the ProPublica Congress API. Unit tests and TypeScript implementation in progress. Anticipated completion by November 2020.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published