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/tagesschau-cli

v0.11.0

Published

TypeScript API client and CLI for the open Tagesschau news API (tagesschau.de)

Readme

tagesschau-cli

CI Release npm

Website: English · Deutsch — command reference, guides and API docs

Read German news from your terminal — tagesschau is a command-line tool for ARD-aktuell's keyless Tagesschau API (tagesschau.de): browse the curated front page, filter the news feed by topic or Bundesland, list broadcast channels, and run full-text searches — all as clean JSON you can pipe straight into jq.

  • Works out of the box — no account, no API key, no configuration. Install and read.
  • Clean JSON output — pretty-printed by default, --compact for one-line/scripting.
  • Five commands — homepage, news, article, channels, search.
  • Read-only — every call is a plain GET; nothing is written, nothing is sent except the query.

Want to use this as a TypeScript library or understand how it's built? See DEVELOPING.md.

Install

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

This installs the tagesschau command. Requires Node.js 22.12+.

Check it works:

tagesschau --help

Docker

From 0.10.0 every release is also a container image for linux/amd64 and linux/arm64 on the GitHub Container Registry, made from the same tarball as the npm package. It needs no Node.js and no install:

docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges \
  ghcr.io/maschinenlesbar-org/tagesschau-cli:latest homepage

The image's entrypoint is the program, so the command follows the image name directly; … tagesschau-cli:latest tagesschau homepage works too.

In a container with a memory limit (--memory) the default --max-response-bytes is an eighth of that limit (at most the usual 100 MiB), so an oversized answer is refused with a clear error instead of the container being killed for memory. The largest answers, the homepage and a Bundesland's feed with their full article texts, are about 0.6 MB. The CLI needs at least 12 processes and threads (--pids-limit 12): below that it refuses with an error, and with 4 or fewer Node.js itself hangs before the CLI can check.

latest is the newest release. For scripts, name a release and pin its digest, which the release notes give: …/tagesschau-cli:0.10.0@sha256:<digest>. Each image carries signed build provenance; check it with

gh attestation verify oci://ghcr.io/maschinenlesbar-org/tagesschau-cli:latest \
  --repo maschinenlesbar-org/tagesschau-cli

MCP server

From 0.10.0 the same news is also an MCP server for AI agents, @maschinenlesbar.org/tagesschau-mcp (command tagesschau-mcp, image ghcr.io/maschinenlesbar-org/tagesschau-mcp): six read-only tools, a briefing (breaking news, the top stories as ranked, Ressort feeds newest first), the regional news of Bundesländer by name, how much and how recently a topic is covered, the live streams, a feed with its older pages and an article's text, with the API's traps handled (the sport feed's repeats and missing ressort, one request per state, Berlin and Brandenburg as a pair, no Ressort with a region, the 0-based search page), on stdio or Streamable HTTP. Setup for Claude Code, Claude Desktop and VS Code: MCP.md.

npm i -g @maschinenlesbar.org/tagesschau-mcp
claude mcp add tagesschau -- tagesschau-mcp

The content stays ARD's copyrighted editorial content for private, non-commercial use: every result says so, and running the server as a service for others may need ARD-aktuell's permission (we provide the tool, not the data).

Quickstart

No setup needed — the API needs no key. (Access is keyless, but the content is copyrighted editorial material, not open data — see Data license.) Your first command:

tagesschau homepage

Pull out just the headlines with jq:

tagesschau homepage | jq -r '.news[].title'

Commands

homepage                                     curated front-page feed (top + regional)
news     [--ressort <r>] [--region <id>…]   news feed, optionally filtered
article  <id>                                one item in full (its content blocks)
channels                                     live/broadcast channels
search   <text> [--page-size <n>] [--result-page <n>]   full-text search

homepage

No arguments. Returns a JSON object with a news array (top stories) and a regional array.

news filters

| Flag | Meaning | | --- | --- | | --ressort <ressort> | topic: inland | ausland | wirtschaft | sport | video | investigativ | wissen; one per run (given twice, it is a usage error) | | --region <id> | Bundesland id 1–16 (repeatable — pass multiple times to combine) | | --date <yymmdd> | page cursor: the date= value (YYMMDD) of a previous response's nextPage, to fetch the next, older page; once per run |

Both filters are optional, but they can't be combined: when both are given, the API applies the Ressort and silently ignores the region (every item comes back national, regionId: 0), so the CLI refuses --ressort together with --region (exit 1, no request). For a topic within a state, fetch the region feed and filter it locally (see Usage.md, use case 6). The Glossary decodes every term.

article

One item in full: its content blocks (paragraphs, headings, quotes, boxes), which the feeds leave out. <id> is the item's details URL as a feed or search answer gives it (https://www.tagesschau.de/api2u/inland/….json), or its path under /api2u/ with or without .json (inland/innenpolitik/gipfel-koalition-willige-ukraine-100). Anything else — another host, a query, .. — is refused before any request (exit 1). An item that has been taken down is the API's 404 (exit 4).

tagesschau article "$(tagesschau homepage | jq -r '.news[0].details')" | jq -r '.content[] | select(.type=="text") | .value'

channels

No arguments. Returns a channels array; each entry carries title, streams and image metadata.

search options

| Flag | Meaning | | --- | --- | | --page-size <n> | results per page (1–2147483647) | | --result-page <n> | page index (0–2147483647, 0-based: 0 is the first page) |

The positional <text> argument is required and must not be empty (rejected before any request; a text of nothing but invisible characters, such as a zero-width space, counts as empty). It goes out trimmed and in Unicode NFKC; a control character, a format character (a zero-width space, a soft hyphen, a bidi control) or half a character inside it is refused, shown escaped (\u200b), rather than sent. --ressort, --region and --date are codes: sent trimmed, and refused when blank, holding an invisible character or not one of the known values. The API folds case but matches spellings literally: Strasse finds far fewer hits than Straße, Koeln than Köln. When the text could be such an ASCII spelling (it has ae, oe, ue or ss and no umlaut), the CLI logs a note on stderr (an INFO record of tagesschau.api); search the spelling with ä, ö, ü or ß too.

Common tasks

A few recipes to get going — see Usage.md for the full, use-case-driven set.

# Curated front page, headlines only
tagesschau homepage | jq -r '.news[].title'

# Economy news
tagesschau news --ressort wirtschaft

# Regional news for Niedersachsen (9)
tagesschau news --region 9

# Several Bundesländer at once — Bremen (5) and Niedersachsen (9)
tagesschau news --region 5 --region 9

# Full-text search
tagesschau search "Bundestag"

# Page through search results (0-based: this is the third page)
tagesschau search "Wahl" --page-size 20 --result-page 2

# List live channel titles
tagesschau channels | jq -r '.channels[].title'

Output & scripting

Every command prints pretty JSON to stdout. Errors and diagnostics go to stderr, so piping stdout into jq stays clean.

Each line on stderr is a log record: a timestamp (UTC), a level (ERROR, WARN, INFO) and a topic, the program and the area it comes from (tagesschau.cli for usage errors, tagesschau.api for the API's answers (a malformed answer included) and the search-spelling note, tagesschau.http for the connection, tagesschau.output for an answer too deeply nested or too large to print and a failed or cut-short write to stdout). An error about an answer names the request (GET <url>: the answer is not valid JSON). Text in an answer is never changed silently: bytes that are not valid in its charset and half characters (lone surrogates) are replaced with U+FFFD, so the output stays readable for jq, and a WARN record of tagesschau.api says how many. By default it is written log4j style; --log-format jsonl writes one JSON object per line instead. A record is always one line: a line break, a control character or a bidi control in a message (a server's text, a value you typed) is written as an escape (\n, \u001b, \u202e), so it can neither split a record nor forge another one, nor steer the terminal; a message longer than 4000 characters is cut and ends in … (N more characters):

2026-10-09T14:03:12.481Z WARN  [tagesschau.http] requests to mirror.test are sent unencrypted (http:, not https:)
2026-10-09T14:03:12.902Z INFO  [tagesschau.api] the search matches spellings literally ("Koeln" finds far fewer hits than "Köln", …); if your text stands for ä, ö, ü or ß, search that spelling too.
tagesschau --log-format jsonl search Koeln 2>log.jsonl   # {"ts":"…","level":"INFO","topic":"tagesschau.api","msg":"the search matches …"}
# Date + topic + title digest from the front page
tagesschau homepage | jq -r '.news[] | "\(.date[0:10])  [\(.ressort)]  \(.title)"'

# Count search hits
tagesschau search "Bundestag" | jq '.totalItemCount'

# Titles from a search
tagesschau search "Bundestag" | jq -r '.searchResults[].title'

Use --compact for single-line JSON in pipelines and logs:

tagesschau --compact homepage | jq -c '.news'

--compact is a global option and works before or after the command name.

Every option that takes a value takes one: given twice (--timeout 1000 --timeout 0, --ressort inland --ressort ausland) it is a usage error (--timeout may be given only once., exit 1, nothing sent), never "the last one wins". Only --region repeats (each adds a state); flags such as --compact may repeat.

Exit codes make the CLI easy to use in scripts:

| Code | Meaning | | --- | --- | | 0 | success (also --help / --version) | | 4 | resource not found (404) | | 1 | any other error (API error, network failure, unexpected) | | non-zero | usage / invalid argument (commander parse error) |

A reader that stops early (tagesschau homepage | head -5) ends the run quietly with exit 0; if the reader of stderr goes away, a failed run still keeps its own code.

Troubleshooting

  • command not found: tagesschau — the global npm bin directory isn't on your PATH. Add $(npm prefix -g)/bin to it, or run via npx @maschinenlesbar.org/tagesschau-cli ….
  • Exit 4 / "not found" — the API returned a 404. Every command calls a fixed endpoint, so this usually means a wrong --base-url or a moved API. (An out-of-range region id or an empty search text never reaches the API: the CLI rejects them with exit 1.)
  • Network error / timeout — connectivity or a timeout; the ERROR record of tagesschau.http names the request (GET https://www.tagesschau.de/api2u/news/ failed: Request timed out after 30000ms). Try again, or raise the limit with --timeout 60000.
  • No results / empty arrays — the query matched nothing; broaden the search text, drop --ressort/--region filters, or try a different keyword.
  • Invalid ressort — must be one of inland, ausland, wirtschaft, sport, video, investigativ, wissen (exact lowercase string).
  • --page-size / --result-page rejected — --page-size must be an integer >= 1; --result-page is a 0-based page index and must be >= 0. Both are at most 2147483647 (the API answers a larger value with a bare 400 Bad Request).

Global options

These apply to every command and may be given before or after the command name:

| Option | Description | | --- | --- | | -V, --version | Print the version number | | -h, --help | Show help for the program or a command | | --compact | Print JSON on a single line instead of pretty-printed | | --log-format <format> | How errors, warnings and notes are written to stderr: text (default; log4j style, 2026-10-09T14:03:12.481Z WARN [tagesschau.http] …) or jsonl (one JSON object per line: ts, level, topic, msg). stdout is not affected | | --base-url <url> | API base URL (default https://www.tagesschau.de); an http(s) URL written https:// and the host (http:host or http:///host, which the URL parser repairs silently, is refused), optionally with a path prefix, without a query (?), fragment (#), backslash (\ ends an http(s) host for the URL parser; requests go to the host as the parser reads it), whitespace or control characters. Credentials (https://user:pw@host) are sent as Basic auth, to that origin only (not across a redirect to another host or scheme); write a literal % in them as %25. A plain http: base URL to a remote host logs one WARN record of tagesschau.http on stderr (… sent unencrypted to <host> (http:, not https:)) before the first request (naming the base URL's credentials when it carries any, never printing them); loopback hosts (localhost, 127.x, ::1) don't warn, and stdout and the exit code are unchanged | | --timeout <ms> | Time limit per request in milliseconds, reading the whole response included (default 30000; 0 disables; at most 2147483647) | | --user-agent <ua> | User-Agent header value (not blank; no control characters or characters above U+00FF) | | --max-retries <n> | Retries for transient 429/503 responses, 0–10 (default 2); each waits 200 ms × attempt, or the server's Retry-After when that is longer (up to 30 s; a longer one is not retried, and the error names the wait). Each retry logs one WARN record of tagesschau.http before it waits (HTTP 503 from host: retry 1 of 3 in 2 s) | | --max-redirects <n> | Max HTTP redirects to follow, 0–20 (default 5) | | --max-response-bytes <n> | Cap response body size in bytes (0 = unlimited; default 100 MiB) |

Learn more

  • Usage.md — full use-case-driven cookbook.
  • GLOSSARY.md — every command, flag and domain term explained.
  • DEVELOPING.md — TypeScript library usage, architecture, testing, CI.
  • MCP.md — the MCP server: tools, setup, options.
  • SKILLS.md — Claude Code Agent Skills bundled with this repo (news briefing, regional news, topic tracker, live streams), installable as a plugin.

Data license

This CLI is a client — it accesses data it does not own or redistribute. The upstream data is © its provider and licensed separately from this tool's code. See DATA_LICENSE.md.

[!CAUTION] Not open data — copyrighted editorial content (ARD-aktuell / NDR). Private, non-commercial use only; do not republish or redistribute. Rate limit 60 requests/hour.

License

Dual-licensed — use it under either:

  • AGPL-3.0-or-later (default, free). Note the AGPL's §13 network clause: if you run a modified version as a network service, you must offer that modified source to the service's users.
  • Commercial license (paid), for closed-source / proprietary or SaaS use without the AGPL's obligations.

See LICENSING.md for details, and CONTRIBUTING.md for the contribution policy (this project does not accept external code contributions). Commercial enquiries: [email protected].