Skip to main content
The energyInfoByState query returns the average electricity rate and the renewable/non-renewable generation mix for a given U.S. state. Pass a two-letter state code and specify whether you need residential or business rates to get market-level context you can display alongside individual plan prices or use to benchmark offers in your application. The query returns null when no data is available for the requested state code.

Parameters

String!
required
Two-letter U.S. state code for the state you want data for (e.g. "TX", "PA", "IL").
Boolean!
required
Pass true to retrieve business rates; pass false to retrieve residential rates.

Example

Response fields

Float
Average electricity rate for the state, expressed in cents per kWh.
String
Two-letter state code matching the value you passed in the request.
String
Full name of the state (e.g. "Texas").
ElectricityGenerationPercentage
Breakdown of how electricity in the state is generated. This field is nullable — it may be null if generation data is unavailable for the requested state.
Use averagePrice to display market context alongside individual plan prices — this helps customers understand whether a plan is above or below the state average.