Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

congress-legislators

> 编程语言
Open source

Members of the United States Congress, 1789-Present, in YAML/JSON/CSV, as well as committees, presidents, and vice presidents.

2.4K stars0 likes0 views
WebsiteGitHub

About

Members of the United States Congress, 1789-Present, in YAML/JSON/CSV, as well as committees, presidents, and vice presidents.

congress-legislators

Members of the United States Congress (1789-Present), congressional committees (1973-Present), committee membership (current only), and presidents and vice presidents of the United States in YAML, JSON, and CSV format. Overview

This project provides the following data files:

File Download Description legislators-current YAML JSON CSV Currently serving Members of Congress. legislators-historical YAML JSON CSV Historical Members of Congress (i.e. all Members of Congress except those in the current file). legislators-social-media YAML JSON Current social media accounts for Members of Congress. Official accounts only (no campaign or personal accounts). committees-current YAML JSON Current committees of the Congress, with subcommittees. committee-membership-current YAML JSON CSV Current committee/subcommittee assignments. committees-historical YAML JSON Current and historical committees of the Congress, with subcommittees, from the 93rd Congress (1973) and on. legislators-district-offices YAML JSON CSV District offices for current Members of Congress. executive YAML JSON Presidents and vice presidents.

The data formats are documented below.

The files are maintained in YAML format in the main branch of this project. YAML is a serialization format similar in structure to JSON but typically written with one field per line. Like JSON, it allows for nested structure. Each level of nesting is indicated by indentation or a dash. CSV and JSON formatted files are also provided in the gh-pages branch --- they're linked above.

This database is maintained through a combination of manual edits by volunteers (from GovTrack, ProPublica, MapLight, FiveThirtyEight, and others) and automated imports from a variety of sources including:

  • GovTrack.us (http://www.govtrack.us).
  • The Congressional Biographical Directory (http://bioguide.congress.gov).
  • Congressional Committees, Historical Standing Committees data set by Garrison Nelson and Charles Stewart (http://web.mit.edu/17.251/www/data_page.html).
  • Martis’s “The Historical Atlas of Political Parties in the United States Congress”, via Rosenthal, Howard L., and Keith T. Poole. United States Congressional Roll Call Voting Records, 1789-1990 (http://voteview.com/dwnl.htm).
  • The Sunlight Labs Congress API (http://sunlightlabs.github.com/congress/).
  • The Library of Congress's THOMAS website (http://thomas.loc.gov).
  • C-SPAN's Congressional Chronicle (http://www.c-spanvideo.org/congress)

Data Format Documentation

Legislators file structure overview

legislators-current.yaml and legislators-historical.yaml contain biographical information on all Members of Congress that have ever served in Congress, that is, since 1789, as well as cross-walks into other databases.

Each legislator record is grouped into four guaranteed parts: id's which relate the record to other databases, name information (first, last, etc.), biographical information (birthday, gender), and terms served in Congress. A typical record looks something like this:

- id:
	bioguide: R000570
	thomas: '01560'
	govtrack: 400351
	opensecrets: N00004357
	votesmart: 26344
	fec:
	  - H8WI01024
	cspan: 57970
	wikipedia: Paul Ryan
	ballotpedia: Paul Ryan
	maplight: 445
	house_history: 20785
	icpsr: 29939
  name:
	first: Paul
	middle: D.
	last: Ryan
  bio:
	birthday: '1970-01-29'
	gender: M
  terms:
  ...
  - type: rep
	start: '2011-01-03'
	end: '2013-01-03'
  ...
  - type: rep
	start: '2013-01-03'
	end: '2015-01-03'
	state: WI
	party: Republican
	district: 1
	url: http://paulryan.house.gov
	address: 1233 Longworth HOB; Washington DC 20515-4901
	phone: 202-225-3031
	fax: 202-225-3393
	contact_form: http://www.house.gov/ryan/email.htm
	office: 1233 Longworth House Office Building

Terms correspond to elections and are listed in chronological order. If a legislator is currently serving, the current term information will always be the last one. To check if a legislator is currently serving, check that the end date on the last term is in the future.

The split between legislators-current.yaml and legislators-historical.yaml is somewhat arbitrary because these files may not be updated immediately when a legislator leaves office. If it matters to you, just load both files.

A separate file legislators-social-media.yaml stores social media account information. Its structure is similar but includes different fields.

Data Dictionary

The following fields are available in legislators-current.yaml and legislators-historical.yaml:

  • id

    • bioguide: The alphanumeric ID for this legislator in http://bioguide.congress.gov. Note that at one time some legislators (women who had changed their name when they got married) had two entries on the bioguide website. Only one bioguide ID is included here. This is the best field to use as a primary key.
    • thomas: The numeric ID for this legislator on http://thomas.gov and http://beta.congress.gov. The ID is stored as a string with leading zeros preserved.
    • lis: The alphanumeric ID for this legislator found in Senate roll call votes (http://www.senate.gov/pagelayout/legislative/a_three_sections_with_teasers/votes.htm).
    • fec: A list of IDs for this legislator in Federal Election Commission data. In the CSV format, the fec_ids column is comma-separated.
    • govtrack: The numeric ID for this legislator on GovTrack.us (stored as an integer).
    • opensecrets: The alphanumeric ID for this legislator on OpenSecrets.org.
    • votesmart: The numeric ID for this legislator on VoteSmart.org (stored as an integer).
    • icpsr: The numeric ID for this legislator in Keith Poole's VoteView.com website, originally based on an ID system by the Interuniversity Consortium for Political and Social Research (stored as an integer).
    • cspan: The numeric ID for this legislator on C-SPAN's video website, e.g. http://www.c-spanvideo.org/person/1745 (stored as an integer).
    • wikipedia: The Wikipedia page name for the person (spaces are given as spaces, not underscores).
    • ballotpedia: The ballotpedia.org page name for the person (spaces are given as spaces, not underscores).
    • maplight : The numeric ID for this legislator on maplight.org (stored as an integer).
    • house_history: The numeric ID for this legislator on http://history.house.gov/People/Search/. The ID is present only for members who have served in the U.S. House.
    • bioguide_previous: When bioguide.congress.gov mistakenly listed a legislator under multiple IDs, this field is a list of alternative IDs. (This often ocurred for women who changed their name.) The IDs in this list probably were removed from bioguide.congress.gov but might still be in use in the wild.
    • pictorial: The numeric ID for this legislator on https://pictorial.gpo.gov/member-search/ (stored as an integer).
  • name

    • first: The legislator's recognizable first name. Many people go by a different name than their legal first name, often their legal middle name, and our approach is to ensure that our first + last name fields combine to a recognizable name of the legislator. Normally we'll follow the name as it appears on House.gov or Senate.gov (and bioguide.congress.gov), which follows the legislator's own preference for how they want to be named in official places. However, in some cases the legislator goes by a first name that is merely a common short or informal form of their legal first name (e.g. Chris vs Christopher), and while they may prefer the informal name, we may use their longer legal first name because they would be recognizable by their legal name. If they sign official documents (e.g. letters to agencies, FEC filings) using their longer legal first name, we would use their legal first name and put their preferred shorter name in the nickname field. When legislators go by a first initial and middle name, we set the first name field to the initial (one character plus a period).
    • middle: The legislator's middle name or middle initial (with period). It is not recommended to display this field, unless the first name field is an initial (one character plus a period).
    • last: The legislator's legal last name. Some names include non-ASCII characters. When building search systems, it is advised to index both the raw value as well as a value with extended characters replaced with their ASCII equivalents (in Python that's: u"".join(c for c in unicodedata.normalize('NFKD', lastname) if not unicodedata.combining(c))).
    • suffix: A suffix on the legislator's name, such as "Jr." or "III", but only if they use it in official contexts, such as if it appears on House.gov or Senate.gov.
    • nickname: The legislator's nick name when used as a common alternative to their first name. Usually displayed within quotes after the first name. If they are generally only known by a nickname, we would likely place the name in the first name field instead (see above).
    • official_full: The full name of the legislator according to the House or Senate (usually first, middle initial, nickname, last, and suffix). Present for those serving on 2012-10-30 and later.
  • other_names, when present, lists other names the legislator has gone by officially. This is helpful in cases where a legislator's legal name has changed. These listings will only include the name attributes which differ from the current name, and a start or end date where applicable. Where multiple names exist, other names are listed chronologically by end date. An excerpted example:

    • id: bioguide: B001228 thomas: '01465' govtrack: 400039 opensecrets: N00007068 name: first: Mary middle: Whitaker last: Bono Mack other_names:
      • last: Bono end: '2007-12-17' ...
  • bio

    • birthday: The legislator's birthday, in YYYY-MM-DD format.
    • gender: The legislator's gender, either "M" or "F". (In historical data, we've worked backwards from history.house.gov's Women in Congress feature.)
  • terms (one entry for each election)

    • ty

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •GovTrack.us (http://www.govtrack.us).
  • •The Congressional Biographical Directory (http://bioguide.congress.gov).
  • •Congressional Committees, Historical Standing Committees data set by Garrison Nelson and Charles Stewart (http://web.mit.edu/17.251/www/data_page.html).
  • •The Sunlight Labs Congress API (http://sunlightlabs.github.com/congress/).
  • •The Library of Congress's THOMAS website (http://thomas.loc.gov).
  • •C-SPAN's Congressional Chronicle (http://www.c-spanvideo.org/congress)
  • •H8WI01024
  • •type: rep
  • •type: rep
  • •thomas: The numeric ID for this legislator on http://thomas.gov and http://beta.congress.gov. The ID is stored as a string with leading zeros preserved.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言