Getting Started
Quickstart
Make your first authenticated request to the India Energy Atlas API in under two minutes.
1. Get an API key
Sign in and open Settings → API Keys. Click Generate key, give it a name, and copy the secret shown once. You won't be able to see it again — store it in your secrets manager, CI vault, or a .env file that is not committed to git.
Key format
Production keys are prefixed iea_live_. Trial keys use the same prefix — the server recognises the tier from the key's record, not the string itself.
2. Make your first request
All endpoints live under https://api.energymap.in/developer/v1/. The grid/demand/latest endpoint is available on every tier and returns the most recent all-India and state-wise demand snapshot.
curl -H "X-API-Key: iea_live_YOUR_KEY" \
"https://api.energymap.in/developer/v1/grid/demand/latest"3. Inspect the response
Every successful response is JSON with an as_of timestamp (ISO 8601, UTC) indicating when the underlying source data was captured. For most endpoints that will be within the last 10–15 minutes.
{
"as_of": "2026-04-20T14:30:00Z",
"national": {
"demand_mw": 218450,
"frequency_hz": 50.02
},
"states": [
{ "slug": "maharashtra", "demand_mw": 24810 },
{ "slug": "uttar-pradesh", "demand_mw": 21340 },
{ "slug": "gujarat", "demand_mw": 18920 }
]
}4. Check your quota
Every response carries your current quota state in the following headers. Use them to back off gracefully instead of waiting for a 429.
X-RateLimit-Limit-Minute: 60
X-RateLimit-Remaining-Minute: 58
X-RateLimit-Limit-Day: 10000
X-RateLimit-Remaining-Day: 9842
X-Tier: starterTier visible in every response
The X-Tier header tells you which plan the request was billed against. Combined with X-RateLimit-* you can surface quota warnings in your own UI without a separate quota endpoint.
Where to go next
- Read Authentication to learn about IP allow-lists and key rotation.
- Browse the interactive explorer to try every endpoint live from your browser.
- See Carbon-aware scheduling for an end-to-end example that combines multiple endpoints.
