Glossary

A reference for the domain concepts and project-specific terms used throughout tagesschau-cli. The Tagesschau domain is German; this glossary gives the term as it appears in the API/CLI alongside the German word where one is in common use.

Quick orientation. This tool wraps the open, no-auth Tagesschau API (tagesschau.de), ARD-aktuell’s structured German news feed. Everything is a read-only GET; there is no key, no upload and no write.


The Tagesschau API

Tagesschau. Germany’s flagship television news programme, produced by ARD-aktuell and broadcast by the public-service broadcaster ARD. Its website tagesschau.de publishes the same editorial output as structured data.

ARD — Arbeitsgemeinschaft der öffentlich-rechtlichen Rundfunkanstalten. The consortium of regional public-service broadcasters in Germany that produces and carries the Tagesschau. ARD-aktuell is the joint newsroom responsible for the content this API serves.

Tagesschau API. The undocumented-but-open REST interface behind tagesschau.de, served under the path prefix /api2u (e.g. https://www.tagesschau.de/api2u/homepage). It needs no authentication and is read-only. Community documentation lives at tagesschau.api.bund.dev.

/api2u. The base path of the API on the host. Every endpoint this client calls is ${baseUrl}/api2u/<resource>/ — the default baseUrl is https://www.tagesschau.de.


Resources & endpoints

The CLI mirrors the API resources; each is one top-level command.

Homepage (/api2u/homepage). The curated front-page feed: the editorially selected top stories plus a regional block. CLI: homepage. Returns a HomepageResult (news, regional).

News (/api2u/news, with a filter /api2u/news/?…). The general news feed, optionally narrowed by region(s) or by a Ressort — not both: the API applies the Ressort and silently ignores the regions, so the CLI and the client refuse the combination before any request. CLI: news. Returns a NewsResult (news, regional, optional nextPage cursor).

Channels (/api2u/channels). The live and broadcast channels (the linear/streaming programme feed). CLI: channels. Returns a ChannelsResult (channels).

Search (/api2u/search/). Full-text search across articles. CLI: search <text>. Returns a SearchResult (searchResults, totalItemCount, the echoed searchText/pageSize/resultPage, and type/details).


Filters, parameters & identifiers

Ressort. The topic/department of a news item — the German newsroom term for a news category. The news endpoint accepts one Ressort via --ressort. The values the client surfaces (RessortValues) are: inland, ausland, wirtschaft, sport, video, investigativ, wissen. The value is a token: it goes out trimmed (normalizeToken); any other value (wrong case, blank, or with an invisible character such as a zero-width space included) is rejected before any request by the client (ressortProblem) and so by the CLI, shown escaped (\u200b).

Region (Bundesland id). A German federal state, identified by a numeric id 1–16 in the order the API documents the Bundesländer. Passed to the news endpoint via the repeatable --region flag; the client joins multiple ids into a single comma-separated regions query value (e.g. ?regions=5,9). The accepted ids are exposed as RegionValues; an id goes out trimmed ( 9 as 9), and any other value (17, 09, 9,10, blank, one with an invisible character) is rejected before any request by the client (regionProblem) and so by the CLI.

searchText. The free-text query for the search endpoint (the positional <text> argument of search). Sent to the API as typed, except that it is normalised to Unicode NFKC (a decomposed umlaut, as pasted from macOS file names or PDFs, otherwise finds nothing) and trimmed (normalizeText; inner spaces stay). The API folds case but matches spellings literally (Strasse finds far fewer hits than Straße); for a text that may be such an ASCII spelling the CLI prints a note on stderr (searchSpellingHint). A blank or missing value — one of nothing but whitespace, invisible characters (a zero-width space, a soft hyphen) or combining marks included — is rejected before any request by the client (searchTextProblem, a TagesschauValidationError) and so by the CLI; so is a text with a control character, a format character (but ZWNJ/ZWJ) or half a character (a lone surrogate), shown escaped (\u200b).

pageSize / resultPage. The search endpoint’s paging parameters, exposed as --page-size / --result-page. pageSize is the number of hits per page and must be >= 1. resultPage is a 0-based page index: 0 (the default) is the first page, and an index past the last page returns no hits. Both are at most 2147483647 (MAX_SEARCH_INT, a 32-bit integer upstream). A value out of range, or not an integer, is rejected before any request by the client (pageSizeProblem / resultPageProblem) and so by the CLI.

nextPage. A URL returned by the news endpoint pointing at the next, older page of results, when present: the same filters plus a date cursor written YYMMDD (…/api2u/news?date=260924&regions=9). Follow it with news --date 260924 and the same filters (library: news({ date: "260924" })); it goes out trimmed, and a malformed or impossible date is rejected before any request.

news / regional. The two item lists returned by the homepage and news feeds: the main feed and the regional block. Each entry is a news item.

News item. A single story or article. Its shape varies by item type (content blocks, image variants, tracking metadata), so the client exposes each item as a faithful raw JsonObject (NewsItem) rather than a partially-guessed type.


Search & API behaviour

No authentication. The Tagesschau API is fully open; this client sends no key, token or cookie. It only issues read-only GET requests.

Rate limiting / transient errors. The API allows about 60 requests an hour. When it answers with a transient status (429 Too Many Requests, 503 Service Unavailable), the client retries automatically, up to --max-retries times (default 2, at most 10). Each retry waits 200 ms × attempt, or the response’s Retry-After (seconds or an HTTP date) when that is longer and at most 30 s (MAX_RETRY_AFTER_MS): Retry-After: 0 never makes the client retry at once. A longer one is not retried; the error surfaces at once and names the wait the server asked for.

Redirects. The client follows up to --max-redirects redirects (default 5). Credentials in --base-url (https://user:pw@host) go out as an Authorization header to the base URL’s own origin (scheme, host and port, as the URL parser reads them; a base URL with a backslash, which ends an http(s) host for the parser, or one not written https:// and the host, which the parser repairs silently (http:host, http:///host), is refused) only: a same-origin redirect keeps them, relative or absolute; on a cross-origin hop the client strips credential-bearing headers (Authorization, X-API-Key, Cookie) before the next request so they can never leak to an unintended host. If the target then answers 401 or 403, the error says the redirect dropped them (for an http: → https: redirect: use an https: base URL). A user name or password in a redirect’s Location is never used.

Response size cap. Responses larger than --max-response-bytes (default 100 MiB; 0 = unlimited) are aborted to defend against memory exhaustion from a hostile or buggy endpoint.


Exit codes

Exit codes. The CLI maps outcomes to process exit codes: 0 success; 4 on a 404 from the API; 1 for any other error (API error, network failure, unexpected); and a non-zero commander code for usage / argument-validation errors. --help/--version return 0.

Log record. Every diagnostic line the CLI writes to stderr: a timestamp, a level (ERROR, WARN, INFO) and a topic tagesschau.<area>, as text (log4j style) or with --log-format jsonl as one JSON object per line. The areas: cli (usage errors, commander’s messages, unexpected errors), api (the API’s answers: an error status, a malformed answer — bad JSON, the wrong shape, an unknown charset, a number a double can’t carry exactly — and the search-spelling note), http (the connection, the cleartext warning, and one WARN per retry before it waits) and output (an answer nested too deeply or too large to print, a failed or cut-short write to stdout). A record is always one line; control characters in it are escaped.

Replaced text. Bytes of an answer that are not valid in its charset, and half characters (lone surrogates), are replaced with U+FFFD and reported in one WARN record of tagesschau.api with the count and the request; the run still succeeds, and the output stays readable for jq.


Library & internals. Terms for the TypeScript client and its internals — TagesschauClient, the request engine, transport, retry/backoff, error types, query builder — live in DEVELOPING.md.

View the source on GitHub →