NAME
WWW::Bund - Perl client for German Federal Government APIs (bund.dev)
VERSION
version 0.001
SYNOPSIS
use WWW::Bund;
my $bund = WWW::Bund->new;
# Generic interface
my $data = $bund->call('autobahn', 'autobahn_roads');
# Discovery
my $apis = $bund->list;
my $results = $bund->search('autobahn');
my $info = $bund->info('autobahn');
# Type-safe API adapters
my $roads = $bund->autobahn->roads;
my $webcams = $bund->autobahn->webcams('A7');
my $warnings = $bund->nina->warnings('091620000000');
my $stations = $bund->pegel_online->stations;
DESCRIPTION
WWW::Bund provides a Perl client for German Federal Government APIs available through https://bund.dev. It includes 16 implemented APIs with 78 endpoints, covering traffic, weather, news, water levels, parliament data, and more.
The module provides both a generic call interface and type-safe API adapters for commonly-used APIs. All responses are automatically cached on disk with configurable TTLs, and rate-limiting is enforced per API.
Available APIs
WWW::Bund::API::Autobahn - Roadworks, webcams, warnings, charging stations
WWW::Bund::API::NINA - Civil protection warnings
WWW::Bund::API::PegelOnline - Water level gauges and measurements
WWW::Bund::API::Tagesschau - News from Tagesschau
WWW::Bund::API::Bundestag - Federal parliament data
WWW::Bund::API::DWD - Weather warnings from DWD
See WWW::Bund::Registry for the full list of 31 registered APIs.
io
HTTP client for making API requests. Defaults to WWW::Bund::LWPIO.
Can be overridden with a custom class implementing WWW::Bund::Role::IO.
cache_dir
Directory for caching API responses. Defaults to XDG-compliant location: $XDG_CACHE_HOME/www-bund or ~/.cache/www-bund.
registry
WWW::Bund::Registry instance for API and endpoint metadata.
auth
WWW::Bund::Auth instance for managing API authentication.
cache
WWW::Bund::Cache instance for disk-based response caching.
rate_limiter
WWW::Bund::RateLimit instance for enforcing per-API rate limits.
caller
WWW::Bund::Caller instance for executing API calls with auth, caching, and rate-limiting.
call
my $data = $bund->call($api_id, $endpoint_name, %options);
Execute a generic API call. Returns parsed response data (usually HashRef or ArrayRef).
Options:
params- HashRef of path and query parametersbase_url- Override the endpoint's base URL
Example:
my $roads = $bund->call('autobahn', 'autobahn_roads');
my $webcams = $bund->call('autobahn', 'autobahn_webcams',
params => { roadId => 'A7' }
);
list
my $apis = $bund->list;
my $apis = $bund->list(tag => 'traffic');
my $apis = $bund->list(auth => 'none');
List all registered APIs. Returns ArrayRef of API metadata HashRefs.
Filters:
tag- Filter by tag (e.g., 'traffic', 'weather')auth- Filter by auth type (e.g., 'none', 'api_key')
search
my $results = $bund->search('autobahn');
Search APIs by ID, title, provider, or tags. Returns ArrayRef of matching APIs.
info
my $info = $bund->info('autobahn');
Get full metadata for an API. Returns HashRef with id, title, provider, auth, tags, etc.
Throws exception if API not found.
autobahn
WWW::Bund::API::Autobahn adapter for highway traffic data.
nina
WWW::Bund::API::NINA adapter for civil protection warnings.
pegel_online
WWW::Bund::API::PegelOnline adapter for water level gauges.
tagesschau
WWW::Bund::API::Tagesschau adapter for news from Tagesschau.
bundestag
WWW::Bund::API::Bundestag adapter for Federal Parliament data.
dwd
WWW::Bund::API::DWD adapter for weather warnings from DWD.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-bund/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.