The Economic Calendar Was in the Network Tab
Finnhub's calendar is premium-gated. investing.com's own frontend calls a keyless JSON endpoint with actual/forecast/previous — callable server-side with nothing but a User-Agent.
A commodities dashboard needed a free economic calendar — the CPI / NFP / FOMC dates that move gold and crude. The obvious APIs didn’t cooperate:
- Finnhub (free tier):
GET /calendar/economic→{"error":"You don't have access to this resource."}. Premium-gated. - FRED: has release dates, but no forward schedule —
realtime_start=todayreturns only the releases that already happened today, not the next two weeks. - ForexFactory’s weekly JSON (
nfs.faireconomy.media/ff_calendar_thisweek.json) actually works — free, no key, 86 events this week, 10 high-impact, with forecast/previous. Good enough. But before settling I wanted to know if there was something richer.
So I opened investing.com’s economic calendar in a headless browser and dumped the network requests. One row stood out among the ad-tech noise:
GET https://endpoints.investing.com/pd-instruments/v1/calendars/
economic/events/occurrences
?domain_id=1&limit=200&start_date=...&end_date=...&country_ids=25,32,6,...
=> 200
Then the test that actually matters — is it callable without the browser’s cookies? Plain curl, nothing but a User-Agent: 200. Clean JSON, two arrays:
events— metadata:importance,currency,description,source.occurrences— the dated instances:occurrence_time(precise UTC),actual,forecast,previous, and a tidyactual_to_forecastof"better" | "worse" | "neutral".
Join the two on event_id and you get a forward calendar strictly richer than ForexFactory: actuals on released prints, exact timestamps, country filtering, arbitrary date ranges. No key. No paid plan.
The lesson isn’t new but it keeps paying: when an API is paywalled, the site’s own frontend usually calls a cleaner unauthenticated endpoint to render the exact data you want. The network tab is the API documentation. The paywall sits on the branded /v1/calendar/economic that they sell — not on the internal /pd-instruments/... that their React app quietly hits.
I wired investing.com as the primary source and kept ForexFactory as the fallback. The internal endpoint is undocumented and can change without notice, so: resilience over cleverness. But for now the “premium” calendar feature costs exactly zero.
// Discussion
Comments are powered by GitHub Discussions via Giscus. Sign in with your GitHub account to add a reply, or discuss on X.