{"openapi":"3.1.0","info":{"title":"Elekter public API","version":"1.0.0","description":"Non-commercial public electricity research. No API key or service-level guarantee. Public access does not grant unrestricted rights to underlying third-party data; see /data."},"servers":[{"url":"https://elekter.pages.dev","description":"Current public site"},{"url":"https://elekter.eu","description":"Future canonical domain; owner will connect it separately"}],"paths":{"/api/public/v1/estonia/grid-flow":{"get":{"summary":"Hourly qualitative grid reconstruction, source shares and provenance. hour=UTC interval start for exact replay. view=overview selects a common snapshot within 24 h with ≥80% source coverage. Snapshots over 6 h old use selection_basis=last_complete_snapshot; otherwise, when no qualifying snapshot remains, returns latest distribution.","operationId":"grid-flow","description":"Poll no more often than 15 min. Honor Cache-Control. Additional fields may be added within this version.","parameters":[{"name":"hour","in":"query","required":false,"description":"Exact hourly UTC interval start. Defaults to latest distribution hour regardless of attribution coverage.","schema":{"type":"string","format":"date-time"},"example":"2026-09-05T10:00:00Z"},{"name":"view","in":"query","required":false,"description":"Select a common grid and attribution snapshot no more than 24 hours old. Inspect selection_basis and hour_utc for delayed data.","schema":{"type":"string","enum":["overview"]}}],"responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-grid-flow/1"},"hour_utc":{"type":"string","format":"date-time"},"available_hours":{"type":"array","items":{"type":"string","format":"date-time"}},"modelled":{"const":true},"mode":{"const":"reconstruction"},"transmission_status":{"enum":["aligned","unavailable_at_selected_hour"]},"fuel_shares_by_root":{"type":"object","additionalProperties":{"type":["array","null"],"items":{"type":"number","minimum":0,"maximum":1}}}}}}}},"400":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/v1/estonia/plants":{"get":{"summary":"Modelled regional electricity sources. hour=UTC interval start requests sources at the map’s exact hour; missing hours never substitute another snapshot.","operationId":"plants","description":"Poll no more often than 15 min. Honor Cache-Control. Additional fields may be added within this version.","parameters":[{"name":"lat","in":"query","required":false,"schema":{"type":"number","minimum":57.4,"maximum":59.8},"example":58.38},{"name":"lon","in":"query","required":false,"schema":{"type":"number","minimum":21.6,"maximum":28.3},"example":26.73},{"name":"hour","in":"query","required":false,"description":"Exact hourly UTC interval start (YYYY-MM-DDTHH:00:00Z). Unavailable or mismatched attribution returns 503 without substituting another hour.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-estonia-plants/2"}}}}}},"400":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/v1/estonia":{"get":{"summary":"Published 15-minute prices, today and tomorrow, source status.","operationId":"estonia","description":"Poll no more often than 5 min. Honor Cache-Control. Additional fields may be added within this version.","responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-public-estonia/1"},"timezone":{"const":"Europe/Tallinn"},"data_mode":{"enum":["live","partial","unavailable"]},"generated_at":{"type":"string","format":"date-time"},"components":{"type":"object","properties":{"price":{"type":"object","properties":{"status":{"enum":["fresh","delayed","stale","unavailable"]},"retrieved_at":{"type":["string","null"],"format":"date-time"},"current":{"type":["object","null"],"properties":{"start_utc":{"type":"string","format":"date-time"},"end_utc":{"type":"string","format":"date-time"},"eur_per_mwh":{"type":"number"},"cents_per_kwh":{"type":"number"}}},"days":{"type":"array","items":{"type":"object","properties":{"label":{"enum":["today","tomorrow"]},"date":{"type":"string","format":"date"},"availability":{"enum":["available","partial","unavailable","not_published"]},"points":{"type":"array","items":{"type":"object","properties":{"start_utc":{"type":"string","format":"date-time"},"end_utc":{"type":"string","format":"date-time"},"eur_per_mwh":{"type":["number","null"]},"cents_per_kwh":{"type":["number","null"]}}}}}}}}}}}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/v1/estonia/mix":{"get":{"summary":"Measured Estonian generation mix and modelled domestic carbon intensity. Measurements over 3 h old are delayed; those over 24 h old are unavailable.","operationId":"mix","description":"Poll no more often than 5 min. Honor Cache-Control. Additional fields may be added within this version.","responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-estonia-mix/1"},"source_hour_utc":{"type":"string","format":"date-time"},"status":{"enum":["fresh","delayed"]},"measurement":{"const":"measured_generation"},"carbon_g_per_kwh":{"type":["number","null"]},"carbon_basis":{"type":"string"},"mix":{"type":"array","items":{"type":"object","properties":{"fuel":{"type":"string"},"mw":{"type":"number"},"pct":{"type":"number"}}}}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/v1/estonia/solar-point":{"get":{"summary":"A location’s irradiance and temperature forecast through Puhub. Example: Tartu.","operationId":"solar-point","description":"Poll no more often than 15 min. Honor Cache-Control. Additional fields may be added within this version.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":57.4,"maximum":59.8},"example":58.38},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":21.6,"maximum":28.3},"example":26.73}],"responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-solar-point/1"},"issued_at":{"type":"string","format":"date-time"},"unit":{"const":"W_per_m2"},"hours":{"type":"array","items":{"type":"object","properties":{"end_utc":{"type":"string","format":"date-time"},"ghi":{"type":"number"},"ghi_clearsky":{"type":["number","null"]},"temp_c":{"type":["number","null"]}}}}}}}}},"400":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/public/v1/estonia/skill":{"get":{"summary":"Public forecast verification: sample, baseline, status and results.","operationId":"skill","description":"Poll no more often than 1 h. Honor Cache-Control. Additional fields may be added within this version.","responses":{"200":{"description":"Validated source data. Inspect availability, timestamps and evidence status before use. Schemas describe the main fields; other fields retain their upstream provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"schema_version":{"const":"elekter-skill-record/1"},"live_accuracy_published":{"type":"boolean"},"records":{"type":"array","items":{"type":"object"}}}}}}},"405":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"503":{"description":"Invalid location, unavailable upstream or rejected upstream schema. Never interpret an error or missing field as zero.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}