npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maschinenlesbar.org/abgeordnetenwatch-cli

v0.0.5

Published

TypeScript API client and CLI for the open abgeordnetenwatch.de parliamentary data API (politicians, mandates, votes, committees, side jobs)

Downloads

495

Readme

abgeordnetenwatch-cli

CI Release npm

Query Germany's parliamentary-monitoring data — politicians, mandates, votes, committees and disclosed side jobs — from your terminal. abgeordnetenwatch is a command-line tool and TypeScript client for the open abgeordnetenwatch.de API v2: list any of 18 entity collections, filter and sort them, fetch single records, count matches, and pipe the JSON straight into jq.

  • Works out of the box — no account, no API key, no configuration.
  • Clean JSON output — pretty-printed by default, --compact for scripting.
  • Four commandslist, get, count, entities.
  • Read-only, open data — the public API needs no credentials, and the data is CC0 1.0 (public domain); see DATA_LICENSE.md.

Want to use this as a TypeScript library or understand how it's built? See DEVELOPING.md. The full API reference lives in openapi.yaml.

Install

npm i -g @maschinenlesbar.org/abgeordnetenwatch-cli

This installs the abgeordnetenwatch command. Requires Node.js 20+.

abgeordnetenwatch --help
abgeordnetenwatch entities          # the 18 collections you can query

Quickstart

# How many female politicians are in the database?
abgeordnetenwatch count politicians sex=f

# Five politicians born after 1990, sorted by surname
abgeordnetenwatch list politicians 'year_of_birth[gt]=1990' \
  --sort-by last_name --range-end 5 --data-only

# Fetch one party
abgeordnetenwatch get parties 2 --data-only

# Every individual vote in poll 6569 (the data array only)
abgeordnetenwatch list votes poll=6569 --data-only | jq '.[].vote' | sort | uniq -c

Commands

| Command | What it does | |---|---| | list <entity> [filters...] | List a collection, with optional filters, --sort-by/--sort-direction, and --range-start/--range-end paging. | | get <entity> <id> | Fetch a single entity by id. | | count <entity> [filters...] | Print { entity, total } — the number of matches. | | entities | List the 18 available entity collections. |

--data-only (on list/get) prints just the data payload instead of the full { meta, data } envelope.

Filtering

Add filters as key=value arguments after the entity:

  • Equality: sex=f, year_of_birth=1980

  • Related entity by id: politician=184945, poll=6569

  • Comparison operatorsfield[op]=value with op one of eq, ne, gt, gte, lt, lte, cn (contains), sw (starts-with): 'year_of_birth[gt]=1990', 'last_name[sw]=Mü'

    (Quote any filter containing [ ] so your shell doesn't glob it.)

Paging

--range-end is the page size (number of items). The API honours it up to 1000; a value above 1000 is ignored and the API falls back to its default page size of 100. Use --range-start to offset into the next page; count reports the true total.

Entities

parliaments, parliament-periods, politicians, candidacies-mandates, committees, committee-memberships, polls, votes, parties, fractions, election-program, electoral-lists, constituencies, sidejobs, sidejob-organizations, topics, cities, countries.

See openapi.yaml for every field of every entity.

Global options

--base-url <url>, --timeout <ms>, --user-agent <ua>, --max-retries <n> (transient 429/503), --max-response-bytes <n>, --compact.

The service rate-limits bursts with HTTP 429; the client retries these automatically. Sending a descriptive --user-agent is appreciated by the provider.

Exit codes

0 success · 1 runtime/network/server error · 2 usage error (unknown entity, bad option/filter) · 4 HTTP 404 (unknown collection path).

Note: the API returns HTTP 500 (not 404) for a missing id; the CLI surfaces the reason from meta.status_message and exits 1.

License

Code: AGPL-3.0-or-later or a commercial license. Data: CC0 1.0 by abgeordnetenwatch.de — see DATA_LICENSE.md.