Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- A free EIA API key saved in the EIA_API_KEY environment variable
Weekly U.S. working-gas in storage for building inventory monitors and energy-market dashboards.
From source to product signal
EIA's weekly underground storage route returns working-gas inventories. Start with the Lower 48 total and a short length. These are storage statistics, not Henry Hub spot prices, and weekly values can be revised.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import os
import pandas as pd
import requests
response = requests.get(
"https://api.eia.gov/v2/natural-gas/stor/wkly/data/",
params={
"api_key": os.environ["EIA_API_KEY"],
"frequency": "weekly",
"data[0]": "value",
"facets[duoarea][]": "NUS",
"length": 20,
},
timeout=30,
)
response.raise_for_status()
storage = pd.DataFrame(response.json()["response"]["data"])
storage["period"] = pd.to_datetime(storage["period"])
storage["value"] = pd.to_numeric(storage["value"], errors="coerce")
storage["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(storage[["period", "duoarea", "value", "units"]].head())Test a useful signal
Test whether a short storage window can power an inventory-change alert.
U.S. Energy Information Administration is a government source. Last verified 2026-08-18. Temporal coverage: weekly natural-gas storage series with history varying by region.