Skip to content

API Access

The EPF API provides programmatic access to electricity price forecasts, market data, and model evaluation metrics for Spain, Portugal, France, and Germany. All relevant endpoints accept a country query parameter (default ES).

Base URL

https://epf.productjorge.com/api/v1

All responses are JSON. All endpoints follow RESTful conventions. Forecasts are published twice daily per country (day-ahead at ~10:00 UTC, strategic D+2…D+7 at ~15:00 UTC).

Core endpoints

Forecasts

  • GET /forecast/combined?country=ES — Day-ahead + strategic + band config in one call. The primary endpoint used by the dashboard.
  • GET /forecast/dayahead?country=ES — D+1 forecast only.
  • GET /forecast/strategic?country=ES — D+2…D+7 forecast only.
  • GET /forecast/accuracy?country=ES&model=<name> — Recent accuracy metrics for a model.

Countries

  • GET /countries — Enumerate supported countries with display metadata (name, market, timezone, flags for supports_intraday, supports_news_phase35, etc.).

Market data

  • GET /market/price-history?country=ES&start=2026-04-01&end=2026-04-30 — Historical day-ahead prices.
  • GET /market/generation?country=ES&start=2026-04-01&end=2026-04-30 — ENTSO-E actual generation by type (wind, solar, nuclear, gas, hydro, etc.).
  • GET /market/demand?country=ES — Historical and forecast demand.
  • GET /market/cross-border — Interconnection physical flows between countries.

Weather

  • GET /weather/forecast?country=ES&days_back=7 — Forecasted weather variables from Open-Meteo for population-weighted stations per country.

Evaluation

  • GET /evaluation/daily?country=ES&tag=v11.0&start=2026-04-01&end=2026-04-30 — Per-day MAE / bias / spike recall / direction accuracy.
  • GET /evaluation/horizon-breakdown?country=ES — Error by forecast horizon group (H1–H8, D1–D7).
  • GET /evaluation/comparison?country=ES — Side-by-side comparison of production model vs naive baselines.

News (Phase 3.5, ES only)

  • GET /news/articles?category=geopolitics&country=<code> — Recent energy news with sentiment, relevance, and category tags. Currently populated primarily for ES.

Example

Terminal window
# Get combined forecast for Portugal
curl 'https://epf.productjorge.com/api/v1/forecast/combined?country=PT'
# Historical day-ahead prices for Germany, April 2026
curl 'https://epf.productjorge.com/api/v1/market/price-history?country=DE&start=2026-04-01&end=2026-04-30'

Response shape (abridged):

{
"country": "PT",
"dayahead": [
{ "target_hour": "2026-04-19T00:00:00Z", "forecast_eur_mwh": 42.17, "p50_low": 38.2, "p50_high": 46.1, "p90_low": 30.5, "p90_high": 53.8 },
...
],
"strategic": [ ... ],
"band_config": { "p50": 0.5, "p90": 0.9 },
"metadata": {
"model_tag": "pt-v6.0-ablation",
"latest_write": "2026-04-18T10:11:34Z"
}
}

Notes

  • Forecast resolution depends on country — ES is 15-minute; PT/FR/DE are hourly.
  • Cross-country price features are gated — only DE receives them in production (see cross-price gating). This doesn’t affect the API surface; it’s an internal model-training decision.
  • Predictions are served from Cloud Run Jobs per country × horizon; see Cloud Run operations for the delivery pipeline.