# BeInvolved: Local Government Agenda Monitor (`mallhw/beinvolved`) Actor

Watches city council agendas across platforms (Legistar and Berkeley eAgenda), normalizes every item into one schema, and uses Claude to flag the items that match a resident's plain-English interests before the vote.

- **URL**: https://apify.com/mallhw/beinvolved.md
- **Developed by:** [Matthew Li](https://apify.com/mallhw) (community)
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## BeInvolved: Local Government Agenda Monitor

**Tell BeInvolved what you care about. It reads upcoming city council agendas, finds the items that affect you, and explains each one in a plain sentence, with a link to the staff report, before the vote.**

Local decisions about bike lanes, housing, rent rules and police budgets are published days before each meeting. They're buried in agenda pages and PDFs spread across different platforms. BeInvolved reads them for you.

### What it does

1. **Collects agendas from several platforms** and normalizes every item into one schema:
   - **Legistar Web API** (Oakland, San José, Alameda, Mountain View, Sunnyvale, plus *any* Legistar client slug you add, which covers hundreds of US cities, counties and agencies)
   - **Berkeley eAgenda** pages on berkeleyca.gov (Berkeley doesn't use Legistar)
2. **Scores each item against your interests** with Claude: a relevance from 0 to 1, the interest it matches, a one-sentence plain summary, and the kind of action (vote, consent, public hearing, discussion or informational).
3. **Returns only what matters**, ranked, with links to the source documents. A Markdown digest is saved to the `OUTPUT` record for agents and alerts.

### Input

| Field | What it does |
|---|---|
| `interests` *(required)* | Topics you care about, in plain English |
| `jurisdictions` | Preset councils to watch (Berkeley, Oakland, San José, Alameda, Mountain View, Sunnyvale) |
| `extraLegistarClients` | Any other Legistar slug, e.g. `seattle` |
| `daysAhead` / `daysBack` | Time window to scan (default: the next 21 days) |
| `maxMeetingsPerJurisdiction` | Caps run time and cost (default 4) |
| `minRelevance` | Threshold for a match (default 0.5) |
| `includeAllItems` | Also output the items below the threshold |
| `alertEmail` | Email the matches here via the `apify/send-mail` Actor |
| `anthropicApiKey` | Optional: use your own key for Claude scoring |

Example:

```json
{
  "interests": ["Bike lanes and street safety", "New apartments near UC Berkeley"],
  "jurisdictions": ["berkeley", "oakland"],
  "daysAhead": 21
}
```

### Output

One dataset row per matching agenda item:

```json
{
  "relevance": 0.86,
  "matchedInterest": "Housing affordability and new apartments near UC Berkeley",
  "plainSummary": "The council picks a developer to negotiate building housing on the Ashby BART east parking lot and sets aside predevelopment money.",
  "reason": "Directly shapes how many new homes get built a mile from campus.",
  "actionType": "vote",
  "jurisdictionName": "City of Berkeley",
  "body": "City Council (Regular Meeting)",
  "meetingDate": "2026-10-27",
  "section": "Action Calendar",
  "itemNumber": "30",
  "title": "Ashby BART East Lot Developer Selection for Exclusive Negotiation and Reservation of Predevelopment Funding",
  "documentUrl": "https://berkeleyca.gov/sites/default/files/2026-10-27%20Item%2030%20Ashby%20BART%20East%20Lot%20Developer%20Selection.pdf",
  "platform": "berkeley-eagenda",
  "scoredBy": "claude"
}
```

The `OUTPUT` key-value record holds `digest` (Markdown), `matchCount`, `itemsScanned` and the top matches.

### Use it from an AI agent (MCP)

BeInvolved works as a tool for Claude and other MCP clients through Apify's hosted MCP server:

```
https://mcp.apify.com?tools=<username>/beinvolved
```

An agent can call it whenever someone asks "what's coming up in Berkeley about housing?" and answer with cited items.

BeInvolved also runs in **Standby mode** as its own MCP server, with no cold start:

```
https://<username>--beinvolved.apify.actor/mcp
```

It exposes two tools: `find_agenda_items` (interests, jurisdictions and days ahead in; ranked, cited matches out) and `list_jurisdictions`. The same Standby server answers plain HTTP too: `GET /scan?interests=housing|bike lanes&jurisdictions=berkeley,oakland`.

### Pricing

Pay per event:

- `agenda-item-scanned`: each agenda item read and normalized
- `relevant-item-found`: each item that matches your interests

### Run it on a schedule

Save your input as a Task, set `alertEmail`, and attach a weekly Schedule. Each run hands its digest to Apify's `apify/send-mail` Actor, so new matches arrive in your inbox. The BeInvolved web app sets this up in one click.

### Limitations

- School board agendas on BoardDocs aren't supported yet, because BoardDocs blocks automated access.
- San Francisco's Legistar Web API is currently misconfigured on SF's side, so SF isn't in the presets.
- Relevance scores are Claude's judgment. Always check the linked source document before acting.

# Actor input Schema

## `interests` (type: `array`):

Topics you care about, in plain English. Each agenda item is scored against every interest, e.g. "Bike lanes and street safety" or "New apartments near campus".

## `jurisdictions` (type: `array`):

Which city councils to watch. Berkeley uses its own eAgenda pages; the others are read from the Legistar Web API.

## `extraLegistarClients` (type: `array`):

Any other Legistar client slug, the part before .legistar.com (for example "seattle" or "chicago"). Hundreds of US cities, counties and agencies publish on Legistar.

## `daysAhead` (type: `integer`):

How many days of upcoming meetings to scan.

## `daysBack` (type: `integer`):

Also include meetings from this many past days, for catching up on recent decisions.

## `maxMeetingsPerJurisdiction` (type: `integer`):

Upper bound on meetings read per jurisdiction, which caps run time and cost.

## `minRelevance` (type: `string`):

Only items scoring at or above this relevance (0 to 1) are returned as matches. 0.5 keeps items with a real, if indirect, effect on an interest.

## `includeAllItems` (type: `boolean`):

Also write the items below the relevance threshold to the dataset (not charged as matches).

## `alertEmail` (type: `string`):

If set, matches are emailed here through the apify/send-mail Actor. Pair with a Schedule to get a weekly digest.

## `anthropicApiKey` (type: `string`):

Use your own Anthropic key for Claude scoring. Without a key the Actor uses its configured key, or falls back to keyword matching.

## Actor input object example

```json
{
  "interests": [
    "Bike lanes, traffic safety and street design",
    "Housing affordability and new apartments near UC Berkeley",
    "Police and public safety budget"
  ],
  "jurisdictions": [
    "berkeley",
    "oakland"
  ],
  "extraLegistarClients": [],
  "daysAhead": 21,
  "daysBack": 0,
  "maxMeetingsPerJurisdiction": 4,
  "minRelevance": "0.5",
  "includeAllItems": false
}
```

# Actor output Schema

## `matches` (type: `string`):

One row per upcoming agenda item that matches your interests, with a plain-English summary, relevance, action type, meeting date and staff report link.

## `digest` (type: `string`):

Summary of the scan with a Markdown digest of the top matches (the OUTPUT record).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "interests": [
        "Bike lanes, traffic safety and street design",
        "Housing affordability and new apartments near UC Berkeley",
        "Police and public safety budget"
    ],
    "jurisdictions": [
        "berkeley",
        "oakland"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mallhw/beinvolved").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "interests": [
        "Bike lanes, traffic safety and street design",
        "Housing affordability and new apartments near UC Berkeley",
        "Police and public safety budget",
    ],
    "jurisdictions": [
        "berkeley",
        "oakland",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("mallhw/beinvolved").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "interests": [
    "Bike lanes, traffic safety and street design",
    "Housing affordability and new apartments near UC Berkeley",
    "Police and public safety budget"
  ],
  "jurisdictions": [
    "berkeley",
    "oakland"
  ]
}' |
apify call mallhw/beinvolved --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mallhw/beinvolved"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/veg1TQLqeIfsKfgR5/builds/vmfbekvYfvgUKl2gn/openapi.json
