Services¶
Each class below wraps one Congress.gov resource: a get() for the detail endpoint, a search()
for the list endpoint, and (where the API supports it) sub-resource getters like get_actions() or
get_cosponsors(). See REFERENCE.md for the typical get() identifiers per
service, and MEMBERS_QUERY.md for the Members collection's query helpers.
Bill¶
congressgov.services.bill.Bill ¶
Bill(client: 'AuthenticatedClient | None' = None)
Bases: ApiService
Bill service provides API access for fetching Congressional bill data.
This service class handles API interactions for fetching bills from the Congress.gov API. Once a bill is fetched, instance methods on the Bill model (registered in congressgov.services.extensions.bill) provide additional functionality like expanding attributes and fetching related data.
Separation of Concerns: - This service class: Fetches data from API (get, search) - Bill model extensions: Operate on fetched data (expand, get_actions, etc.) - Bills model extensions: Query and filter collections (filter, by_type, etc.)
USAGE EXAMPLES
Basic usage - fetch a bill¶
bill_service = Bill(client=my_client) bill = bill_service.get(congress=118, bill_type="hr", bill_number=1)
Now use extension methods on the bill instance¶
expanded_bill = bill.expand(attributes=['actions', 'cosponsors']) actions = bill.get_actions()
Search for bills¶
bills = bill_service.search(congress=118, bill_type="hr", limit=10)
Use extension methods on Bills collection¶
house_bills = bills.by_type("hr") enacted = bills.enacted()
Initialize Bill service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
Optional API client instance. Can also be provided per-method. |
None
|
Source code in src/congressgov/services/bill.py
104 105 106 107 108 109 110 111 112 | |
get ¶
get(*, client: 'AuthenticatedClient | None' = None, congress: int, bill_type: str, bill_number: int, format_: str | None = None) -> 'BillModel'
Retrieve a single bill's details from the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. If None, will use self.client if available. |
None
|
congress
|
int
|
Congress number (e.g., 118 for 118th Congress). |
required |
bill_type
|
str
|
Bill type (e.g., 'hr', 's', 'hjres', 'sjres'). |
required |
bill_number
|
int
|
Bill number. |
required |
format_
|
str | None
|
Response format (default: json). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Bill |
'BillModel'
|
Parsed Bill model instance from API response with client attached. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If parameters are invalid (includes suggestions) |
APIError
|
If API request fails |
ClientNotFoundError
|
If no client is available |
Example
bill_service = Bill(client=my_client) bill = bill_service.get(congress=118, bill_type="hr", bill_number=1)
Now use extension methods¶
expanded_bill = bill.expand() actions = bill.get_actions()
Source code in src/congressgov/services/bill.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
search ¶
search(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, bill_type: str | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None, from_date_time: str | None = None, to_date_time: str | None = None, sort: str | None = None) -> 'BillsModel'
Search for bills using the universal search system.
This method provides flexible searching across bills with optional filters. It delegates to the universal search system for maintainability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. If None, will use self.client if available. |
None
|
congress
|
int | None
|
Congress number to filter by (e.g., 118 for 118th Congress). |
None
|
bill_type
|
str | None
|
Bill type to filter by. Valid values: - 'hr': House Bill - 's': Senate Bill - 'hjres': House Joint Resolution - 'sjres': Senate Joint Resolution - 'hconres': House Concurrent Resolution - 'sconres': Senate Concurrent Resolution - 'hres': House Simple Resolution - 'sres': Senate Simple Resolution |
None
|
format_
|
str | None
|
Response format (default: json). |
None
|
offset
|
int | None
|
Number of records to skip for pagination. |
None
|
limit
|
int | None
|
Maximum number of records to return (default: 20). |
None
|
from_date_time
|
str | None
|
Return bills updated after this datetime (ISO format). |
None
|
to_date_time
|
str | None
|
Return bills updated before this datetime (ISO format). |
None
|
sort
|
str | None
|
Sort order for results. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Bills |
'BillsModel'
|
Collection of bills matching the search criteria with attached client |
'BillsModel'
|
for extension methods. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If parameters are invalid (includes suggestions) |
APIError
|
If API request fails |
ClientNotFoundError
|
If no client is available |
Example
from congressgov import Bill from congressgov._client import AuthenticatedClient
client = AuthenticatedClient(token="your-api-key") bill_service = Bill(client=client)
Search for House bills from 118th Congress¶
bills = bill_service.search(congress=118, bill_type="hr", limit=50) print(f"Found {len(bills)} House bills")
Use collection extension methods¶
enacted_bills = bills.enacted() by_type = bills.group_by("type")
Search with date filters¶
recent_bills = bill_service.search( ... from_date_time="2023-01-01T00:00:00Z", ... to_date_time="2023-12-31T23:59:59Z", ... limit=100 ... )
Source code in src/congressgov/services/bill.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
search_by_laws ¶
search_by_laws(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, law_type: str | None = None, law_number: int | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None) -> 'BillModel | BillsModel'
Search for laws using the appropriate API endpoint.
This function chooses the correct endpoint based on which arguments are provided: - If congress, law_type, and law_number: fetch a specific law (returns Bill). - If congress and law_type: fetch all laws for that congress and type (returns Bills). - If only congress: fetch all laws for that congress (returns Bills). - If none: raises ValueError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. If None, will use self.client if available. |
None
|
congress
|
int | None
|
Congress number to filter by (optional). |
None
|
law_type
|
str | None
|
Law type to filter by (e.g., 'pub', 'pri') (optional). |
None
|
law_number
|
int | None
|
Law number to filter by (optional). |
None
|
format_
|
str | None
|
Response format (default: json). |
None
|
offset
|
int | None
|
Offset for pagination. |
None
|
limit
|
int | None
|
Limit for pagination. |
None
|
Returns:
| Type | Description |
|---|---|
'BillModel | BillsModel'
|
Bills or Bill: Parsed model from API response. - If searching for a specific law (all three arguments), returns a Bill. - Otherwise, returns Bills (list of bills/laws). |
Example
bill_service = Bill(client=my_client)
Get all public laws from 118th Congress¶
laws = bill_service.search_by_laws(congress=118, law_type="pub")
Get a specific law¶
law = bill_service.search_by_laws(congress=118, law_type="pub", law_number=1)
Source code in src/congressgov/services/bill.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
Amendment¶
congressgov.services.amendment.Amendment ¶
Amendment(client: 'AuthenticatedClient | None' = None)
Bases: ApiService
Amendment service provides API access for fetching Congressional amendment data.
This service class handles API interactions for fetching amendments from the Congress.gov API. Instance methods on the Amendment model (registered in congressgov.services.extensions.amendments) provide additional functionality.
Separation of Concerns: - This service class: Fetches data from API (get, search) - Amendment model extensions: Operate on fetched data (expand, get_actions, etc.) - Amendments model extensions: Query and filter collections (filter, by_type, etc.)
USAGE EXAMPLES
Fetch an amendment¶
amendment_service = Amendment(client=my_client) amendment = amendment_service.get(congress=118, amendment_type="hamdt", amendment_number="1")
Use extension methods¶
expanded = amendment.expand(attributes=['actions', 'cosponsors']) actions = amendment.get_actions()
Search for amendments¶
amendments = amendment_service.search(congress=118, limit=10) house_amdts = amendments.house_amendments()
Initialize Amendment service.
Source code in src/congressgov/services/amendment.py
73 74 75 76 | |
get ¶
get(*, client: 'AuthenticatedClient | None' = None, congress: int, amendment_type: str, amendment_number: str, format_: str | None = None) -> 'AmendmentModel'
Retrieve a single amendment's details from the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. |
None
|
congress
|
int
|
Congress number. |
required |
amendment_type
|
str
|
Amendment type (e.g., 'hamdt', 'samdt'). |
required |
amendment_number
|
str
|
Amendment number. |
required |
format_
|
str | None
|
Response format. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Amendment |
'AmendmentModel'
|
Parsed Amendment model with client attached. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If parameters are invalid (includes suggestions) |
APIError
|
If API request fails |
ClientNotFoundError
|
If no client is available |
Example
amendment_service = Amendment(client=my_client) amendment = amendment_service.get(congress=118, amendment_type="hamdt", amendment_number="1") expanded = amendment.expand()
Source code in src/congressgov/services/amendment.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
search ¶
search(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, amendment_type: str | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None, from_date_time: str | None = None, to_date_time: str | None = None, sort: str | None = None) -> 'AmendmentsModel'
Search for amendments using the universal search system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. |
None
|
congress
|
int | None
|
Congress number (optional). |
None
|
amendment_type
|
str | None
|
Amendment type (optional). |
None
|
format_
|
str | None
|
Response format. |
None
|
offset
|
int | None
|
Offset for pagination. |
None
|
limit
|
int | None
|
Limit for pagination. |
None
|
from_date_time
|
str | None
|
Start date/time filter. |
None
|
to_date_time
|
str | None
|
End date/time filter. |
None
|
sort
|
str | None
|
Sort order. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Amendments |
'AmendmentsModel'
|
Parsed Amendments collection model. |
Example
amendment_service = Amendment(client=my_client) amendments = amendment_service.search(congress=118, limit=50) house_amdts = amendments.house_amendments()
Source code in src/congressgov/services/amendment.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
Member¶
congressgov.services.member.Member ¶
Member(client: 'AuthenticatedClient | None' = None)
Bases: ApiService
Member service provides API access for fetching Congressional member data.
This service class handles API interactions for fetching member information from the Congress.gov API. Once a member is fetched, instance methods on the Member model (registered in congressgov.services.extensions.members) provide additional functionality like expanding attributes and fetching sponsored/cosponsored legislation.
Separation of Concerns: - This service class: Fetches data from API (get, search, get_current_roster) - Member model extensions: Operate on fetched data (get_sponsored_legislation, etc.) - Members model extensions: Query and filter collections (filter, by_state, etc.)
USAGE EXAMPLES
Basic usage - fetch a member¶
member_service = Member(client=my_client) member = member_service.get(bioguide_id="A000374")
Now use extension methods on the member instance¶
expanded = member.expand(attributes=["sponsoredLegislation"]) sponsored = member.get_sponsored_legislation() cosponsored = member.get_cosponsored_legislation()
Search for members¶
members = member_service.search(state="CA", limit=10)
Use extension methods on Members collection¶
democrats = members.democrats() by_state = members.group_by("state")
Get current roster¶
roster = member_service.get_current_roster() house_members = roster['house_members'] senate_members = roster['senate_members']
Initialize Member service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
Optional API client instance. Can also be provided per-method. |
None
|
Source code in src/congressgov/services/member.py
89 90 91 92 93 94 95 96 97 | |
get ¶
get(*, client: 'AuthenticatedClient | None' = None, bioguide_id: str, format_: str | None = None) -> 'MemberModel'
Get detailed information about a specific member from the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. If None, will use self.client if available. |
None
|
bioguide_id
|
str
|
The member's Bioguide ID (e.g., "A000374"). |
required |
format_
|
str | None
|
Response format (default: json). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Member |
'MemberModel'
|
The member details with client attached. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If parameters are invalid (includes suggestions) |
APIError
|
If API request fails |
ClientNotFoundError
|
If no client is available |
Example
member_service = Member(client=my_client) member = member_service.get(bioguide_id="A000374")
Now use extension methods¶
sponsored = member.get_sponsored_legislation()
Source code in src/congressgov/services/member.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
search ¶
search(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, state: str | None = None, district: int | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None, from_date_time: str | None = None, to_date_time: str | None = None, current_member: str | None = None) -> 'MembersModel'
Search for members with optional filters using the universal search system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
'AuthenticatedClient | None'
|
The API client instance. If None, will use self.client if available. |
None
|
congress
|
int | None
|
The Congress number (e.g., 117, 118). Optional. |
None
|
state
|
str | None
|
The state abbreviation (e.g., "CA", "NY"). Optional. |
None
|
district
|
int | None
|
The district number. Optional. |
None
|
format_
|
str | None
|
Response format (default: json). |
None
|
offset
|
int | None
|
Number of records to skip. Optional. |
None
|
limit
|
int | None
|
Maximum number of records to return. Optional. |
None
|
from_date_time
|
str | None
|
Return members updated after this datetime (ISO format). Optional. |
None
|
to_date_time
|
str | None
|
Return members updated before this datetime (ISO format). Optional. |
None
|
current_member
|
str | None
|
Filter for current members ("true" or "false"). Optional. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Members |
'MembersModel'
|
List of members matching the search criteria. |
Example
member_service = Member(client=my_client) members = member_service.search(state="CA", current_member="true")
Now use collection extension methods¶
democrats = members.democrats() by_party = members.group_by("partyName")
Source code in src/congressgov/services/member.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
list_by_congress ¶
list_by_congress(*, client: 'AuthenticatedClient | None' = None, congress: int, format_: str | None = None, offset: int | None = None, limit: int | None = None, current_member: bool | None = None, fetch_all: bool = False) -> 'MembersModel'
List members who served in a specific Congress.
When fetch_all is True, requests pages of up to 250 members until the
API returns a short or empty page. offset is ignored in that mode;
limit sets the per-request page size (default 250).
Source code in src/congressgov/services/member.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | |
get_current_roster ¶
get_current_roster(*, client: Any = None) -> dict[str, MembersModel]
Get the current roster of members, separated by House and Senate.
This method fetches all current members and separates them into House and Senate based on their most recent term.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Any
|
The API client instance. If None, will use self.client if available. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Members]
|
Dictionary with keys 'house_members' and 'senate_members', each containing a Members model with the respective members. |
Example
member_service = Member(client=my_client) roster = member_service.get_current_roster() house = roster['house_members'] # Members object senate = roster['senate_members'] # Members object print(f"House: {len(house)}, Senate: {len(senate)}")
Source code in src/congressgov/services/member.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | |
Committee¶
congressgov.services.committee.Committee ¶
Committee(client: 'AuthenticatedClient | None' = None)
Bases: ApiService
Committee service provides API access for fetching Congressional committee data.
Separation of Concerns: - This service class: Fetches data from API (get, search) - Committee model extensions: Operate on fetched data (expand, get_bills, etc.) - Committees model extensions: Query and filter collections
Source code in src/congressgov/services/committee.py
75 76 77 | |
get ¶
get(*, client: 'AuthenticatedClient | None' = None, chamber: str, committee_code: str, format_: str | None = None) -> 'CommitteeModel'
Get detailed information about a specific committee.
Source code in src/congressgov/services/committee.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
get_by_congress ¶
get_by_congress(*, client: 'AuthenticatedClient | None' = None, congress: int, chamber: str, committee_code: str, format_: str | None = None) -> 'CommitteeModel'
Get committee detail scoped to a specific Congress.
Source code in src/congressgov/services/committee.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
search ¶
search(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, chamber: str | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None) -> 'CommitteesModel'
Search for committees using the universal search system.
Source code in src/congressgov/services/committee.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
CommitteeMeeting¶
congressgov.services.committee_meeting.CommitteeMeeting ¶
CommitteeMeeting(client: AuthenticatedClient | None = None)
Bases: ApiService
CommitteeMeeting service provides API access for committee meeting data.
Source code in src/congressgov/services/committee_meeting.py
33 34 35 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, chamber: str, event_id: str, format_: str = None) -> CommitteeMeetingModel
Get detailed information about a specific committee meeting.
Source code in src/congressgov/services/committee_meeting.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, chamber: str = None, format_: str = None, offset: int = None, limit: int = None) -> CommitteeMeetingsModel
Search for committee meetings using the universal search system.
Source code in src/congressgov/services/committee_meeting.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
CommitteePrint¶
congressgov.services.committee_print.CommitteePrint ¶
CommitteePrint(client: AuthenticatedClient | None = None)
Bases: ApiService
CommitteePrint service provides API access for committee print data.
Source code in src/congressgov/services/committee_print.py
42 43 44 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, jacket_number: int, chamber: str, format_: str = None) -> CommitteePrintModel
Get detailed information about a specific committee print.
Source code in src/congressgov/services/committee_print.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
get_text ¶
get_text(*, client: AuthenticatedClient | None = None, congress: int, chamber: str, jacket_number: int, format_: str = None)
Return text versions for a committee print.
Source code in src/congressgov/services/committee_print.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, format_: str = None, offset: int = None, limit: int = None) -> CommitteePrintsModel
Search for committee prints using the universal search system.
Source code in src/congressgov/services/committee_print.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
CommitteeReport¶
congressgov.services.committee_report.CommitteeReport ¶
CommitteeReport(client: AuthenticatedClient | None = None)
Bases: ApiService
CommitteeReport service provides API access for committee report data.
Source code in src/congressgov/services/committee_report.py
42 43 44 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, report_type: str, report_number: int, format_: str = None) -> CommitteeReportModel
Get detailed information about a specific committee report.
Source code in src/congressgov/services/committee_report.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
get_text ¶
get_text(*, client: AuthenticatedClient | None = None, congress: int, report_type: str, report_number: int, format_: str = None)
Return text versions for a committee report.
Source code in src/congressgov/services/committee_report.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, report_type: str = None, format_: str = None, offset: int = None, limit: int = None) -> CommitteeReportsModel
Search for committee reports using the universal search system.
Source code in src/congressgov/services/committee_report.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
Congress¶
congressgov.services.congress.Congress ¶
Congress(client: AuthenticatedClient | None = None)
Bases: ApiService
Congress service provides API access for Congressional session data.
Source code in src/congressgov/services/congress.py
41 42 43 | |
current ¶
current(*, client: AuthenticatedClient | None = None, format_: str = None) -> CongressModel
Get the current Congress session information.
Source code in src/congressgov/services/congress.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, format_: str = None) -> CongressModel
Get detailed information about a specific Congress session.
Source code in src/congressgov/services/congress.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
search ¶
search(*, client: AuthenticatedClient | None = None, format_: str = None, offset: int = None, limit: int = None) -> CongressesModel
List all Congress sessions.
Source code in src/congressgov/services/congress.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
CongressionalRecord¶
congressgov.services.congressional_record.CongressionalRecord ¶
CongressionalRecord(client: AuthenticatedClient | None = None)
Bases: ApiService
CongressionalRecord service provides API access for congressional record data.
Source code in src/congressgov/services/congressional_record.py
16 17 | |
search ¶
search(*, client: AuthenticatedClient | None = None, year: int = None, month: int = None, day: int = None, format_: str = None, offset: int = None, limit: int = None)
Search for congressional records using the universal search system.
Source code in src/congressgov/services/congressional_record.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
DailyCongressionalRecord¶
congressgov.services.daily_congressional_record.DailyCongressionalRecord ¶
DailyCongressionalRecord(client: AuthenticatedClient | None = None)
Bases: ApiService
Daily Congressional Record API (volume / issue / articles), distinct from bound record search.
Source code in src/congressgov/services/daily_congressional_record.py
47 48 49 | |
search ¶
search(*, client: AuthenticatedClient | None = None, format_: str = None, offset: int = None, limit: int = None) -> DailyCongressionalRecordModel
List daily Congressional Record issues (most recent first).
Source code in src/congressgov/services/daily_congressional_record.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
get_volume ¶
get_volume(*, client: AuthenticatedClient | None = None, volume_number: int, format_: str = None, offset: int = None, limit: int = None) -> DailyCongressionalRecordModel
List daily Congressional Record issues for a volume.
Source code in src/congressgov/services/daily_congressional_record.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
get_issue ¶
get_issue(*, client: AuthenticatedClient | None = None, volume_number: int, issue_number: int, format_: str = None, offset: int = None, limit: int = None) -> DailyCongressionalRecordIssueModel
Get a daily Congressional Record issue by volume and issue number.
Source code in src/congressgov/services/daily_congressional_record.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
get_articles ¶
get_articles(*, client: AuthenticatedClient | None = None, volume_number: int, issue_number: int, format_: str = None, offset: int = None, limit: int = None) -> DailyCongressionalRecordArticlesModel
List articles for a daily Congressional Record issue.
Source code in src/congressgov/services/daily_congressional_record.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
BoundCongressionalRecord¶
congressgov.services.bound_congressional_record.BoundCongressionalRecord ¶
BoundCongressionalRecord(client: AuthenticatedClient | None = None)
Bases: ApiService
BoundCongressionalRecord service provides API access for bound congressional record data.
Source code in src/congressgov/services/bound_congressional_record.py
23 24 | |
search ¶
search(*, client: AuthenticatedClient | None = None, year: int = None, month: int = None, format_: str = None, offset: int = None, limit: int = None)
Search for bound congressional records using the universal search system.
Source code in src/congressgov/services/bound_congressional_record.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
get_by_year ¶
get_by_year(*, client: AuthenticatedClient | None = None, year: int, format_: str = None, offset: int = None, limit: int = None)
List bound congressional records for a year.
Source code in src/congressgov/services/bound_congressional_record.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_by_year_month ¶
get_by_year_month(*, client: AuthenticatedClient | None = None, year: int, month: int, format_: str = None, offset: int = None, limit: int = None)
List bound congressional records for a year and month.
Source code in src/congressgov/services/bound_congressional_record.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
get_by_date ¶
get_by_date(*, client: AuthenticatedClient | None = None, year: int, month: int, day: int, format_: str = None, offset: int = None, limit: int = None)
List bound congressional records for a specific date.
Source code in src/congressgov/services/bound_congressional_record.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
CRSReport¶
congressgov.services.crsreport.CRSReport ¶
CRSReport(client: AuthenticatedClient | None = None)
Bases: ApiService
CRSReport service provides API access for CRS report data.
Source code in src/congressgov/services/crsreport.py
23 24 25 | |
get ¶
get(*, client: AuthenticatedClient | None = None, report_number: str, format_: str = None) -> CRSReportModel
Get detailed information about a specific CRS report.
Source code in src/congressgov/services/crsreport.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
search ¶
search(*, client: AuthenticatedClient | None = None, format_: str = None, offset: int = None, limit: int = None)
Search for CRS reports using the universal search system.
Source code in src/congressgov/services/crsreport.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
Hearing¶
congressgov.services.hearing.Hearing ¶
Hearing(client: AuthenticatedClient | None = None)
Bases: ApiService
Hearing service provides API access for Congressional hearing data.
Source code in src/congressgov/services/hearing.py
26 27 28 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, chamber: str, jacket_number: int, format_: str = None) -> HearingModel
Get detailed information about a specific hearing.
Source code in src/congressgov/services/hearing.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, chamber: str = None, format_: str = None, offset: int = None, limit: int = None) -> HearingsModel
Search for hearings using the universal search system.
Source code in src/congressgov/services/hearing.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
HouseCommunication¶
congressgov.services.house_communication.HouseCommunication ¶
HouseCommunication(client: AuthenticatedClient | None = None)
Bases: ApiService
HouseCommunication service provides API access for House communication data.
Source code in src/congressgov/services/house_communication.py
25 26 27 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, communication_type: str, communication_number: int, format_: str = None) -> HouseCommunicationModel
Get detailed information about a specific House communication.
Source code in src/congressgov/services/house_communication.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, communication_type: str = None, format_: str = None, offset: int = None, limit: int = None) -> HouseCommunicationsModel
Search for House communications using the universal search system.
Source code in src/congressgov/services/house_communication.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
HouseRequirement¶
congressgov.services.house_requirement.HouseRequirement ¶
HouseRequirement(client: AuthenticatedClient | None = None)
Bases: ApiService
HouseRequirement service provides API access for House requirement data.
Source code in src/congressgov/services/house_requirement.py
29 30 31 | |
get ¶
get(*, client: AuthenticatedClient | None = None, requirement_number: int, format_: str = None) -> HouseRequirementModel
Get detailed information about a specific House requirement.
Source code in src/congressgov/services/house_requirement.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
search ¶
search(*, client: AuthenticatedClient | None = None, format_: str = None, offset: int = None, limit: int = None) -> HouseRequirementsModel
Search for House requirements using the universal search system.
Source code in src/congressgov/services/house_requirement.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
matching_communications ¶
matching_communications(*, client: AuthenticatedClient | None = None, requirement_number: int, format_: str = None, offset: int = None, limit: int = None)
List communications matching a House requirement.
Source code in src/congressgov/services/house_requirement.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
HouseVote¶
congressgov.services.house_vote.HouseVote ¶
HouseVote(client: AuthenticatedClient | None = None)
Bases: ApiService
HouseVote service provides API access for House vote data.
Source code in src/congressgov/services/house_vote.py
38 39 40 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, session: int, vote_number: int, format_: str = None) -> HouseVoteModel
Get detailed information about a specific House vote.
Source code in src/congressgov/services/house_vote.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, format_: str = None, offset: int = None, limit: int = None) -> HouseVotesModel
Search for House votes using the universal search system.
Source code in src/congressgov/services/house_vote.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
list_by_congress_session ¶
list_by_congress_session(*, client: AuthenticatedClient | None = None, congress: int, session: int, format_: str = None, offset: int = None, limit: int = None) -> HouseVotesModel
List House votes for a Congress and session.
Source code in src/congressgov/services/house_vote.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
members ¶
members(*, client: AuthenticatedClient | None = None, congress: int, session: int, vote_number: int, format_: str = None, offset: int = None, limit: int = None) -> MemberVotesModel
Return per-member vote positions for a House roll call vote (beta endpoint).
Source code in src/congressgov/services/house_vote.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
Nomination¶
congressgov.services.nomination.Nomination ¶
Nomination(client: AuthenticatedClient | None = None)
Bases: ApiService
Nomination service provides API access for Congressional nomination data.
Source code in src/congressgov/services/nomination.py
44 45 46 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, nomination_number: int, format_: str = None) -> NominationModel
Get detailed information about a specific nomination.
Source code in src/congressgov/services/nomination.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
get_nominees ¶
get_nominees(*, client: AuthenticatedClient | None = None, congress: int, nomination_number: int, ordinal: int, format_: str = None, offset: int = None, limit: int = None) -> NomineesModel
Get nominees for a nomination at a specific ordinal.
Source code in src/congressgov/services/nomination.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, format_: str = None, offset: int = None, limit: int = None) -> NominationsModel
Search for nominations using the universal search system.
Source code in src/congressgov/services/nomination.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
SenateCommunication¶
congressgov.services.senate_communication.SenateCommunication ¶
SenateCommunication(client: AuthenticatedClient | None = None)
Bases: ApiService
SenateCommunication service provides API access for Senate communication data.
Source code in src/congressgov/services/senate_communication.py
25 26 27 | |
get ¶
get(*, client: AuthenticatedClient | None = None, congress: int, communication_type: str, communication_number: int, format_: str = None) -> SenateCommunicationModel
Get detailed information about a specific Senate communication.
Source code in src/congressgov/services/senate_communication.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
search ¶
search(*, client: AuthenticatedClient | None = None, congress: int = None, communication_type: str = None, format_: str = None, offset: int = None, limit: int = None) -> SenateCommunicationsModel
Search for Senate communications using the universal search system.
Source code in src/congressgov/services/senate_communication.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
Summaries¶
congressgov.services.summaries.Summaries ¶
Summaries(client: AuthenticatedClient | None = None)
Bases: ApiService
Summaries service provides API access for bill summaries data.
Source code in src/congressgov/services/summaries.py
20 21 | |
search ¶
search(*, client: AuthenticatedClient | None = None, format_: str = None, offset: int = None, limit: int = None) -> SummariesModel
Search for bill summaries using the universal search system.
Source code in src/congressgov/services/summaries.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
Treaty¶
congressgov.services.treaty.Treaty ¶
Treaty(client: 'AuthenticatedClient | None' = None)
Bases: ApiService
Treaty service provides API access for treaty data.
Source code in src/congressgov/services/treaty.py
42 43 44 | |
get ¶
get(*, client: 'AuthenticatedClient | None' = None, congress: int, treaty_number: int, treaty_suffix: str | None = None, format_: str | None = None) -> TreatyModel
Get detailed information about a specific treaty.
Raises:
| Type | Description |
|---|---|
ClientNotFoundError
|
If no API client is available. |
Source code in src/congressgov/services/treaty.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
search ¶
search(*, client: 'AuthenticatedClient | None' = None, congress: int | None = None, format_: str | None = None, offset: int | None = None, limit: int | None = None) -> TreatiesModel
Search for treaties using the universal search system.
Source code in src/congressgov/services/treaty.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_actions ¶
get_actions(*, client: 'AuthenticatedClient | None' = None, congress: int, treaty_number: int, format_: str | None = None) -> ActionsModel
Return actions for a treaty.
Source code in src/congressgov/services/treaty.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |