EIA Open Data
EIA Open Data
U.S. Energy Information Administration's open data: electricity, natural gas, petroleum, coal, nuclear outages and energy outlooks through an API (free key) and bulk files (no key). Includes some natural gas and petroleum prices. EIA states the data is provided free of charge (checked Oct 28, 2026).
EIA Open Data is the U.S. Energy Information Administration's free data service: an API, bulk files, an Excel add-in and widgets. It covers electricity (including hourly Balancing Authority operating data), natural gas (including prices and weekly storage), petroleum (including prices), coal, nuclear outages and short- and long-term outlooks.
The API needs a free key, which EIA emails after you register. The bulk download files need no key. The API returns at most 5,000 rows per JSON request. EIA states no numeric request limit; programs must throttle per second and per hour or the key is temporarily suspended.
EIA says U.S. government publications are in the public domain and asks for an acknowledgment with the publication date. The API terms ask you to name the EIA as the source, not to imply endorsement, and not to use the EIA logo without permission.
Required Attribution:
Requested: "you should use an acknowledgment, which includes the publication date, such as: "Source: U.S. Energy Information Administration (Oct 2008)."" API terms: "You should use the "EIA" or the "U.S. Energy Information Administration" names in order to identify the source". The words are "should", not "must".
Coverage
U.S. energy statistics, about 2 million series per EIA's docs: electricity (including hourly Balancing Authority data), natural gas (including prices and weekly storage), petroleum (including prices), coal, nuclear outages, short- and long-term outlooks; history and frequency vary by series (checked Oct 28, 2026)
Good for
- Pull weekly natural gas storage and petroleum stocks or prices into a model for energy-sensitive names
- Use electricity Balancing Authority hourly demand and generation as an alternative-data input
- Download a bulk file (no key) to build a local copy of one EIA data set
Verdict
Free API key needed for the API (bulk files need none). EIA states no numeric request limit on the pages read: heavy callers must throttle per second and per hour or the key is temporarily suspended, and the API returns at most 5,000 rows per JSON request. These are energy statistics; only some natural gas and petroleum series are prices, and history varies by series.
Endpoints
| Endpoint | Returns |
|---|---|
https://api.eia.gov/v2/ | API v2 root (key required: api_key parameter). Without a key it returns HTTP 403 with code API_KEY_MISSING (checked Oct 28, 2026) |
https://www.eia.gov/opendata/bulk/{FILE}.zip | Bulk files, no key: PET, ELEC, NG, COAL, STEO, SEDS, INTL, TOTAL and others. PET.zip was 56.3 MB (last modified Oct 27, 2026) and ELEC.zip 301.7 MB (Oct 23, 2026) when checked |
Get the free weekly email
Free weekly email of newly verified free data. Unsubscribe by emailing us.
By entering your email and clicking Subscribe, you agree to receive the Signal Lab weekly email from Quantum Data Technologies Ltd., 3200-650 West Georgia Street, Vancouver, BC V6B 4P7, Canada (signal-lab@qdt.ai). You can unsubscribe at any time: reply "unsubscribe" to any email or write to signal-lab@qdt.ai. See our Privacy Policy.
Use in your agent
Load EIA electricity data into pandas and Parquet. Checked against the provider's documentation on Oct 29, 2026.
Access
- A free API key is required. Put it in EIA_API_KEY.
- Bulk files do not require a key.
Request
curl 'https://api.eia.gov/v2/electricity/retail-sales/data/?api_key='$EIA_API_KEY'&frequency=monthly&data[0]=price&facets[stateid][]=US&start=2025-01&length=5000'Format
JSON: response data array plus warnings, total, dateFormat and frequency metadata. Values can be strings or numbers by route.
Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
"""EIA monthly US retail electricity price -> pandas -> Parquet. Free API key."""
import os
import requests
import pandas as pd
URL = "https://api.eia.gov/v2/electricity/retail-sales/data/"
params = {"api_key": os.environ["EIA_API_KEY"], "frequency": "monthly", "data[0]": "price",
"facets[stateid][]": "US", "start": "2025-01", "length": 5000, "offset": 0}
rows = []
while True:
r = requests.get(URL, params=params, timeout=30)
r.raise_for_status()
response = r.json()["response"]
rows += response["data"]
params["offset"] += len(response["data"])
if params["offset"] >= int(response["total"]):
break
df = pd.DataFrame(rows)
df["period"] = pd.to_datetime(df["period"])
df["price"] = pd.to_numeric(df["price"])
df.to_parquet("eia_us_retail_electricity_price.parquet", index=False)
print(len(df), "rows", df["period"].min().date(), "to", df["period"].max().date())Needs a personal API key; not run.
Limits
- JSON responses return at most 5,000 rows; page with offset and length.
- Rate limit: Not stated. EIA requires clients to throttle requests per second and per hour.
Quirks
- Each route has its own facets, frequency values and data columns; inspect route metadata first.
- Keep the unit column with each series.
- A key can be temporarily suspended if request tolerances are exceeded.
Terms and attribution
- US government EIA publications are in the public domain, but third-party material may be protected.
- EIA asks users to identify EIA as the source and include the publication date.
- Do not imply endorsement and do not use the EIA logo without permission.
Sources
- https://www.eia.gov/opendata/documentation.php: “our API only returns a maximum of 5,000 rows”
- https://www.eia.gov/opendata/terms-of-service.php: “You should use the "EIA" or the "U.S. Energy Information Administration" names in order to identify the source”
- https://www.eia.gov/about/copyrights_reuse.php: “U.S. government publications are in the public domain and are not subject to copyright protection.”
Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer