Legislative API Documentation - Montana Legislature
Home / Reference / Legislative API Documentation

Legislative API Documentation

Legislative API Documentation

The Montana Legislature provides public access to legislative data through its REST APIs. These services allow developers, researchers, and other interested parties to retrieve information about bills, committees, legislators, legislative documents, and historical legislative records.

Available APIs

Select the appropriate API to access interactive Swagger documentation, available endpoints, request parameters, and response structures.

Historical Legislative Data

Getting Started

All public API services are hosted at https://api-public.legmt.gov.

API endpoints follow OpenAPI REST conventions and use JSON for requests and responses. URLs and attribute names use camelCase.

Endpoint Structure

https://api-public.legmt.gov/{service}/{version}/{resource}

For example:

https://api-public.legmt.gov/bills/v1/bills

Request Methods

MethodDescription
GETRetrieve records using path or query parameters.
POST /searchRetrieve records using more complex search criteria supplied in the request body.

Example Requests

Retrieve all bills:

GET /bills/v1/bills

Retrieve a specific bill:

GET /bills/v1/bills/1234

Retrieve bills by session:

GET /bills/v1/bills/findBySessionId?sessionId=1

Retrieve available bill types:

GET /bills/v1/billTypes

Working with Related Data

Some records reference information available through another API. For example, a bill’s sponsorId references a legislator whose information can be retrieved through the Legislators API.

Refer to the Swagger documentation for entity definitions, relationships, and associated endpoints.

Authentication and Access

Public data retrieval does not require authentication or authorization.

If a public data request returns a 401 Unauthorized response, remove the Authorization header and retry the request.

Restricted data and operations require appropriate authentication and authorization.

Error Handling

The APIs use standard HTTP response status codes.

Status CodeDescription
200Successful request.
401Unauthorized request.
404Requested resource not found.
4xxClient or request error.
5xxServer-side error.

Additional error details may be provided in the JSON response body, including a message attribute describing the issue.