Natural Gas (NATURAL_GAS_GBP)
Status: ✅ Available | ⚡ Real-time | 📊 Live Data
Real-time pricing data for Natural Gas. Access current and historical prices via our API.
Quick Reference
| Property | Value |
|---|---|
| Commodity Code | NATURAL_GAS_GBP |
| Name | Natural Gas |
| Category | Natural Gas |
| Currency | GBp |
| Unit | USD/mmBtu |
| Current Price | 7.1 GBp |
| Last Updated | 2025-12-16T15:21:06Z | | Source | oilprice.ig |
Get Latest Price
GET/v1/prices/latest?by_code=NATURAL_GAS_GBP
Request
curl -X GET "https://api.oilpriceapi.com/v1/prices/latest?by_code=NATURAL_GAS_GBP" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Accept: application/json"
Response
{
"status": "success",
"data": {
"price": 7.1,
"formatted": "7.1 GBp",
"currency": "GBp",
"code": "NATURAL_GAS_GBP",
"created_at": "2025-12-16T15:21:06Z",
"type": "spot_price",
"source": "oilprice.ig"
}
}
Get Historical Data
Past 24 Hours
GET /v1/prices/past_day?by_code=NATURAL_GAS_GBP
Past 7 Days
GET /v1/prices/past_week?by_code=NATURAL_GAS_GBP
Past 30 Days
GET /v1/prices/past_month?by_code=NATURAL_GAS_GBP
Past Year
GET /v1/prices/past_year?by_code=NATURAL_GAS_GBP
See Historical Prices API for full documentation.
Code Examples
cURL
# Get latest price
curl -H "Authorization: Token YOUR_API_KEY" \
"https://api.oilpriceapi.com/v1/prices/latest?by_code=NATURAL_GAS_GBP"
Python
import requests
api_key = "YOUR_API_KEY"
url = "https://api.oilpriceapi.com/v1/prices/latest"
response = requests.get(
url,
params={"by_code": "NATURAL_GAS_GBP"},
headers={"Authorization": f"Token {api_key}"}
)
data = response.json()
print(f"Natural Gas: {data['data']['formatted']}")
JavaScript
const apiKey = 'YOUR_API_KEY';
const code = 'NATURAL_GAS_GBP';
fetch(`https://api.oilpriceapi.com/v1/prices/latest?by_code=${code}`, {
headers: {
'Authorization': `Token ${apiKey}`
}
})
.then(res => res.json())
.then(data => {
console.log(`Natural Gas: ${data.data.formatted}`);
});
Related Endpoints
- Get All Prices - Get all commodity prices in one call
- Historical Prices - Time-series data
- Commodities List - Browse all commodities
Last Updated: 2025-12-16