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/latest
Returns the most recent natural gas price from Henry Hub futures
Query Parameters: commodity=NATURAL_GAS (optional)
/v1/prices/historical
Retrieve 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/create
Set up price alerts for natural gas price movements
{ "commodity": "NATURAL_GAS", "condition": "above", "threshold": 4.00, "webhook_url": "https://your-app.com/webhook" }
wss://api.oilpriceapi.com/v1/stream
Real-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; }
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() price = data['data']['price'] print(f"Natural Gas: ${price}/MMBtu") 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