{"id":16600563,"url":"https://github.com/savjee/energy-prices-api","last_synced_at":"2026-04-22T04:35:29.143Z","repository":{"id":73407638,"uuid":"532236712","full_name":"Savjee/energy-prices-api","owner":"Savjee","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-05T09:58:16.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T06:46:33.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Savjee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-03T11:13:52.000Z","updated_at":"2024-12-05T09:58:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab6688b0-9831-4095-a6dc-71ed457c39ec","html_url":"https://github.com/Savjee/energy-prices-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2Fenergy-prices-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2Fenergy-prices-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2Fenergy-prices-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savjee%2Fenergy-prices-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Savjee","download_url":"https://codeload.github.com/Savjee/energy-prices-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242582792,"owners_count":20153321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T00:14:56.863Z","updated_at":"2025-12-24T04:30:28.666Z","avatar_url":"https://github.com/Savjee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Energy Price API\n\nSimple API that returns the price for gas and electricity. \n\nCurrently only supports Belgium 🇧🇪 but I'm open to pull requests!.\n\n## Usage\n\nGet gas prices:\n```\nGET https://energy-prices.savjee.workers.dev/be/gas\n```\n\nResponse:\n```json\n{\n    \"price\":2.3989239371241693,\n    \"unit\":\"m3\"\n}\n```\n\nGet electricity price:\n```\nGET https://energy-prices.savjee.workers.dev/be/electricity\n```\n\nResponse:\n```json\n{\n    \"avg\":0.3301816666666666,\n    \"median\":0.30147\n}\n```\n\nThe API is a Cloudflare Worker that makes requests to the datasources (PowerNext and Elia) and caches the results for 1 hour.\n\n## Integration with Home Assistant\nWant to use this API in your Home Assistant instance? Simply include these RESTful sensors:\n\n```yaml\n- platform: rest\n  resource: https://energy-prices.savjee.workers.dev/be/gas\n  method: GET\n  name: Gas wholesale price\n  value_template: {{ value_json.price | round(2) }}\n  device_class: monetary\n  state_class: measurement\n  unit_of_measurement: \"€/m³\"\n  scan_interval: 3600  # 1 hour\n\n- platform: rest\n  resource: https://energy-prices.savjee.workers.dev/be/electricity\n  method: GET\n  name: Electricity wholesale price\n  value_template: {{ value_json.avg | round(2) }}\n  device_class: monetary\n  state_class: measurement\n  unit_of_measurement: \"€/kWh\"\n  scan_interval: 3600  # 1 hour\n```\n\n\n## Wishlist\n\n- [ ] Support more countries\n- [ ] Version the API to prevent breaking changes in the future\n- [ ] Have a uniform response format and document the units we're using","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavjee%2Fenergy-prices-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavjee%2Fenergy-prices-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavjee%2Fenergy-prices-api/lists"}