Global law
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
NY State bills, laws, members, committees, calendars and transcripts from NYS Open Legislation
Listen sind nach einem Nutzungswert (von 100) aus diesen Teilen sortiert
| Beliebtheit | 9/80 | GitHub-Sterne oder wöchentliche Downloads: der größere Wert zählt 60, der kleinere 20 |
|---|---|---|
| Aktualität | 12/12 | Volle Punkte für Release oder Codeänderung in 30 Tagen |
| Antwortet noch | 0/8 | Der Cloud-Endpoint antwortete bei der letzten Prüfung |
| Nutzungswert | 21/100 |
Qualität: 3/3 Basisprüfungen bestanden (angezeigt, nicht zur Sortierung) · Schwung: Noch keine Daten (Nur im Tab Im Trend verwendet)
Wähle die KI-App, die du nutzt, und kopiere die Einstellungen.
Mit einem Satz von deiner KI installieren lassen
Installiere bitte NYS Open Legislation. Folge https://mcp.popnx.com/i/betanyc-nys-openlegislation-mcp.md, zeig mir die Befehle und warte auf mein OK, bevor du sie ausführst.Füge ihn in eine KI ein, die auf deinem Rechner arbeitet (z. B. Claude Code oder Cursor). Sie liest unsere Schritte, zeigt dir die Befehle und wartet auf dein OK. Kein Schlüssel, keine Anmeldung. · Vollständigen Text ansehen
3/3 Prüfungen bestanden · Läuft auf deinem Computer · ✓ Befehle geprüft am 14. Nov. 2026
Zuerst: Welche KI nutzt du?
Wähle deine App, dann erscheinen die Schritte unten.
Klappt mit Claude, aber erst etwas vorbereiten
Installiere zuerst Node.js auf deinem Computer (nur einmal) · Nur in der Claude-App für den Computer (Windows oder Mac), nicht im Web oder auf dem Handy
Kopiere diese Nachricht in einen Claude-Chat. Die KI prüft deinen Rechner, sagt dir, welche Datei sie ändert, und wartet jedes Mal auf dein OK.
Installiere bitte den MCP server NYS Open Legislation für Claude auf diesem Rechner, in dieser Reihenfolge: 1) Prüfe Node.js mit node -v. Fehlt es, sag mir, dass ich es von https://nodejs.org/en/download installiere; installiere es nicht selbst. 2) Verwende nur diese Konfiguration (von PopNx MCP geprüft): { "mcpServers": { "nys-openlegislation": { "command": "npx", "args": [ "-y", "@betanyc/nys-openlegislation-mcp" ] } } } 3) Nenne mir den vollständigen Pfad der Datei, die du änderst, oder den Befehl, den du ausführst, und warte auf mein OK. 4) Kein Schlüssel nötig. 5) Führe das Vereinbarte aus und prüfe, dass die Tools von NYS Open Legislation wirklich erscheinen.Diese Nachricht enthält keinen Schlüssel. Wird einer gebraucht, bittet dich die KI, ihn selbst in die Datei oder das Feld der App einzufügen.
Schon installiert? Zuerst prüfen · Öffne das Terminal, gib diesen Befehl ein und drücke Enter
node -vMac: ⌘ + Leertaste drücken, Terminal eingeben, Enter
Windows: Start öffnen, Windows PowerShell eingeben, dann Öffnen
Noch nicht installiert: Öffne die offizielle Download-Seite, wähle die LTS-Version und den Klick-Installer: .pkg auf dem Mac · .msi unter Windows. Doppelklicken und bis zum Ende durchklicken. Kein curl-Befehl nötig
Download-Seite von Node.js öffnen ↗
Danach das Terminal schließen, neu öffnen und denselben Befehl erneut ausführen. Es muss eine Versionsnummer erscheinen: node -v
Einmal installieren, gilt für alles, was Node.js braucht
SettingsDeveloperEdit Config
{
"mcpServers": {
"nys-openlegislation": {
"command": "npx",
"args": [
"-y",
"@betanyc/nys-openlegislation-mcp"
]
}
}
}Nutze NYS Open Legislation und sag mir, was du für mich tun kannst; zeig mir dann eine Sache✓ Wenn Claude sagt, dass es NYS Open Legislation nutzt, oder ein Werkzeug von NYS Open Legislation in der Antwort zeigt, bist du verbunden
Der Befehl oben funktioniert auch ohne diese Werte. Füge sie nur hinzu, wenn du etwas ändern willst, nach der Beschreibung des Autors.
NYS_LEGISLATION_API_KEY Kostenloser API-Schlüssel für NYS Open Legislation, der für Live-Daten benötigt wird. Nur optional, wenn bereits ein lokaler Korpus vorhanden ist. NYS_CORPUS_DB Pfad zur optionalen lokalen Korpus-Datenbank. Standard ist data/corpus.db im Paket. Beschreibungen automatisch übersetzt; Variablennamen bleiben wie im Original. Im Zweifel das Original ansehen.
Menünamen am 11. Nov. 2026 mit der Hilfe von Anthropic abgeglichen · dein Bildschirm kann je nach App-Version leicht abweichen
ChatGPT kann NYS Open Legislation noch nicht verbinden
NYS Open Legislation läuft auf deinem Computer, aber ChatGPT verbindet nur Server, die im Web laufen
A · Eine App nutzen, die NYS Open Legislation verbinden kann
B · Andere in Recht & Behördendaten, die mit ChatGPT funktionieren
Aus den meistgenutzten derselben Kategorie, nur solche, die per Adresse ohne Schlüssel verbinden
Klappt mit Claude Code, aber erst etwas vorbereiten
Installiere zuerst Node.js auf deinem Computer (nur einmal)
Kopiere diese Nachricht in einen Claude Code-Chat. Die KI prüft deinen Rechner, sagt dir, welche Datei sie ändert, und wartet jedes Mal auf dein OK.
Installiere bitte den MCP server NYS Open Legislation für Claude Code auf diesem Rechner, in dieser Reihenfolge: 1) Prüfe Node.js mit node -v. Fehlt es, sag mir, dass ich es von https://nodejs.org/en/download installiere; installiere es nicht selbst. 2) Verwende nur diese Konfiguration (von PopNx MCP geprüft): claude mcp add --scope user nys-openlegislation -- npx -y @betanyc/nys-openlegislation-mcp 3) Nenne mir den vollständigen Pfad der Datei, die du änderst, oder den Befehl, den du ausführst, und warte auf mein OK. 4) Kein Schlüssel nötig. 5) Führe das Vereinbarte aus und prüfe, dass die Tools von NYS Open Legislation wirklich erscheinen.Diese Nachricht enthält keinen Schlüssel. Wird einer gebraucht, bittet dich die KI, ihn selbst in die Datei oder das Feld der App einzufügen.
Schon installiert? Zuerst prüfen · Öffne das Terminal, gib diesen Befehl ein und drücke Enter
node -vMac: ⌘ + Leertaste drücken, Terminal eingeben, Enter
Windows: Start öffnen, Windows PowerShell eingeben, dann Öffnen
Noch nicht installiert: Öffne die offizielle Download-Seite, wähle die LTS-Version und den Klick-Installer: .pkg auf dem Mac · .msi unter Windows. Doppelklicken und bis zum Ende durchklicken. Kein curl-Befehl nötig
Download-Seite von Node.js öffnen ↗
Danach das Terminal schließen, neu öffnen und denselben Befehl erneut ausführen. Es muss eine Versionsnummer erscheinen: node -v
Einmal installieren, gilt für alles, was Node.js braucht
Mac: Command+Leertaste drücken und Terminal tippen · Windows: PowerShell öffnen
claude mcp add --scope user nys-openlegislation -- npx -y @betanyc/nys-openlegislation-mcpNYS Open Legislation sollte in der Liste als verbunden erscheinen
Nutze NYS Open Legislation und sag mir, was du für mich tun kannst; zeig mir dann eine Sache✓ Wenn Claude Code sagt, dass es NYS Open Legislation nutzt, oder ein Werkzeug von NYS Open Legislation in der Antwort zeigt, bist du verbunden
Der Befehl oben funktioniert auch ohne diese Werte. Füge sie nur hinzu, wenn du etwas ändern willst, nach der Beschreibung des Autors.
NYS_LEGISLATION_API_KEY Kostenloser API-Schlüssel für NYS Open Legislation, der für Live-Daten benötigt wird. Nur optional, wenn bereits ein lokaler Korpus vorhanden ist. NYS_CORPUS_DB Pfad zur optionalen lokalen Korpus-Datenbank. Standard ist data/corpus.db im Paket. Beschreibungen automatisch übersetzt; Variablennamen bleiben wie im Original. Im Zweifel das Original ansehen.
Menünamen am 11. Nov. 2026 mit der Hilfe von Anthropic abgeglichen · dein Bildschirm kann je nach App-Version leicht abweichen
Klappt mit Cursor, aber erst etwas vorbereiten
Installiere zuerst Node.js auf deinem Computer (nur einmal)
Kopiere diese Nachricht in einen Cursor-Chat. Die KI prüft deinen Rechner, sagt dir, welche Datei sie ändert, und wartet jedes Mal auf dein OK.
Installiere bitte den MCP server NYS Open Legislation für Cursor auf diesem Rechner, in dieser Reihenfolge: 1) Prüfe Node.js mit node -v. Fehlt es, sag mir, dass ich es von https://nodejs.org/en/download installiere; installiere es nicht selbst. 2) Verwende nur diese Konfiguration (von PopNx MCP geprüft): { "mcpServers": { "nys-openlegislation": { "command": "npx", "args": [ "-y", "@betanyc/nys-openlegislation-mcp" ] } } } 3) Nenne mir den vollständigen Pfad der Datei, die du änderst, oder den Befehl, den du ausführst, und warte auf mein OK. 4) Kein Schlüssel nötig. 5) Führe das Vereinbarte aus und prüfe, dass die Tools von NYS Open Legislation wirklich erscheinen.Diese Nachricht enthält keinen Schlüssel. Wird einer gebraucht, bittet dich die KI, ihn selbst in die Datei oder das Feld der App einzufügen.
Schon installiert? Zuerst prüfen · Öffne das Terminal, gib diesen Befehl ein und drücke Enter
node -vMac: ⌘ + Leertaste drücken, Terminal eingeben, Enter
Windows: Start öffnen, Windows PowerShell eingeben, dann Öffnen
Noch nicht installiert: Öffne die offizielle Download-Seite, wähle die LTS-Version und den Klick-Installer: .pkg auf dem Mac · .msi unter Windows. Doppelklicken und bis zum Ende durchklicken. Kein curl-Befehl nötig
Download-Seite von Node.js öffnen ↗
Danach das Terminal schließen, neu öffnen und denselben Befehl erneut ausführen. Es muss eine Versionsnummer erscheinen: node -v
Einmal installieren, gilt für alles, was Node.js braucht
Nutze NYS Open Legislation und sag mir, was du für mich tun kannst; zeig mir dann eine Sache✓ Wenn Cursor sagt, dass es NYS Open Legislation nutzt, oder ein Werkzeug von NYS Open Legislation in der Antwort zeigt, bist du verbunden
Der Befehl oben funktioniert auch ohne diese Werte. Füge sie nur hinzu, wenn du etwas ändern willst, nach der Beschreibung des Autors.
NYS_LEGISLATION_API_KEY Kostenloser API-Schlüssel für NYS Open Legislation, der für Live-Daten benötigt wird. Nur optional, wenn bereits ein lokaler Korpus vorhanden ist. NYS_CORPUS_DB Pfad zur optionalen lokalen Korpus-Datenbank. Standard ist data/corpus.db im Paket. Beschreibungen automatisch übersetzt; Variablennamen bleiben wie im Original. Im Zweifel das Original ansehen.
Menünamen am 11. Nov. 2026 mit der Hilfe von Cursor abgeglichen · dein Bildschirm kann je nach App-Version leicht abweichen
Klappt mit VS Code, aber erst etwas vorbereiten
Installiere zuerst Node.js auf deinem Computer (nur einmal)
Kopiere diese Nachricht in einen VS Code-Chat. Die KI prüft deinen Rechner, sagt dir, welche Datei sie ändert, und wartet jedes Mal auf dein OK.
Installiere bitte den MCP server NYS Open Legislation für VS Code auf diesem Rechner, in dieser Reihenfolge: 1) Prüfe Node.js mit node -v. Fehlt es, sag mir, dass ich es von https://nodejs.org/en/download installiere; installiere es nicht selbst. 2) Verwende nur diese Konfiguration (von PopNx MCP geprüft): { "servers": { "nys-openlegislation": { "type": "stdio", "command": "npx", "args": [ "-y", "@betanyc/nys-openlegislation-mcp" ] } } } 3) Nenne mir den vollständigen Pfad der Datei, die du änderst, oder den Befehl, den du ausführst, und warte auf mein OK. 4) Kein Schlüssel nötig. 5) Führe das Vereinbarte aus und prüfe, dass die Tools von NYS Open Legislation wirklich erscheinen.Diese Nachricht enthält keinen Schlüssel. Wird einer gebraucht, bittet dich die KI, ihn selbst in die Datei oder das Feld der App einzufügen.
Schon installiert? Zuerst prüfen · Öffne das Terminal, gib diesen Befehl ein und drücke Enter
node -vMac: ⌘ + Leertaste drücken, Terminal eingeben, Enter
Windows: Start öffnen, Windows PowerShell eingeben, dann Öffnen
Noch nicht installiert: Öffne die offizielle Download-Seite, wähle die LTS-Version und den Klick-Installer: .pkg auf dem Mac · .msi unter Windows. Doppelklicken und bis zum Ende durchklicken. Kein curl-Befehl nötig
Download-Seite von Node.js öffnen ↗
Danach das Terminal schließen, neu öffnen und denselben Befehl erneut ausführen. Es muss eine Versionsnummer erscheinen: node -v
Einmal installieren, gilt für alles, was Node.js braucht
VS Code fragt nach einer Bestätigung; klicke Install
Nutze NYS Open Legislation und sag mir, was du für mich tun kannst; zeig mir dann eine Sache✓ Wenn VS Code sagt, dass es NYS Open Legislation nutzt, oder ein Werkzeug von NYS Open Legislation in der Antwort zeigt, bist du verbunden
Der Befehl oben funktioniert auch ohne diese Werte. Füge sie nur hinzu, wenn du etwas ändern willst, nach der Beschreibung des Autors.
NYS_LEGISLATION_API_KEY Kostenloser API-Schlüssel für NYS Open Legislation, der für Live-Daten benötigt wird. Nur optional, wenn bereits ein lokaler Korpus vorhanden ist. NYS_CORPUS_DB Pfad zur optionalen lokalen Korpus-Datenbank. Standard ist data/corpus.db im Paket. Beschreibungen automatisch übersetzt; Variablennamen bleiben wie im Original. Im Zweifel das Original ansehen.
Menünamen am 11. Nov. 2026 mit der Hilfe von VS Code abgeglichen · dein Bildschirm kann je nach App-Version leicht abweichen
Claude Code
claude mcp add --scope user nys-openlegislation -- npx -y @betanyc/nys-openlegislation-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"nys-openlegislation": {
"command": "npx",
"args": [
"-y",
"@betanyc/nys-openlegislation-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"nys-openlegislation": {
"command": "npx",
"args": [
"-y",
"@betanyc/nys-openlegislation-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"nys-openlegislation": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@betanyc/nys-openlegislation-mcp"
]
}
}
}NYS_LEGISLATION_API_KEY geheim envNYS_CORPUS_DB envBeschreibungen automatisch übersetzt; Variablennamen bleiben wie im Original. Im Zweifel das Original ansehen.
Diese Einstellungen werden aus dem Registry-Eintrag des Entwicklers erzeugt. Wenn in der README etwas anderes steht, folge der README.
Basierend darauf, wie sich dieser Server verbindet, und auf der eigenen Doku jeder App, geprüft am 10. Nov. 2026.
Laufen auf deinem Computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Läuft auf deinem Computer; die Tool-Liste erscheint nach der Installation in deiner KI-App.
Wir prüfen Informationen, die jeder sehen kann; den Code haben wir nicht gelesen. Checks, die nicht zutreffen, werden nicht mitgezählt. · Geprüft am 19. Nov. 2026
Der Registry-Name wurde mit dem GitHub-Konto BetaNYC bestätigt, dem das Repo gehört
Code zuletzt geändert: vor 3 Tagen
Nutzt MIT
Dieser Server läuft auf deinem Computer; es gibt keinen Endpunkt im Internet
Läuft auf deinem Computer und nutzt stattdessen lokale Einstellungen
Läuft auf deinem Computer; Tool-Listen können wir nur von Endpunkten im Internet lesen
Keine Einträge auf OSV.dev für @betanyc/nys-openlegislation-mcp@2.6.0
Prüft nur diese Paketversion, nicht alle Abhängigkeiten · geprüft 15. Nov. 2026
Wenn du das gebaut hast, füge diesen Code in dein README ein. Das Badge verlinkt auf diese Seite.
[](https://mcp.popnx.com/en/servers/betanyc-nys-openlegislation-mcp)Fragen, Tipps teilen oder melden, dass etwas nicht geht. Sortiert nach „hilfreich“.
Noch keine Beiträge. Stell die erste Frage oder teile einen Tipp.
Beiträge hier stammen von Nutzern, nicht vom PopNx-Team.
Noch keine Bewertungen
Verglichen mit allen aktiven Servern dieser Kategorie in der Registry. Sterne zählen nur, wenn dem Herausgeber das Repo gehört.
Er hat 3 von 3 zutreffenden Basischecks bestanden. Den Code haben wir nicht gelesen. Bevor du einen Schlüssel oder Token hinzufügst, sieh nach, welche Zugriffe der Server verlangt, und nutze einen Schlüssel, der nur die Berechtigungen hat, die du brauchst.
Die Registry nennt keinen erforderlichen Schlüssel, manche Server bitten dich aber bei der ersten Nutzung, dich anzumelden.
Er läuft auf deinem Computer. Deine KI-App startet ihn bei Bedarf, und die Daten laufen nicht über die Server des Entwicklers (außer der Server ruft selbst einen Onlinedienst auf).
Das GitHub-Repo wurde zuletzt vor 3 Tagen geändert, und die neueste Version (2.6.0) kam vor 5 Tagen in die Registry.
Apps, die MCP unterstützen, etwa Claude Desktop, Claude Code, Cursor und VS Code. Außerdem brauchst du Node.js auf deinem Computer.
In derselben Kategorie: Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector
Gleiche Kategorie, andere Entwickler, Befehle bereits geprüft. Offizielle zuerst, dann nach Sternen.
So liest du eine Karte:↓ Downloads pro Wochei★ GitHub-SterneiDrei Säulen: Bewertungen · Checks · NutzungiAktualisiert = neueste Version in der Registry veröffentlichti
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
Search French-language and European case law and French legal texts (codes, statutes, treaties).
Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
| Dieser NYS Open Legislation | Global law | Open Legal Data (Germany) | LibreJustice | InfraNode | Fedlex Connector | |
|---|---|---|---|---|---|---|
| Läuft wo | Wird auf deinem Rechner installiert | Läuft in der Cloud, keine Installation | Läuft in der Cloud, keine Installation | Läuft in der Cloud, keine Installation | Läuft in der Cloud, keine Installation | Läuft in der Cloud, keine Installation |
| Braucht Schlüssel | Nein | Nein | Nein | Nein | Nein | Nein |
| Mit + in Claude hinzufügen | Nein | Nein | Nein | Nein | Nein | Nein |
| Basisprüfungen | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 |
| Lizenz | MIT | NOASSERTION | MIT | Apache-2.0 | Apache-2.0 | MIT |
| Preis | Keine Kosten im Register | Keine Kosten im Register | Keine Kosten im Register | Keine Kosten im Register | Keine Kosten im Register | Keine Kosten im Register |
Unverändert aus dem Repo des Entwicklers übernommen. PopNx MCP hat den Inhalt weder geprüft noch empfiehlt es ihn. HTML, Bilder und Skripte wurden entfernt. Links führen von dieser Website weg.
An MCP server for the NYS Open Legislation API, maintained by the New York State Senate. Gives AI assistants direct access to the full NYS legislative record — bills, laws, members, committees, calendars, agendas, and transcripts — covering 150,000+ bills and resolutions dating back to 2009.
Built by BetaNYC as part of a suite of civic data MCP servers for New York.
[What's changed](WHATS-CHANGED.md): new tools, corrections and other changes a reader would notice, newest first. Developer detail is in CHANGELOG.md.
| Resource | Tools |
|---|---|
| Bills | Search, get by print number, list by session, get votes, track updates |
| Laws | List all law bodies, browse law trees, retrieve section text |
| Members | List and search Senate and Assembly members |
| Committees | List committees, get details and meeting history |
| Floor Calendars | List and get Senate floor calendars |
| Agendas | List and get committee agendas with vote records |
| Transcripts | Floor session and public hearing transcripts |
| Updates | Aggregate change feed across all content types |
| Search | Full-text ElasticSearch within a content type (bills, laws, agendas, calendars, transcripts, hearings) |
| About this server | What changed in it, who built it, and where its data comes from |
A free API key is strongly recommended, and required for live data. Get one from the NYS Open Legislation portal and set it as the NYS_LEGISLATION_API_KEY environment variable:
NYS_LEGISLATION_API_KEY (e.g. export NYS_LEGISLATION_API_KEY="your-api-key"), or pass it in your MCP client's env block — see InstallationWithout a key, the server still starts as long as a local corpus exists, and serves it in local-only mode. Results are labelled with the corpus sync date and a note saying what refreshes them. The 5 tools with no local coverage (get_bill_votes, get_bill_updates, get_committee_meetings, get_updates, search) return a message naming the key rather than failing opaquely, and a lookup that finds nothing in the corpus says so explicitly — offline, "not in the corpus" and "does not exist" are not the same claim.
The server refuses to start only when both the key and the corpus are missing.
Bill URLs returned by this server point to the public nysenate.gov website — no login required.
Requires Node.js 20 or newer.
No global install needed. Add to your Claude Desktop config and npx handles the rest.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": { "nys-openlegislation": { "command": "npx", "args": ["-y", "@betanyc/nys-openlegislation-mcp"], "env": { "NYS_LEGISLATION_API_KEY": "your-api-key-here" } } } }
Restart Claude Desktop. The server starts automatically.
npm install -g @betanyc/nys-openlegislation-mcp
Then in your MCP config:
{
"mcpServers": { "nys-openlegislation": { "command": "nys-openlegislation-mcp", "env": { "NYS_LEGISLATION_API_KEY": "your-api-key-here" } } } }
By default the server queries the live NYS Open Legislation API on every request. If you run large workloads — bulk research, repeated searches, or offline use — you can build a local SQLite corpus that the server queries first, falling back to the API only on a cache miss.
The corpus is also what makes the server usable without an API key: with a corpus present and no key, it starts in local-only mode instead of exiting. Building the corpus in the first place does require a key (npm run sync calls the live API), so this is a "borrow a colleague's corpus" or "key expired" path, not a way to skip registration entirely. The corpus location defaults to data/corpus.db in the package and can be overridden with NYS_CORPUS_DB.
The fetch and sync scripts (scripts/) are not included in the npm package — building a local corpus requires a git clone:
git clone https://github.com/BetaNYC/nys-openlegislation-mcp.git
cd nys-openlegislation-mcp npm install
better-sqlite3 is an optional dependency. The server works without it — it just means every request goes to the live API. If its native build was skipped, install it explicitly with npm install better-sqlite3.
NYS_LEGISLATION_API_KEY=your-key node scripts/fetch-data.js
Options:
| Flag | Default | Description |
|---|---|---|
--start-year=YYYY | 2009 | Earliest session year to fetch |
--types=bills,laws,... | all types | Comma-separated list: bills,laws,members,committees,agendas,calendars,transcripts |
--include-law-text | off | Fetch full text of every law section (large — adds significant download time) |
--include-transcript-text | off | Fetch full text of floor and hearing transcripts (very large) |
--delay-ms=N | 150 | Delay between API calls in ms |
--dry-run | off | Print what would be fetched without writing |
The corpus lands in data/corpus.db (override the location with the NYS_CORPUS_DB environment variable — both the server and the scripts honor it). A full fetch without law or transcript text takes 2–6 hours depending on your start year and network speed. The --types flag lets you fetch only what you need.
NYS_LEGISLATION_API_KEY=your-key node scripts/sync.js
Options:
| Flag | Default | Description |
|---|---|---|
--from=YYYY-MM-DDTHH:MM:SS | last sync time | Override the start, in New York local time (the API's own convention) |
--delay-ms=N | 150 | Delay between API calls in ms |
--dry-run | off | Print what would be synced without writing |
The Senate's API reads every time as New York local time. Each sync asks for the changes from where the last one ended up to two minutes ago, and saves that end time with its New York offset (for example 2026-11-13T16:58:00-05:00). A copy last synced by a version before 2.7.0 saved UTC times with no zone, which made each sync skip the changes made in the four or five hours after the previous one; the next sync reads such a value as UTC and starts from the right time. To pick up changes an older version missed, run the sync once with --from set to the day you first built the copy. fetch-data.js never moves an existing sync time forward, so a partial load such as --types=committees does not make the next sync skip anything.
Cron example (nightly at 2am):
0 2 * * * NYS_LEGISLATION_API_KEY=your-key node /path/to/scripts/sync.js >> /var/log/nys-sync.log 2>&1
When data/corpus.db exists and better-sqlite3 is available, every tool handler queries the local DB first. If the record is found locally, it returns immediately without an API call, annotated with "source": "local corpus (synced )" so staleness is visible. If the record is not found — or the local result is empty (0 items) — it falls through to the live API transparently; an empty local slice never shadows live data.
Law section text and transcript full text fall back to the API unless --include-law-text / --include-transcript-text were used during the initial fetch.
AGENDA / BILL / CALENDAR / LAW content types — committee changes never appear in it. Re-run fetch-data.js --types=committees periodically (it is a quick fetch) to refresh committee data.fetch-data.js for those periodically.npm run sync and fetch-data.js (no extra API calls). A corpus built before this change gains the members.full_name column on its next sync. A member who has never prime-sponsored a bill in the corpus has no full name locally.items and size only; the total, offsetStart, offsetEnd and limit fields come from the live API.Every tool rejects parameters it does not declare, rather than ignoring them. Passing an undeclared key returns an error naming both the offending key and the parameters that tool accepts. This is deliberate: silently dropping a filter returns real, correctly-sourced data that answers a *different* question, and nothing in the response would signal it.
| Tool | Description |
|---|---|
search_bills | Full-text bill search with ElasticSearch syntax, optional session year filter (omit it to search all sessions; all sessions in the local corpus, when it answers) |
get_bill | Get a specific bill by print number (e.g. S1234) and session year |
list_bills | List bills introduced in a session year |
get_bill_votes | Get committee and floor vote records for a bill (the votes block of the bill record) |
get_bill_updates | Feed of bill changes within a date range |
| Tool | Description |
|---|---|
list_laws | List all NYS law bodies (Education Law, Labor Law, etc.) |
get_law_tree | Get table of contents for a law body |
get_law_section | Get text of a specific law section |
Citation links. Law records from get_law_section, and search results of type: "laws", carry a nysenate_url field: a link a person can open on nysenate.gov. It is populated only for `SECTION` and `ARTICLE` documents, the two shapes checked in a browser on 2026-08-02 (…/laws/EDN/6233, …/laws/EDN/A125). It is null for every other type, including CHAPTER and TITLE, because their URL shape has not been verified, and a wrong link is worse than none. If the field is populated, use it. If it is null, cite the law and section in plain text. Note that www.nysenate.gov returns 403 to curl, so check a new doc type in a browser before adding it.
| Tool | Description |
|---|---|
list_members | List Senate or Assembly members for a session year |
get_member | Get a specific legislator by member ID; errors if the member sits in the other chamber from chamber |
search_members | Search legislators by name; every row carries chamber, and fullName where known (a locally served member who has never prime-sponsored a bill has none). Defaults to the current session. Served from the local corpus when present (works without a key) |
| Tool | Description |
|---|---|
list_committees | List Senate or Assembly committees |
get_committee | Get committee details — chair, schedule, location |
get_committee_meetings | Get meeting history and bills considered |
| Tool | Description |
|---|---|
list_calendars | List Senate floor calendars for a year |
get_calendar | Get a specific floor calendar with bill lists |
list_agendas | List committee agendas for a year |
get_agenda | Get a specific agenda with vote records |
| Tool | Description |
|---|---|
list_floor_transcripts | List Senate floor session transcripts |
get_floor_transcript | Get a specific floor session transcript |
list_hearing_transcripts | List public hearing transcripts |
| get_hearing_transcript | Get a specif