Natural Gas Data API
Access real-time Henry Hub natural gas prices, historical data, and market analytics through our professional-grade API. Updated every 5 minutes during market hours.
1,000 free requests/month • No credit card required • 5-minute setup
Quick Start - Get Natural Gas Prices
1. Get Current Natural Gas Price
curl -X GET https://api.oilpriceapi.com/v1/prices/latest \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
2. Response Example
{
"status": "success",
"data": {
"commodity": "NATURAL_GAS",
"symbol": "NG",
"price": 3.65,
"unit": "USD/MMBtu",
"timestamp": "2025-01-07T15:30:00Z",
"market": "NYMEX",
"contract": "Front Month",
"change_24h": 0.12,
"change_24h_percent": 3.40,
"delivery_point": "Henry Hub",
"last_trading_day": "2025-01-28"
}
}Natural Gas API Endpoints
/v1/prices/latestReturns the most recent natural gas price from Henry Hub futures
Query Parameters: commodity=NATURAL_GAS (optional)
/v1/prices/historicalRetrieve historical natural gas prices for analysis and charting
Parameters:
- • commodity: NATURAL_GAS
- • start_date: YYYY-MM-DD
- • end_date: YYYY-MM-DD
- • interval: minute, hour, day (default: day)
/v1/alerts/createSet up price alerts for natural gas price movements
{
"commodity": "NATURAL_GAS",
"condition": "above",
"threshold": 4.00,
"webhook_url": "https://your-app.com/webhook"
}/v1/natural-gas/storageReservoir MasteryWeekly EIA natural gas storage data with seasonal analysis and inventory metrics (Reservoir Mastery subscribers only)
Response includes:
- • working_gas_bcf: Current storage levels
- • week_change_bcf: Weekly injection/withdrawal
- • five_year_avg_bcf: Historical average
- • surplus_deficit: Vs 5-year average
- • season_type: Injection/withdrawal season
wss://api.oilpriceapi.com/v1/streamReal-time natural gas price updates via WebSocket (Professional plans and above)
// Subscribe to natural gas prices
{
"action": "subscribe",
"commodities": ["NATURAL_GAS"],
"auth": "YOUR_API_KEY"
}JavaScript Example
// Fetch current natural gas price
async function getNaturalGasPrice() {
const response = await fetch(
'https://api.oilpriceapi.com/v1/prices/latest',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(`Natural Gas: $${data.data.price}/MMBtu`);
return data.data;
}
// Fetch storage intelligence (Reservoir Mastery)
async function getStorageData() {
const response = await fetch(
'https://api.oilpriceapi.com/v1/natural-gas/storage',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(`Storage: ${data.data.working_gas_bcf} BCF`);
return data.data;
}Python Example
import requests
def get_natural_gas_price():
url = "https://api.oilpriceapi.com/v1/prices/latest"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
gas_price = data['data']['price']
print(f"Natural Gas: ${gas_price}/MMBtu")
return data['data']
# Get storage intelligence (Reservoir Mastery)
def get_storage_data():
url = "https://api.oilpriceapi.com/v1/natural-gas/storage"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
storage = data['data']['working_gas_bcf']
print(f"Storage: {storage} BCF")
return data['data']Natural Gas Market Data Features
Henry Hub Futures
Front month and forward curve pricing from NYMEX
Storage Data
EIA weekly storage report data and analysis
Weather Impact
Heating and cooling degree day correlations
API Rate Limits
| Plan | Requests/Month | Rate Limit | WebSocket |
|---|---|---|---|
| Free Trial | 1,000 | 10/minute | - |
| Hobby | 10,000 | 60/minute | - |
| Professional | 100,000 | 300/minute | |
| Enterprise | Unlimited | Custom |
Start Using Natural Gas Data Today
Build energy trading, analytics, and risk management applications with reliable natural gas price data updated every 5 minutes.
Free tier includes 1,000 requests/month • No credit card required