Texas APIcapitol.texas.gov ↗
Access Texas Legislature bill data, legislator info, and committee rosters via API. Covers bill actions, stages, member contact details, and committee membership.
What is the Texas API?
The capitol.texas.gov API exposes 7 endpoints covering Texas Legislature data across bills, legislators, and committees. Use search_bills to query active or historical sessions by chamber and legislature number, retrieve step-by-step action histories with journal page references via get_bill_actions, and pull committee rosters with member roles through get_committee_members. Response fields include bill identifiers, legislative stage status, district numbers, and official legislator website URLs.
curl -X GET 'https://api.parse.bot/scraper/3fe7d5ac-53e1-4c15-9eb6-edbebcf8f29b/search_bills?chamber=both&session=R&legislature=89' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace capitol-texas-gov-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Texas Legislature Online: Track bills, legislators, and committees."""
from parse_apis.texas_legislature_online_api import (
TexasLegislature, Chamber, Session, ResourceNotFound
)
client = TexasLegislature()
# Search for House bills in the regular session
for bill in client.bills.search(session=Session.REGULAR, chamber=Chamber.HOUSE, limit=5):
print(bill.bill_number, bill.author)
# Drill into a specific bill's legislative stages and actions
bill = client.bills.search(session=Session.REGULAR, limit=1).first()
if bill:
for stage in bill.stages.list(limit=7):
print(stage.stage_number, stage.status, stage.description)
for action in bill.actions.list(limit=3):
print(action.comment, action.date)
# List House legislators, then get full detail for one
summary = client.legislatorsummaries.list(limit=1).first()
if summary:
detail = summary.details()
print(detail.name, detail.district, detail.committees)
# Browse committees and their members, with error handling
try:
committee = client.committees.list(session=Session.REGULAR, limit=1).first()
if committee:
for member in committee.members.list(limit=5):
print(member.name, member.role)
except ResourceNotFound as exc:
print(f"Resource not found: {exc}")
print("Exercised: bills.search / stages.list / actions.list / legislatorsummaries.list / details / committees.list / members.list")
Search for bills in the Texas Legislature for a given session. Returns the first 25 results with total count. Results include bill ID, bill number, and author. Use get_bill_actions or get_bill_stages for individual bill details.
| Param | Type | Description |
|---|---|---|
| chamber | string | Filter by chamber: 'house', 'senate', or 'both'. |
| session | string | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |
| legislature | string | Legislature number (e.g., '89' for the 89th Legislature). |
{
"type": "object",
"fields": {
"bills": "array of bill objects with bill_id, bill_number, and author",
"total": "integer total number of matching bills",
"chamber": "string chamber filter used",
"session": "string session type used",
"legislature": "string legislature number used",
"results_shown": "integer number of bills returned in this response"
},
"sample": {
"data": {
"bills": [
{
"author": "Bonnen | et al.",
"bill_id": "HB1",
"bill_number": "HB 1"
},
{
"author": "Buckley | et al.",
"bill_id": "HB2",
"bill_number": "HB 2"
}
],
"total": 9014,
"chamber": "both",
"session": "R",
"legislature": "89",
"results_shown": 25
},
"status": "success"
}
}About the Texas API
Bills and Legislative Progress
search_bills returns up to 25 results per call with a total count, filtering by chamber ('house', 'senate', or 'both'), session ('R' for Regular, '1' for 1st Called, '2' for 2nd Called), and legislature number (e.g., '89'). Each result includes bill_id, bill_number, and author. For deeper detail, get_bill_actions returns a chronological array of actions with description, comment, date, time, and journal_page references. get_bill_stages returns the same bill's progress through named legislative stages, each with a stage_number, status, and date, useful for tracking how far a bill has advanced.
Legislators and Contact Data
get_legislators lists all current members for a given chamber with name, member_code, chamber code, and district. The member_code value feeds into get_legislator_info, which returns the legislator's full name with title, district, official website URL, and a committees array listing all committee assignments by name. The legislature parameter lets you query across sessions.
Committees and Membership
get_committees returns the full list of committees for a given chamber and session, including name, committee_code, and chamber code. The total field tells you how many committees exist in that configuration. Pass a committee_code to get_committee_members to retrieve each member's name, role (Chair, Vice Chair, or Member), and member_code. The response also includes the committee_name and a leg_sess string combining legislature and session codes for reference.
The Texas API is a managed, monitored endpoint for capitol.texas.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when capitol.texas.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official capitol.texas.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track a specific Texas bill through all legislative stages using
get_bill_stagesand alert whenstatuschanges. - Build a legislator contact directory with district numbers and official website URLs from
get_legislator_info. - Map committee assignments for every House or Senate member by combining
get_legislatorswithget_legislator_info. - Audit legislative activity by pulling journal page references from
get_bill_actionsfor a given session. - Compare committee rosters across Regular and Called sessions using
get_committeeswith differentsessionvalues. - Identify which legislators chair committees by filtering
rolefields returned byget_committee_members. - Monitor all bills authored in a specific chamber during a called session using
search_billswithsessionandchamberfilters.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Texas Legislature have an official developer API?+
What does `search_bills` return and how many results does it include?+
search_bills returns up to 25 bill objects per call, each with bill_id, bill_number, and author. The total field tells you the full count of matching bills for the query, and you can filter by chamber, session, and legislature number. There is currently no offset or page parameter to retrieve results beyond the first 25. You can fork the API on Parse and revise it to add pagination support.Does the API return the full text or PDF of a bill?+
description, comment, date, and journal_page — but not bill document text or PDF links. You can fork the API on Parse and revise it to add an endpoint that retrieves bill text documents.Can I retrieve voting records or roll call data for a bill?+
What is the `leg_sess` field and how is it formatted?+
leg_sess is a combined string of the legislature number and session code returned by get_bill_actions, get_bill_stages, and get_committee_members. For example, the 89th Legislature Regular Session would appear as '89R'. It is used as a single reference key rather than two separate fields.