Skip to main content

Legislator

One row per person who has ever served in Congress. Bioguide ID is the canonical primary key used across all unitedstates/* datasets.

GraphQL type: Legislator · Connection: LegislatorsConnection

Queries

QueryReturnsDescription
allLegislators(filter, orderBy, first, last, before, after)LegislatorsConnectionPaginated list with filtering and ordering
legislatorByBioguideId(bioguideId: String!)LegislatorLook up by primary key
legislatorByThomasId(thomasId: String!)LegislatorLook up by unique thomasId
legislatorByLisId(lisId: String!)LegislatorLook up by unique lisId
legislatorByGovtrackId(govtrackId: Int!)LegislatorLook up by unique govtrackId

Fields

FieldGraphQL TypeNotes
bioguideIdStringCanonical legislator identifier from the Congressional Biographical Directory. Use this as the stable cross-system key. PK
thomasIdStringunique
lisIdStringUsed in Senate roll call XML to identify members. Essential for matching Senate vote records. unique
govtrackIdIntunique
opensecretsIdString
votesmartIdInt
icpsrIdInt
cspanIdInt
firstNameStringrequired
middleNameString
lastNameStringrequired
nameSuffixString
nicknameString
officialFullString
birthdayDate
genderStringOne of: M, F
createdAtDatetime
updatedAtDatetime

Relationships

Has many

FieldReturnsVia
legislatorTermsByBioguideIdLegislatorTermsConnectionbioguideId
billsBySponsorBioguideIdBillsConnectionsponsorBioguideId
votePositionsByBioguideIdVotePositionsConnectionbioguideId
billCosponsorsByBioguideIdBillCosponsorsConnectionbioguideId
committeeMembershipsByBioguideIdCommitteeMembershipsConnectionbioguideId

Example

{
allLegislators(
filter: { lastName: { equalTo: "Warren" } }
orderBy: LAST_NAME_ASC
first: 5
) {
nodes {
bioguideId
officialFull
birthday
gender
}
}
}