API reference
Base URL https://www.policyeagle.org/api/v1. The machine-readable contract is at /api/v1/openapi.json (OpenAPI 3.1; no key needed).
Authentication
Send your key in the Authorization header on every request. Keys in query strings are not accepted.
Authorization: Bearer $POLICY_EAGLE_API_KEYTo rotate a key, choose Create replacement in your account: the old key keeps working for 24 hours. Revoking a key stops it immediately. If a key leaks, revoke it; when you contact us, send the request_id, never the key.
Responses and pagination
Successful responses are { "data": …, "meta": { "request_id": … } }. Lists return meta.next_cursor; pass it back as cursor with the same filters to get the next page. It is null on the last page. A cursor used with different filters is rejected. Bill ids are permanent within their session, but the order of results can change when the data refreshes.
Errors
{ "error": { "code": "INVALID_REQUEST", "message": "Some parameters are invalid.",
"details": [{ "field": "sort", "message": "…" }] },
"meta": { "request_id": "req_…" } }| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_REQUEST | A parameter is missing or invalid. Unknown codes, categories and sort values are errors, not ignored. |
| 401 | UNAUTHORIZED | No key, or the key is wrong, expired or revoked. |
| 403 | FORBIDDEN | The key can't read this data. |
| 404 | NOT_FOUND | No such session, or no bill with that id in that session. |
| 429 | RATE_LIMITED | Too many requests. Wait for Retry-After seconds. |
| 503 | UNAVAILABLE | A service we depend on is unavailable or busy, often during a data refresh. Retry with backoff. |
Rate limits
Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds) for your tightest window, plus X-Request-Id. Limits are shared by all your keys; GET /me shows both windows.
Endpoints
Check your key
GET /me
Returns the key's label, scope and current rate-limit windows. Counts against your limits like any request.
Errors: 401, 429, 503
List sessions
GET /sessions
Published Florida sessions, newest first. `is_current` marks the session the website shows by default.
Errors: 401, 429, 503
Search bills
GET /bills
A page of bills in one session. Filters combine with AND; values inside `progress` or `categories` match any. Unknown codes, slugs and sort values are rejected rather than ignored.
| Parameter | Type | Description |
|---|---|---|
session_id (required) | integer | |
chamber | H | S | House or Senate; omit for both. |
bill_number | string | `HB 123`, `S0045` or `123`. A chamber letter also filters the chamber. |
text | string | Case-insensitive match on the title. |
stage | filed | committee | floor | governor | law | vetoed | replaced | died | `filed`: Filed (10); `committee`: In committee (20); `floor`: On the floor (30, 40, 50); `governor`: Governor's desk (60); `law`: Became law (70, 80); `vetoed`: Vetoed (92); `replaced`: Replaced by companion (93); `died`: Died (90, 91). Not combinable with `progress`. |
progress | string | Comma-separated progress codes: 10 Filed, 20 In committee, 30 2nd reading, 40 3rd reading, 50 Passed Legislature, 60 Governor, 70 Became law, 80 Adopted, 90 Died, 91 Withdrawn, 92 Vetoed, 93 Replaced by companion. |
categories | string | Comma-separated category slugs. |
moved | boolean | Only bills with an action in the last 7 days (UTC, inclusive). Past sessions usually return none. |
sort | latest | number | `latest`: newest action first. `number`: House then Senate, by number. |
limit | integer, default 20, max 50 | |
cursor | string | `next_cursor` from the previous page, with the same filters. |
Errors: 400, 401, 404, 429, 503
Get a bill
GET /bills/{session_id}/{bill_id}
| Parameter | Type | Description |
|---|---|---|
session_id (required) | integer | From GET /sessions. |
bill_id (required) | integer | Permanent numeric id from GET /bills. Always paired with its session. |
Errors: 400, 401, 404, 429, 503
List a bill's actions
GET /bills/{session_id}/{bill_id}/actions
The bill's history, oldest first.
| Parameter | Type | Description |
|---|---|---|
session_id (required) | integer | From GET /sessions. |
bill_id (required) | integer | Permanent numeric id from GET /bills. Always paired with its session. |
limit | integer, default 100, max 200 | |
cursor | string | `next_cursor` from the previous page, with the same filters. |
Errors: 400, 401, 404, 429, 503