Web API

The Tennessee General Assembly Web API Help Page

The Tennessee General Assembly (TGA) Web API is a RESTful API that provides an interface that can be accessed with any application that supports the HTTP protocol.

A consumer client can access this service by authenticating itself to the server, and requesting a representation of a specific resource; usually, the root API resource. A client may consume additional information by exploring the API and discovering further resources. These are revealed to the client by the server through the use of hyperlinks.

The server can present information to the client using several known formats, identified by their Internet media-types. The format is chosen by the server, in cooperation with the client making the request.

A Word About Authentication

This service uses Basic Authorization through the HTTP request header. It is the clients responsibility to include their issued token as part of each request otherwise you will receive a "HTTP/1.1 401 Unauthorized" error message.

For example, include this in your header: Authorization: Basic A4wOKoXxnFNlJ1151%2BxAE5Dy5WHk%3D

Note: The token provide here is for example purposes only and will not grant you access to the API!

Response Formats

This service returns data in one of two formats, json or xml. By default, json will be returned unless you are using a web browser. You can guarantee the return format by adding the 'Accept' verb in your request header.

Example:
Accept: application/json
Accept: application/xml

For more information about using Basic authentication, please go here.

Available Resources

Address

APIDescription
GET address?street={street}&city={city}&zip={zip}

Provides State and Congressional District numbers and Representatives Names based on the address provided. The following responses are also provided in the Response tag: "Found Address" or "Address not found". State is assumed to be Tennessee (TN).

GET address?lat={lat}&lng={lng}

Provides State and Congressional District members based on the latitude and longitude coordinates provided,

Address2022

APIDescription
GET address2022?street={street}&city={city}&zip={zip}

Provides State and Congressional District numbers and Representatives Names based on the address provided. The following responses are also provided in the Response tag: "Found Address" or "Address not found". State is assumed to be Tennessee (TN).

GET address2022?lat={lat}&lng={lng}

Provides State and Congressional District members based on the latitude and longitude coordinates provided,

Amendments

APIDescription
GET Amendments/{ga}

This will retrieve a list of all amendments filed for the selected General Assembly

GET Amendments/{ga}/{type}/{date}

This will retrieve a list of valid amendments for the selected General Assembly filed since the date specified.

GET Amendments/{ga}/{docno}

This will return detail information about a valid amendment number for the selected General Assembly.

GET Amendments/{ga}/{docno}/actions

This will return a list of all of the actions for the specified Amendment.

Bills

APIDescription
GET Bills/{ga}

This will return a list of valid bill numbers for the selected General Assembly.

GET Bills/{ga}/{type}/{date}

This will return a list of valid bill numbers for the selected General Assembly filed since date specified.

GET Bills/{ga}/{docno}

This returns detail information for a valid bill number for the current General Assembly.

GET Bills/{ga}/{docno}/actions

This will retrieve the list of actions for a given bill.

GET Bills/{ga}/{docno}/votes

This will return all votes taken on a particular bill

Calendars

APIDescription
GET Calendars/{ga}/{date}

(Deprecated -- Please use the Meetings end point.) This will return a list of Calendars for a given date

Committees

APIDescription
GET Committees/{ga}

This will return a list of current Committees and Owners in the requested General Assembly.

GET Committees/{ga}/{chamber}

This will return a list of current Committees and Owners by Chamber in the requested General Assembly.

GET Committees/{ga}/{chamber}/{committeeid}

This will return a list of current Committee Members by Chamber in the requested General Assembly.

GA

APIDescription
GET GA

This will return a list of the General Assemblies that are available. The current GA is marked as True. You are required to provide the GA you want to access in all queries except the address validator, calendars and publications.

Legislators

APIDescription
GET Legislators/{ga}

This will return a list of current Legislators in the requested General Assembly.

GET Legislators/{ga}/{chamber}

This will return a list of current Legislators in the requested General Assembly for the specified chamber.

GET Legislators/{ga}/{chamber}/{id}

This will return detailed information about a particular legislator.

GET Legislators/{ga}/{chamber}/{id}/bills

This will retrieve the list of bills sponsored by the member (bills and resolutions).

GET Legislators/{ga}/{chamber}/{id}/cosponsoredbills

This will retrieve the list of bills co-sponsored by the member (bills and resolutions).

Meetings

APIDescription
GET Meetings/{ga}/{date}

This will return a list of Meetings and Calendars for a given date

Publications

APIDescription
GET Publications/const

This will return a link to the current version of the Tennessee Constitution.

GET Publications/code

This will return the most recent Code Bill documentation. There may be multiple links.

Subjects

APIDescription
GET Subjects/{ga}

This will return a list of Subjects in the requested General Assembly.

GET Subjects/{ga}/{letter}

This will return a list of Subjects in the requested General Assembly by letter.

GET Subjects/{ga}/{subjectcode}/bills

This will return a list of Bills by Subject in the requested General Assembly.