US House of Representatives Members API

Members of Congress

OpenAPI Specification

us-house-of-representatives-members-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Congress.gov Bills Members API
  description: The Congress.gov API provides programmatic access to congressional data from the Library of Congress. It is a REST API offering machine-readable data covering bills, amendments, congressional records, committees, members, nominations, treaties, and other collections. An API key is required for access. Version 3 is the current stable release.
  version: v3
  contact:
    url: https://www.loc.gov/apis/additional-apis/congress-dot-gov-api/
  license:
    name: US Government Work
    url: https://www.usa.gov/government-works
servers:
- url: https://api.congress.gov/v3
  description: Congress.gov API v3 Production Server
security:
- ApiKeyQuery: []
tags:
- name: Members
  description: Members of Congress
paths:
  /member:
    get:
      operationId: listMembers
      summary: List Members of Congress
      description: Returns a paginated list of all members of Congress.
      tags:
      - Members
      parameters:
      - $ref: '#/components/parameters/apiKeyParam'
      - $ref: '#/components/parameters/formatParam'
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      - name: currentMember
        in: query
        description: Filter for current members only
        required: false
        schema:
          type: boolean
      - name: fromDateTime
        in: query
        description: Start date filter for member updates
        required: false
        schema:
          type: string
          format: date-time
      - name: toDateTime
        in: query
        description: End date filter for member updates
        required: false
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: A paginated list of members
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberListResponse'
  /member/{bioguideId}:
    get:
      operationId: getMember
      summary: Get Member Details
      description: Returns detailed information for a specific member of Congress.
      tags:
      - Members
      parameters:
      - name: bioguideId
        in: path
        description: The Bioguide ID of the member
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiKeyParam'
      - $ref: '#/components/parameters/formatParam'
      responses:
        '200':
          description: Detailed member information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberDetailResponse'
        '404':
          description: Member not found
  /member/congress/{congress}:
    get:
      operationId: listMembersByCongress
      summary: List Members by Congress
      description: Returns members of a specific Congress.
      tags:
      - Members
      parameters:
      - $ref: '#/components/parameters/congressParam'
      - $ref: '#/components/parameters/apiKeyParam'
      - $ref: '#/components/parameters/formatParam'
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      - name: currentMember
        in: query
        description: Filter for current members only
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Members of the specified Congress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberListResponse'
  /member/{bioguideId}/sponsored-legislation:
    get:
      operationId: getMemberSponsoredLegislation
      summary: Get Member Sponsored Legislation
      description: Returns legislation sponsored by a specific member of Congress.
      tags:
      - Members
      parameters:
      - name: bioguideId
        in: path
        description: The Bioguide ID of the member
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiKeyParam'
      - $ref: '#/components/parameters/formatParam'
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      responses:
        '200':
          description: Legislation sponsored by the member
          content:
            application/json:
              schema:
                type: object
  /member/{bioguideId}/cosponsored-legislation:
    get:
      operationId: getMemberCosponsoredLegislation
      summary: Get Member Cosponsored Legislation
      description: Returns legislation cosponsored by a specific member of Congress.
      tags:
      - Members
      parameters:
      - name: bioguideId
        in: path
        description: The Bioguide ID of the member
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/apiKeyParam'
      - $ref: '#/components/parameters/formatParam'
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      responses:
        '200':
          description: Legislation cosponsored by the member
          content:
            application/json:
              schema:
                type: object
components:
  schemas:
    MemberDetailResponse:
      type: object
      properties:
        member:
          type: object
          properties:
            bioguideId:
              type: string
            name:
              type: string
            firstName:
              type: string
            lastName:
              type: string
            state:
              type: string
            party:
              type: string
            birthYear:
              type: string
            deathYear:
              type: string
              nullable: true
            currentMember:
              type: boolean
            terms:
              type: array
              items:
                type: object
                properties:
                  congress:
                    type: integer
                  chamber:
                    type: string
                  memberType:
                    type: string
                  startYear:
                    type: string
                  endYear:
                    type: string
                  stateCode:
                    type: string
                  stateName:
                    type: string
                  district:
                    type: integer
            officeAddress:
              type: string
            phoneNumber:
              type: string
            officialWebsiteUrl:
              type: string
            sponsoredLegislation:
              type: object
            cosponsoredLegislation:
              type: object
        request:
          $ref: '#/components/schemas/RequestInfo'
    MemberListResponse:
      type: object
      properties:
        members:
          type: array
          items:
            $ref: '#/components/schemas/MemberSummary'
        pagination:
          $ref: '#/components/schemas/Pagination'
        request:
          $ref: '#/components/schemas/RequestInfo'
    MemberSummary:
      type: object
      properties:
        bioguideId:
          type: string
          description: Bioguide ID uniquely identifying the member
        name:
          type: string
          description: Full name of the member
        state:
          type: string
          description: State represented
        party:
          type: string
          description: Party affiliation
        chamber:
          type: string
          description: Current chamber (House or Senate)
        district:
          type: integer
          nullable: true
          description: Congressional district (House members only)
        updateDate:
          type: string
          format: date-time
        url:
          type: string
    RequestInfo:
      type: object
      properties:
        billNumber:
          type: string
        billType:
          type: string
        congress:
          type: string
        contentType:
          type: string
        format:
          type: string
    Pagination:
      type: object
      properties:
        count:
          type: integer
          description: Total number of records matching the query
        next:
          type: string
          description: URL for the next page of results
        prev:
          type: string
          description: URL for the previous page of results
  parameters:
    congressParam:
      name: congress
      in: path
      description: The Congress number (e.g., 118 for the 118th Congress)
      required: true
      schema:
        type: integer
        minimum: 1
    limitParam:
      name: limit
      in: query
      description: Number of results to return per request (max 250)
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 20
    formatParam:
      name: format
      in: query
      description: Response format
      required: false
      schema:
        type: string
        enum:
        - json
        - xml
        default: json
    offsetParam:
      name: offset
      in: query
      description: Starting record number for pagination
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
    apiKeyParam:
      name: api_key
      in: query
      description: API key for authentication
      required: false
      schema:
        type: string
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: API key required for all requests. Register at https://api.congress.gov/sign-up to obtain a key.