Skip to content

Migrate to Bundestag's new conferenceWeekJSON endpoint#7

Open
tifa365 wants to merge 1 commit intohutt:mainfrom
tifa365:fix/migrate-to-conferenceWeekJSON
Open

Migrate to Bundestag's new conferenceWeekJSON endpoint#7
tifa365 wants to merge 1 commit intohutt:mainfrom
tifa365:fix/migrate-to-conferenceWeekJSON

Conversation

@tifa365
Copy link

@tifa365 tifa365 commented Feb 19, 2026

Summary

  • The old conferenceweekDetail.form endpoint has been retired by the Bundestag (returns 404 for all dates), breaking the worker's core data fetching
  • Replaced with the new conferenceWeekJSON endpoint which returns structured JSON, eliminating HTML scraping entirely
  • Removed the cheerio dependency (no longer needed)
  • Updated README to reflect the new architecture

Details

The Bundestag replaced their HTML-based agenda page backend with a proper JSON API at /apps/plenar/plenar/conferenceWeekJSON. This endpoint:

  • Accepts the same ?year=...&week=... parameters
  • Returns structured JSON with conferences[].rows[] containing time, top, topic, status
  • Works without any special headers
  • Includes previous/next pointers for navigation between session weeks
  • Has data going back to at least 2019

The agendaItem output shape is unchanged, so all downstream code (iCal, JSON, XML, CSV output, caching, KV storage) remains untouched.

Test plan

  • Verified conferenceWeekJSON endpoint responds correctly for current, past, and empty weeks
  • Tested field mapping with 19 assertions against real API fixtures (2024-W20, 2026-W09, empty week)
  • npm run build succeeds (webpack bundles to 40.4 KiB without cheerio)
  • Deploy to Cloudflare Workers staging and verify all output formats (iCal, JSON, XML, CSV)

…oint

The old conferenceweekDetail.form endpoint has been retired by the
Bundestag (returns 404 for all dates). This replaces it with the new
conferenceWeekJSON endpoint which returns structured JSON, eliminating
the need for HTML parsing entirely.

- Replace fetchAgenda() to call conferenceWeekJSON and return parsed JSON
- Rewrite parseAgenda() to map JSON fields instead of scraping HTML
- Remove cheerio dependency (no longer needed)
- Update README to reflect the new architecture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant