# Senate — 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.

> Watch live Texas Senate broadcasts by retrieving current schedules, program details, and direct links to stream pages all in one place. Stay informed about legislative sessions and hearings as they happen by accessing up-to-date broadcast information.

**Category:** Government & Public Data | **Website:** [www.senate.texas.gov/av-live.php?](https://www.senate.texas.gov/av-live.php?) | **Docs:** [parse.bot/marketplace/1f9dc399-028a-45fa-b296-7c8673ed157a/senate-texas-gov-api](https://parse.bot/marketplace/1f9dc399-028a-45fa-b296-7c8673ed157a/senate-texas-gov-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/senate/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get live broadcasts

Returns all live broadcasts currently listed on the Texas Senate live video page. Each entry includes the program title, scheduled date and time, location, any notes, and the direct URL to the livestream player page. The page refreshes every 2 minutes on the site; results reflect the current schedule at request time. When no broadcasts are scheduled, the broadcasts array will be empty.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/senate/get-live-broadcasts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get schedule

Returns all live broadcasts from the Texas Senate live video page in a normalized LiveMediaScheduleItem format. Each item includes the program title, date, time, start_time_utc (derived from Central time), stream URL, location as a nested object, inferred status (live if currently airing, otherwise scheduled), description from notes, and video_file (the m3u8 stream URL extracted from the player page). Fields not available from the source (is_early, original_start_date, type, event_id, program_id, duration, duration_minutes, thumbnail, category, format, series_title) are null. The source page only exposes today's broadcasts; if a non-today date is requested, an empty schedule is returned with a note explaining the limitation. Returns a top-level schedule array; empty when no broadcasts are scheduled.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | ISO date YYYY-MM-DD to filter broadcasts. The source only exposes today's schedule; if omitted, today's broadcasts are returned. If a date other than today (US Central time) is provided, an empty schedule is returned with an explanatory note. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/senate/get-schedule \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.