> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asteragents.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LegiScan

> Track and monitor legislation across all 50 US states and Congress

## Overview

The LegiScan integration enables your agents to search, analyze, and proactively monitor legislation across all 50 US state legislatures and the US Congress. Ideal for government affairs teams, compliance departments, legal professionals, and policy analysts who need to stay on top of legislative activity.

## Features

* **Bill Search**: Find legislation by keyword, state, year, and status across all jurisdictions
* **Bill Details**: Access full bill information including sponsors, legislative history, vote records, and amendments
* **Bill Text Retrieval**: Read the actual text of introduced, engrossed, or enrolled legislation
* **Roll Call Votes**: View detailed vote tallies and individual legislator voting records
* **Legislator Lookup**: Get legislator profiles, party, district, and external reference links
* **Monitoring Watchlist**: Add bills to a watchlist and check for status changes — pairs with [Scheduled Tasks](/features/scheduled-tasks) for proactive alerts

## Prerequisites

* A LegiScan API key (free and paid tiers available at [legiscan.com](https://legiscan.com/legiscan))

## Setup Guide

<Steps>
  <Step title="Get a LegiScan API Key">
    Sign up at [legiscan.com/legiscan](https://legiscan.com/legiscan) and generate an API key from your account dashboard.
  </Step>

  <Step title="Connect in Control Hub">
    Navigate to **Control Hub > Integrations** and locate the LegiScan card. Click **Connect** and enter your API key.
  </Step>

  <Step title="Add Tools to Your Agent">
    Edit your agent and add any of the LegiScan tools from the tool picker. All 7 tools appear under the **LegiScan** category.
  </Step>
</Steps>

## Available Tools

| Tool                      | Description                                                          |
| ------------------------- | -------------------------------------------------------------------- |
| `legiscan_search_bills`   | Search bills by keyword, state, year, and status                     |
| `legiscan_get_bill`       | Get full bill details (sponsors, history, votes, texts, amendments)  |
| `legiscan_get_bill_text`  | Retrieve the actual text content of a bill document                  |
| `legiscan_get_roll_call`  | Get detailed roll call vote results with individual legislator votes |
| `legiscan_get_legislator` | Look up legislator details (name, party, role, district)             |
| `legiscan_monitor_list`   | List all bills on the monitoring watchlist                           |
| `legiscan_set_monitor`    | Add or remove a bill from the monitoring watchlist                   |

## Proactive Bill Monitoring

Combine LegiScan monitoring tools with Aster's [Scheduled Tasks](/features/scheduled-tasks) to create agents that automatically track legislation:

1. Add `legiscan_search_bills`, `legiscan_monitor_list`, `legiscan_set_monitor`, and `schedule_task` to your agent
2. Ask your agent to search for bills matching your criteria and add them to the watchlist
3. Have the agent create a scheduled task that periodically checks the monitor list for changes
4. The agent will run on schedule, detect changes, and can notify you via email or chat

## Usage Notes

* **Free tier**: LegiScan's free API tier allows approximately 30,000 calls per month. Search first, then drill into specific bills to stay efficient.
* **State codes**: Use standard 2-letter state codes (e.g., `CA`, `NY`, `TX`) or `US` for federal Congress.
* **Bill text**: HTML documents are returned as clean text. PDF documents return a notice with a link to view the original.

## Troubleshooting

<AccordionGroup>
  <Accordion title="No Results Returned">
    * Verify your API key is valid and active
    * Check that the state code is correct (2-letter format)
    * Try broadening your search keywords
    * Ensure the year filter matches an active legislative session
  </Accordion>

  <Accordion title="API Key Not Working">
    * Confirm your key is entered correctly in Control Hub (no extra spaces)
    * Check your LegiScan account status and API usage limits
    * Free tier keys may have rate limits — try again after a few minutes
  </Accordion>

  <Accordion title="Monitor List Empty">
    * Use `legiscan_set_monitor` to add bills before checking the monitor list
    * The monitor list is tied to your LegiScan API key account
  </Accordion>
</AccordionGroup>
