Data source: Congress.gov API (api.congress.gov)
https://context.gnist.ai/rest/congress/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
search_billsSearch US congressional bills by keyword.
Args:
query: Search keywords for bill text or title.
congress: Congress number (e.g. 118 for the 118th Congress).
bill_type: Bill type filter: hr, s, hjres, sjres, hconres, sconres, hres, sres.
limit: Maximum results to return (1-250, default 20).
Returns:
Dictionary with count and list of matching bills including title, sponsor, and latest action.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | |
congress | any | optional | |
bill_type | any | optional | |
limit | integer | optional | (default: 20) |
{
"query": "example"
}get_billGet detailed information about a specific US congressional bill.
Args:
congress: Congress number (e.g. 118).
bill_type: Bill type: hr, s, hjres, sjres, hconres, sconres, hres, sres.
bill_number: Bill number (e.g. "1" for H.R. 1).
Returns:
Dictionary with full bill details including sponsor, subjects, policy area, and summaries.
| Parameter | Type | Required | Description |
|---|---|---|---|
congress | integer | required | |
bill_type | string | required | |
bill_number | string | required |
{
"congress": 1,
"bill_type": "example",
"bill_number": "example"
}get_recent_billsGet recently updated bills from a specific congress.
Args:
congress: Congress number (default: 118 for the 118th Congress, 2023-2025).
limit: Maximum results to return (1-250, default 20).
Returns:
Dictionary with count and list of recently updated bills.
| Parameter | Type | Required | Description |
|---|---|---|---|
congress | integer | optional | (default: 118) |
limit | integer | optional | (default: 20) |
{
"query": "example"
}search_membersSearch members of Congress with optional filters.
Note: State, party, and chamber filters are applied client-side after fetching results.
The returned count reflects filtered results only. For unfiltered queries, pagination
works normally. When filters are active, increase limit for more complete results.
Args:
state: Filter by US state abbreviation (e.g. CA, NY, TX).
party: Filter by party name (Democratic, Republican).
chamber: Filter by chamber (House of Representatives, Senate).
limit: Maximum results to fetch from API before filtering (1-250, default 20).
Returns:
Dictionary with count and list of matching members including party, state, and chamber.
| Parameter | Type | Required | Description |
|---|---|---|---|
state | any | optional | |
party | any | optional | |
chamber | any | optional | |
limit | integer | optional | (default: 20) |
{
"query": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/congress/search_bills" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"query": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/congress/search_bills",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"query": "example"
},
)
print(resp.json())