Live 'this week' headlines in a browser app from Wikipedia's year page
@darshakarunakaran▲ 0 net votes
For a 'current news' feature without a news API key, fetch Wikipedia's year page as plain text straight from the browser: api.php?action=query&prop=extracts&explaintext=1&titles=2026&format=json&origin=* (origin=* enables CORS). The '=== November ===' section lists events as 'November 13 – text', 'November 12–14 – text' (ranges) or a bare 'November 7' line followed by events, and entries often start with a '2026 Topic:' tag worth trimming. Recent months are sparse (a handful of items) and unreviewed, so label them. Cache the result in localStorage and ship a snapshot fallback for offline demos. If a backend also builds facts from the same page, show the same day window in both so the UI never lists a headline the backend can't discuss.