{"openapi": "3.1.0", "info": {"title": "kWhPulse Historical US Electricity Price API", "version": "1.0", "description": "Historical US retail electricity prices by state, ZIP code, and utility. Powered by EIA Form 861 and 861M data."}, "security": [{"ApiKeyAuth": []}], "paths": {"/v1/prices/state/{state}": {"get": {"summary": "Monthly price time series for a state", "operationId": "getStatePrices", "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "example": "2020-01"}, "description": "Filter results from this period (inclusive), format YYYY-MM"}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "example": "2024-12"}, "description": "Filter results through this period (inclusive), format YYYY-MM"}]}}, "/v1/prices/zip/{zip}": {"get": {"summary": "Price data for a ZIP code", "operationId": "getZipPrices", "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "example": "2020-01"}, "description": "Filter results from this period (inclusive), format YYYY-MM"}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "example": "2024-12"}, "description": "Filter results through this period (inclusive), format YYYY-MM"}]}}, "/v1/prices/utility/{utility_id}": {"get": {"summary": "Annual price time series for a utility", "operationId": "getUtilityPrices", "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "example": "2020-01"}, "description": "Filter results from this period (inclusive), format YYYY-MM"}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "example": "2024-12"}, "description": "Filter results through this year (inclusive), format YYYY-MM; month component is ignored for annual utility data"}]}}, "/v1/utilities": {"get": {"summary": "List utilities serving a ZIP code", "operationId": "getUtilitiesByZip"}}, "/v1/rankings/state/{state}": {"get": {"summary": "Ranked utility prices in a state", "operationId": "getRankings"}}, "/v1/compare": {"get": {"summary": "Side-by-side price comparison", "operationId": "compareZips", "parameters": [{"name": "start", "in": "query", "required": false, "schema": {"type": "string", "example": "2020-01"}, "description": "Filter results from this period (inclusive), format YYYY-MM"}, {"name": "end", "in": "query", "required": false, "schema": {"type": "string", "example": "2024-12"}, "description": "Filter results through this period (inclusive), format YYYY-MM"}]}}, "/v1/signup": {"post": {"summary": "Sign up for a free API key", "operationId": "signup", "security": []}}, "/v1/me/usage": {"get": {"summary": "Current month API usage", "operationId": "getUsage"}}}, "components": {"securitySchemes": {"ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "x-api-key"}}}}