congress-dot-gov - v0.4.3
    Preparing search index...

    Class BillClient

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    apiKey: string
    baseUrl: string
    endpoint: string

    Methods

    • Returns detailed information for a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill. Value can be hr, s, hjres, sjres, hconres, sconres, hres, or sres.

      • billNumber: string

        The bill number

      • params: { format?: Format } = {}

        {BaseParams} - Accepts format parameter (json or xml)

      Returns Promise<
          {
              bill: {
                  actions: { count: number; url: string };
                  amendments: { count: number; url: string };
                  cboCostEstimates: {
                      description: string;
                      pubDate: string;
                      title: string;
                      url: string;
                  }[];
                  committeeReports?: { citation: string; url: string }[];
                  committees: { count: number; url: string };
                  congress: number;
                  constitutionalAuthorityStatementText: string;
                  cosponsors: {
                      count: number;
                      countIncludingWithdrawnCosponsors: number;
                      url: string;
                  };
                  introducedDate: string;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  laws?: { number: string; type: LawType }[];
                  notes?: string;
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  policyArea: { name: string };
                  relatedBills: { count: number; url: string };
                  sponsors: {
                      bioguideId: string;
                      district: number;
                      firstName: string;
                      fullName: string;
                      isByRequest: "Y" | "N";
                      lastName: string;
                      middleName?: string;
                      party: PartyCode;
                      state?:
                          | ALABAMA
                          | ALASKA
                          | ARIZONA
                          | ARKANSAS
                          | CALIFORNIA
                          | COLORADO
                          | CONNECTICUT
                          | DELAWARE
                          | DISTRICT_OF_COLUMBIA
                          | FLORIDA
                          | GEORGIA
                          | HAWAII
                          | IDAHO
                          | ILLINOIS
                          | INDIANA
                          | IOWA
                          | KANSAS
                          | KENTUCKY
                          | LOUISIANA
                          | MAINE
                          | MARYLAND
                          | MASSACHUSETTS
                          | MICHIGAN
                          | MINNESOTA
                          | MISSISSIPPI
                          | MISSOURI
                          | MONTANA
                          | NEBRASKA
                          | NEVADA
                          | NEW_HAMPSHIRE
                          | NEW_JERSEY
                          | NEW_MEXICO
                          | NEW_YORK
                          | NORTH_CAROLINA
                          | NORTH_DAKOTA
                          | OHIO
                          | OKLAHOMA
                          | OREGON
                          | PENNSYLVANIA
                          | RHODE_ISLAND
                          | SOUTH_CAROLINA
                          | SOUTH_DAKOTA
                          | TENNESSEE
                          | TEXAS
                          | UTAH
                          | VERMONT
                          | VIRGINIA
                          | WASHINGTON
                          | WEST_VIRGINIA
                          | WISCONSIN
                          | WYOMING;
                      url: string;
                  }[];
                  subjects: { count: number; url: string };
                  summaries: { count: number; url: string };
                  textVersions: { count: number; url: string };
                  title: string;
                  titles: { count: number; url: string };
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
              };
          } & { rateLimit: RateLimitInfo },
      >

      Detailed information for a specified bill.

    • Returns the list of actions on a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              actions: {
                  actionCode?: string;
                  actionDate: string;
                  actionTime?: string;
                  committees?: { name: string; systemCode: string; url: string }[];
                  recordedVotes?: {
                      chamber: Chamber;
                      congress: number;
                      date: string;
                      rollNumber: number;
                      sessionNumber: 1 | 2;
                      url: string;
                  }[];
                  sourceSystem: { code?: 0
                  | 2
                  | 1
                  | 9; name: SourceSystemName };
                  text: string;
                  type: BillActionType;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of actions on the specified bill

    • Returns the list of amendments to a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              amendments: {
                  congress: number;
                  description: string;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  number: string;
                  purpose?: string;
                  type: AmendmentType;
                  updateDate: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of amendments to the specified bill

    • Returns the list of committees associated with a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              committees: {
                  activities: {
                      date: string;
                      name: | REFERRED_TO
                      | RE_REFERRED_TO
                      | HEARINGS_BY
                      | MARKUP_BY
                      | REPORTED_BY
                      | REPORTED_ORIGINAL_MEASURE
                      | COMMITTED_TO
                      | RE_COMMITTED_TO
                      | LEGISLATIVE_INTEREST
                      | DISCHARGED_FROM
                      | REFERRED_TO_CAPITALIZED;
                  }[];
                  chamber: Chamber;
                  name: string;
                  subcommittees?: {
                      activities: { date: string; name: string }[];
                      name: string;
                      systemCode: string;
                      url: string;
                  }[];
                  systemCode: string;
                  type: CommitteeType;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of committees associated with the specified bill

    • Returns the list of cosponsors on a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              cosponsors: {
                  bioguideId: string;
                  district: number;
                  firstName: string;
                  fullName: string;
                  isOriginalCosponsor: boolean;
                  lastName: string;
                  middleName?: string;
                  party: PartyCode;
                  sponsorshipDate: string;
                  state?: | ALABAMA
                  | ALASKA
                  | ARIZONA
                  | ARKANSAS
                  | CALIFORNIA
                  | COLORADO
                  | CONNECTICUT
                  | DELAWARE
                  | DISTRICT_OF_COLUMBIA
                  | FLORIDA
                  | GEORGIA
                  | HAWAII
                  | IDAHO
                  | ILLINOIS
                  | INDIANA
                  | IOWA
                  | KANSAS
                  | KENTUCKY
                  | LOUISIANA
                  | MAINE
                  | MARYLAND
                  | MASSACHUSETTS
                  | MICHIGAN
                  | MINNESOTA
                  | MISSISSIPPI
                  | MISSOURI
                  | MONTANA
                  | NEBRASKA
                  | NEVADA
                  | NEW_HAMPSHIRE
                  | NEW_JERSEY
                  | NEW_MEXICO
                  | NEW_YORK
                  | NORTH_CAROLINA
                  | NORTH_DAKOTA
                  | OHIO
                  | OKLAHOMA
                  | OREGON
                  | PENNSYLVANIA
                  | RHODE_ISLAND
                  | SOUTH_CAROLINA
                  | SOUTH_DAKOTA
                  | TENNESSEE
                  | TEXAS
                  | UTAH
                  | VERMONT
                  | VIRGINIA
                  | WASHINGTON
                  | WEST_VIRGINIA
                  | WISCONSIN
                  | WYOMING;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of cosponsors on the specified bill

    • Returns a list of bills sorted by date of latest action.

      Parameters

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              bills: {
                  congress: number;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  title: string;
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      A list of bills sorted by date of latest action

    • Returns a list of bills filtered by the specified congress, sorted by date of latest action.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              bills: {
                  congress: number;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  title: string;
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      Returns a list of bills filtered by the specified congress, sorted by date of latest action.

    • Returns a list of bills filtered by the specified congress and bill type, sorted by date of latest action.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill. Value can be hr, s, hjres, sjres, hconres, sconres, hres, or sres.

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams & DateFilterParams & SortParams} - Accepts pagination, date range filter, sort, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              bills: {
                  congress: number;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  title: string;
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of bills filtered by the specified congress and bill type, sorted by date of latest action.

    • Returns the list of legislative subjects on a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams = {}

        {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              subjects: {
                  legislativeSubjects: { name: string; updateDate: string }[];
                  policyArea: { name: string; updateDate?: string };
              };
          } & { rateLimit: RateLimitInfo },
      >

      List of legislative subjects on the specified bill

    • Returns the list of summaries for a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              summaries: {
                  actionDate: string;
                  actionDesc: string;
                  text: string;
                  updateDate: string;
                  versionCode: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of summaries for the specified bill

    • Returns the list of text versions for a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              textVersions: {
                  date: null
                  | string;
                  formats: { type: string; url: string }[];
                  type: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of text versions for the specified bill

    • Returns the list of titles for a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams = {}

        {PaginationParams & DateFilterParams} - Accepts pagination, date range filter, and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              titles: {
                  billTextVersionCode?: string;
                  billTextVersionName?: string;
                  chamberCode?: HOUSE
                  | SENATE;
                  chamberName?: HOUSE | SENATE | JOINT | NO_CHAMBER;
                  title: string;
                  titleType: string;
                  titleTypeCode: number;
                  updateDate: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of titles for the specified bill

    • Returns a law filtered by specified congress, law type, and law number.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • lawType: LawTypeParam

        The type of law (public or private)

      • lawNumber: string

        The law number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          {
              bill: {
                  actions: { count: number; url: string };
                  committeeReports?: { citation: string; url: string }[];
                  committees: { count: number; url: string };
                  congress: number;
                  constitutionalAuthorityStatementText: string;
                  introducedDate: string;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  laws?: { number: string; type: LawType }[];
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  policyArea: { name: string };
                  relatedBills: { count: number; url: string };
                  sponsors: {
                      bioguideId: string;
                      district: number;
                      firstName: string;
                      fullName: string;
                      isByRequest: "Y" | "N";
                      lastName: string;
                      middleName?: string;
                      party: PartyCode;
                      state?:
                          | ALABAMA
                          | ALASKA
                          | ARIZONA
                          | ARKANSAS
                          | CALIFORNIA
                          | COLORADO
                          | CONNECTICUT
                          | DELAWARE
                          | DISTRICT_OF_COLUMBIA
                          | FLORIDA
                          | GEORGIA
                          | HAWAII
                          | IDAHO
                          | ILLINOIS
                          | INDIANA
                          | IOWA
                          | KANSAS
                          | KENTUCKY
                          | LOUISIANA
                          | MAINE
                          | MARYLAND
                          | MASSACHUSETTS
                          | MICHIGAN
                          | MINNESOTA
                          | MISSISSIPPI
                          | MISSOURI
                          | MONTANA
                          | NEBRASKA
                          | NEVADA
                          | NEW_HAMPSHIRE
                          | NEW_JERSEY
                          | NEW_MEXICO
                          | NEW_YORK
                          | NORTH_CAROLINA
                          | NORTH_DAKOTA
                          | OHIO
                          | OKLAHOMA
                          | OREGON
                          | PENNSYLVANIA
                          | RHODE_ISLAND
                          | SOUTH_CAROLINA
                          | SOUTH_DAKOTA
                          | TENNESSEE
                          | TEXAS
                          | UTAH
                          | VERMONT
                          | VIRGINIA
                          | WASHINGTON
                          | WEST_VIRGINIA
                          | WISCONSIN
                          | WYOMING;
                      url: string;
                  }[];
                  subjects: { count: number; url: string };
                  summaries: { count: number; url: string };
                  textVersions: { count: number; url: string };
                  title: string;
                  titles: { count: number; url: string };
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
              };
          } & { rateLimit: RateLimitInfo },
      >

      The specified law

    • Returns a list of laws filtered by the specified congress.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              bills: {
                  actions: { count: number; url: string };
                  committeeReports?: { citation: string; url: string }[];
                  committees: { count: number; url: string };
                  congress: number;
                  constitutionalAuthorityStatementText: string;
                  introducedDate: string;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  laws?: { number: string; type: LawType }[];
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  policyArea: { name: string };
                  relatedBills: { count: number; url: string };
                  sponsors: {
                      bioguideId: string;
                      district: number;
                      firstName: string;
                      fullName: string;
                      isByRequest: "Y" | "N";
                      lastName: string;
                      middleName?: string;
                      party: PartyCode;
                      state?:
                          | ALABAMA
                          | ALASKA
                          | ARIZONA
                          | ARKANSAS
                          | CALIFORNIA
                          | COLORADO
                          | CONNECTICUT
                          | DELAWARE
                          | DISTRICT_OF_COLUMBIA
                          | FLORIDA
                          | GEORGIA
                          | HAWAII
                          | IDAHO
                          | ILLINOIS
                          | INDIANA
                          | IOWA
                          | KANSAS
                          | KENTUCKY
                          | LOUISIANA
                          | MAINE
                          | MARYLAND
                          | MASSACHUSETTS
                          | MICHIGAN
                          | MINNESOTA
                          | MISSISSIPPI
                          | MISSOURI
                          | MONTANA
                          | NEBRASKA
                          | NEVADA
                          | NEW_HAMPSHIRE
                          | NEW_JERSEY
                          | NEW_MEXICO
                          | NEW_YORK
                          | NORTH_CAROLINA
                          | NORTH_DAKOTA
                          | OHIO
                          | OKLAHOMA
                          | OREGON
                          | PENNSYLVANIA
                          | RHODE_ISLAND
                          | SOUTH_CAROLINA
                          | SOUTH_DAKOTA
                          | TENNESSEE
                          | TEXAS
                          | UTAH
                          | VERMONT
                          | VIRGINIA
                          | WASHINGTON
                          | WEST_VIRGINIA
                          | WISCONSIN
                          | WYOMING;
                      url: string;
                  }[];
                  subjects: { count: number; url: string };
                  summaries: { count: number; url: string };
                  textVersions: { count: number; url: string };
                  title: string;
                  titles: { count: number; url: string };
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of laws for the specified congress

    • Returns a list of laws filtered by specified congress and law type.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • lawType: LawTypeParam

        The type of law (public or private)

      • params: { format?: Format; limit?: number; offset?: number } & DateFilterParams & SortParams = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              bills: {
                  actions: { count: number; url: string };
                  committeeReports?: { citation: string; url: string }[];
                  committees: { count: number; url: string };
                  congress: number;
                  constitutionalAuthorityStatementText: string;
                  introducedDate: string;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  laws?: { number: string; type: LawType }[];
                  number: string;
                  originChamber: Chamber;
                  originChamberCode: ChamberCode;
                  policyArea: { name: string };
                  relatedBills: { count: number; url: string };
                  sponsors: {
                      bioguideId: string;
                      district: number;
                      firstName: string;
                      fullName: string;
                      isByRequest: "Y" | "N";
                      lastName: string;
                      middleName?: string;
                      party: PartyCode;
                      state?:
                          | ALABAMA
                          | ALASKA
                          | ARIZONA
                          | ARKANSAS
                          | CALIFORNIA
                          | COLORADO
                          | CONNECTICUT
                          | DELAWARE
                          | DISTRICT_OF_COLUMBIA
                          | FLORIDA
                          | GEORGIA
                          | HAWAII
                          | IDAHO
                          | ILLINOIS
                          | INDIANA
                          | IOWA
                          | KANSAS
                          | KENTUCKY
                          | LOUISIANA
                          | MAINE
                          | MARYLAND
                          | MASSACHUSETTS
                          | MICHIGAN
                          | MINNESOTA
                          | MISSISSIPPI
                          | MISSOURI
                          | MONTANA
                          | NEBRASKA
                          | NEVADA
                          | NEW_HAMPSHIRE
                          | NEW_JERSEY
                          | NEW_MEXICO
                          | NEW_YORK
                          | NORTH_CAROLINA
                          | NORTH_DAKOTA
                          | OHIO
                          | OKLAHOMA
                          | OREGON
                          | PENNSYLVANIA
                          | RHODE_ISLAND
                          | SOUTH_CAROLINA
                          | SOUTH_DAKOTA
                          | TENNESSEE
                          | TEXAS
                          | UTAH
                          | VERMONT
                          | VIRGINIA
                          | WASHINGTON
                          | WEST_VIRGINIA
                          | WISCONSIN
                          | WYOMING;
                      url: string;
                  }[];
                  subjects: { count: number; url: string };
                  summaries: { count: number; url: string };
                  textVersions: { count: number; url: string };
                  title: string;
                  titles: { count: number; url: string };
                  type: BillType;
                  updateDate: string;
                  updateDateIncludingText: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of laws for the specified congress and law type

    • Returns the list of related bills to a specified bill.

      Parameters

      • congress: number

        The Congress number (e.g., 117)

      • billType: BillType

        The type of bill

      • billNumber: string

        The bill number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Accepts pagination and format parameters

      Returns Promise<
          BasePaginatedResponse & {
              relatedBills: {
                  congress: number;
                  latestAction: { actionDate: string; actionTime?: string; text: string };
                  number: number;
                  relationshipDetails: { identifiedBy: IdentifiedBy; type: string }[];
                  title: string;
                  type: BillType;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      List of related bills to the specified bill