# Texas Legislature — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and monitor Texas Legislature bills, track their progress through legislative stages, and retrieve detailed action histories. Look up legislator contact information, district details, committee assignments, and full committee membership rosters.

**Category:** Government & Public Data | **Website:** [capitol.texas.gov/](https://capitol.texas.gov/) | **Docs:** [parse.bot/marketplace/f7470d80-026e-45c8-b44e-488a439e99d9/capitol-texas-gov-api](https://parse.bot/marketplace/f7470d80-026e-45c8-b44e-488a439e99d9/capitol-texas-gov-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_bill_actions

Get actions (Description and Comment) for a specific bill, including dates and journal page references. Each action has a chamber indicator, description comment, date, time, and journal page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bill_id` | string | Yes | Bill identifier (e.g., 'HB1', 'SB5', 'HJR10'). |
| `legislature` | string | No | Legislature number. |
| `session` | string | No | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_bill_actions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bill_id":"<string>","legislature":"<string>","session":"<string>"}'
```

### get_bill_stages

Get bill stages (legislative progress) for a specific bill. Each stage includes a stage number, status (complete/pending/failed), description, and date when completed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bill_id` | string | Yes | Bill identifier (e.g., 'HB1', 'SB5'). |
| `legislature` | string | No | Legislature number. |
| `session` | string | No | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_bill_stages \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bill_id":"<string>","legislature":"<string>","session":"<string>"}'
```

### get_committee_members

Get members of a specific committee with their roles (Chair, Vice Chair, Member). Requires committee_code from get_committees.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `committee_code` | string | Yes | Committee code from get_committees (e.g., 'C020', 'C030'). |
| `legislature` | string | No | Legislature number. |
| `session` | string | No | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_committee_members \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"committee_code":"<string>","legislature":"<string>","session":"<string>"}'
```

### get_committees

Get list of committees for a chamber and session. Returns committee names and codes for use with get_committee_members.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chamber` | string | No | Chamber: 'house' or 'senate'. |
| `legislature` | string | No | Legislature number. |
| `session` | string | No | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_committees \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chamber":"<string>","legislature":"<string>","session":"<string>"}'
```

### get_legislator_info

Get detailed info for a specific legislator including district, committee assignments, and website. Requires member_code from get_legislators.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chamber` | string | No | Chamber: 'house' or 'senate'. |
| `legislature` | string | No | Legislature number. |
| `member_code` | string | Yes | Member code from get_legislators (e.g., 'A4395'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_legislator_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chamber":"<string>","legislature":"<string>","member_code":"<string>"}'
```

### get_legislators

Get list of all legislators for a chamber (House or Senate). Returns member names with their member codes for use with get_legislator_info.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chamber` | string | No | Chamber: 'house' or 'senate'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/get_legislators \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chamber":"<string>"}'
```

### search_bills

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chamber` | string | No | Filter by chamber: 'house', 'senate', or 'both'. |
| `legislature` | string | No | Legislature number (e.g., '89' for the 89th Legislature). |
| `session` | string | No | Session type: 'R' for Regular, '1' for 1st Called, '2' for 2nd Called. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-capitol-texas-gov-api-f7470d80/search_bills \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chamber":"<string>","legislature":"<string>","session":"<string>"}'
```
