A lightweight ASP.NET Core Web API that automatically scrapes day-ahead electricity prices from IBEX (Independent Bulgarian Energy Exchange) and stores them in a remote SQL Server database for use by external applications.
Live API: link (HTTP only β free hosting plan limitation) If didn't open check the address for https and change it to http
This API was built to decouple IBEX access from dependent systems by providing a secure, reliable, and filterable data backend.
It powers apps like SunNext by allowing them to:
- Access daily price data without scraping IBEX directly
- Query historical electricity prices by date/hour
- Build custom dashboards and energy trading strategies
-
Scrapes IBEX Day Ahead prices for the next day
-
Extracts hourly energy prices (BGN/MWh)
-
Saves results into a
MarketPricestable with:Date(format:dd/MM/yyyy)Hour(1β24 using EET/EEST timezone)PricePerMWh(BGN/MWh)
-
Prices are updated daily after 14:00 BG time (UTC+3) when IBEX publishes the next dayβs market prices.
-
Data scraping is triggered by calling:
POST /api/Scrape/scrape-and-save -
Only stores new data (prevents duplicate entries for the same date/hour)
-
Scheduler: Configured using cron-job.org to automatically call the above endpoint every day at 14:00 EEST.
- Backend: ASP.NET Core Web API (.NET 8)
- Scraper: AngleSharp
- Database: MS SQL (Somee.com hosting)
- Deployment: FTP to Somee.com (Free Hosting Plan, HTTP-only)
- Scheduler: cron-job.org external HTTP request trigger
- Hosted on Somee.com free plan
- HTTP only β no HTTPS due to free hosting limitations
- API runs at: http://ibex-scraper.somee.com
- Connection string stored in
appsettings.Production.jsonon the server - Deployment via FTP to
/www.ibex-scraper.somee.com
IBEX-Scraper-API/
βββ Controllers/
β βββ ScrapeController.cs
βββ Services/
β βββ IbexScraper/
β βββ IbexScraperService.cs
β βββ IIbexScraperService.cs
βββ Data/
β βββ Migrations/
β βββ Models/
β β βββ MarketPrice.cs
β βββ AppDbContext.cs
β βββ AppDbContextFactory.cs
βββ Program.cs