Henry Hub Gas Price API: HENRY_HUB as JSON
You need a programmatic way to fetch the current Henry Hub natural gas benchmark and use it inside your application. By the end of this article, you’ll be able to request HENRY_HUB from Energy-API, parse the JSON response, store the price and its effective date, and ship a reliable integration that handles units, dates, and edge cases.
What you get from the Henry Hub endpoint
Energy-API exposes Henry Hub as the symbol HENRY_HUB. You request it with a single HTTP GET against /api/v1/latest and receive a compact JSON payload you can cache and persist. The unit for Henry Hub in the product catalog is USD/MMBtu.
- Endpoint: GET /api/v1/latest
- Query parameter: symbols=HENRY_HUB
- Primary fields to persist: rates.HENRY_HUB (price), dates.HENRY_HUB (price date)
If you later request other energy benchmarks like TTF_GAS or EUA_CO2 together, do not force a base=USD parameter because the latest base can be MIXED. For this article we focus solely on Henry Hub.
Try it with curl
The following is the official request and the live response sample. You can paste the curl into your shell to reproduce the call immediately.
curl -G "https://energy-api.com/api/v1/latest" --data-urlencode "symbols=HENRY_HUB" --data-urlencode "api_key=YOUR_API_KEY"
The JSON shown below is an official print from the live API and is dated 2026-09-29. It is not “today.” Use it to understand the schema and the fields to persist.
{
"success": true,
"date": "2026-09-29",
"base": "USD",
"rates": {"HENRY_HUB": 3.18},
"dates": {"HENRY_HUB": "2026-09-29"},
"currencies": {"HENRY_HUB": "USD"}
}
Understanding the JSON: fields you will actually use
From the response above, you will use:
- rates.HENRY_HUB — the current Henry Hub price. The catalog unit for this product is USD/MMBtu.
- dates.HENRY_HUB — the market date attached to that price. Persist this alongside the price to control cache invalidation and UI labeling (e.g., “Henry Hub (2026-09-29)”).
If the payload includes a top-level success flag and it is false, treat the request as failed and avoid using partial data. If success is not present, fall back to HTTP status codes and validate that both rates.HENRY_HUB and dates.HENRY_HUB exist before proceeding.
One quick Python example
This snippet replicates the same request, reads the price and date, and shows how to persist them. Add the same authentication you used in the curl above.
import os
import json
import time
from urllib.parse import urlencode
import requests
def fetch_henry_hub():
# Build the same request as the curl above
base_url = "https://energy-api.com/api/v1/latest"
params = {"symbols": "HENRY_HUB"}
url = f"{base_url}?{urlencode(params)}"
# Use the same auth mechanism as in the curl sample:
# For example, headers = {"Authorization": "Bearer YOUR_API_KEY"}
headers = {}
# If your curl used an api_key query param, add it to params instead.
r = requests.get(url, headers=headers, timeout=15)
r.raise_for_status()
data = r.json()
# Validate and extract
if isinstance(data, dict) and data.get("success") is False:
raise RuntimeError(f"Energy-API returned success=false: {json.dumps(data)}")
rates = data.get("rates", {})
dates = data.get("dates", {})
price = rates.get("HENRY_HUB")
price_date = dates.get("HENRY_HUB")
if price is None or price_date is None:
raise ValueError(f"Missing expected fields in response: {json.dumps(data)}")
return {
"symbol": "HENRY_HUB",
"unit": "USD/MMBtu", # from the product catalog
"price": price,
"date": price_date
}
if __name__ == "__main__":
doc = fetch_henry_hub()
print(f"{doc['symbol']} {doc['price']} {doc['unit']} as of {doc['date']}")
Going live in four steps
- Register for the Starter plan — $19.99/mo with a 7-day trial and 50 calls: Register.
- Copy your api_key from the dashboard.
- Call GET /api/v1/latest with symbols=HENRY_HUB.
- Persist both rates.HENRY_HUB (the price) and dates.HENRY_HUB (the price date).
There is no MCP host in front of this service; call the API host directly as shown in the curl.
Implementation details that save time
Units and base currency
HENRY_HUB is quoted in USD/MMBtu. If you only request HENRY_HUB, you do not need to pass a base parameter. If you later mix symbols (e.g., TTF_GAS or EUA_CO2), do not force base=USD because the latest base can be MIXED across products; design your normalization layer accordingly.
Dates and timezones
The dates.HENRY_HUB field is the effective market date for the price returned. Treat it as the canonical date for display and storage. Do not assume it maps to your server’s local timezone; use the provided date as-is for labeling and cache invalidation.
Caching strategy
- Cache by symbol and price date. If the date doesn’t change on a new poll, you can keep serving your cached value.
- When dates.HENRY_HUB advances, refresh the cache and persist the new pair (price, date).
- Back off on retries if you see transient HTTP errors; avoid hammering the endpoint.
Missing values and success=false
- Check for a top-level success flag if present. If success is false, surface the error to logs and skip updating your cache.
- Always verify that rates.HENRY_HUB and dates.HENRY_HUB are present and non-null before using the payload.
- On missing values, keep your last known good value and mark the feed as stale; try again later.
Non-trading days and update cadence
Energy benchmarks don’t necessarily change every calendar day. Use dates.HENRY_HUB as the authoritative indicator of freshness. If you’re polling on weekends or holidays, it’s normal to see the same date across polls.
Storing data
- Persist the triad: symbol (HENRY_HUB), price (rates.HENRY_HUB), and price date (dates.HENRY_HUB).
- Record the unit string USD/MMBtu alongside the price to avoid downstream confusion.
- If you transform or convert values, keep the raw value and the transformation metadata for auditability.
Developer checklist
- Call GET /api/v1/latest?symbols=HENRY_HUB.
- Validate response success (if present), then read rates.HENRY_HUB and dates.HENRY_HUB.
- Store price + date + unit (USD/MMBtu) for display and caching.
- When mixing symbols later, don’t enforce base=USD because latest can be MIXED.
FAQ
What symbol should I use for Henry Hub?
Use HENRY_HUB.
How do I authenticate?
Register to obtain an api_key. Then replicate the same authentication mechanism used in the curl sample above when making requests from your application.
What fields should I persist?
Persist rates.HENRY_HUB (the price) and dates.HENRY_HUB (the market date). Keep the unit USD/MMBtu with your stored value.
Can I request Henry Hub together with other benchmarks?
Yes, but if you add symbols like TTF_GAS or EUA_CO2, do not pass base=USD because the latest base can be MIXED.
Is the sample response “live” right now?
The printed sample is a live capture dated 2026-09-29. Treat it as an example; always use the API to obtain the current price and date.
Ready to implement HENRY_HUB in your app? Start your 7-day trial (50 calls) and get your api_key: Register. For more endpoints and options, see the Documentation.
Ready to get started?
Get your API key and start querying energy commodity prices in minutes.
Get API KeyRelated posts
Discover how to integrate the Henry Hub price API into your finance stack. Learn to fetch, validate, and parse...
Read more →