DEV Community

Dave Sng
Dave Sng

Posted on

I Built an API That Fuses 4 Energy Data Sources + AI Into One Endpoint

The Problem: Energy Data Is Scattered and Expensive

If you've ever tried to build anything involving energy market data — a trading dashboard, a supply chain monitor, a geopolitical risk model — you know the pain:

  • Tanker tracking APIs (AIS data) start at $220/month
  • Oil price APIs are separate services from maritime data
  • Port congestion data lives behind yet another provider
  • None of them talk to each other

I built Energy Volatility to solve this. One API, four data sources, plus an AI layer that interprets the data.

What It Does

Source What You Get
AISStream.io Live tanker positions — vessel ID, speed, heading, cargo type
FRED WTI and Brent crude oil prices with trend direction
EIA Petroleum spot prices
IMF PortWatch Port congestion — berth occupancy, vessel queues
OpenRouter AI Supply gap prediction, price impact forecasting

Coverage focuses on corridors where ~20% of global oil transits daily: Strait of Hormuz, Persian Gulf, Red Sea.

Quick Start

import requests

headers = {
    "X-RapidAPI-Key": "YOUR_KEY",
    "X-RapidAPI-Host": "energy-volatility.p.rapidapi.com",
}

# Get tanker positions
resp = requests.get(
    "https://energy-volatility.p.rapidapi.com/v1/tanker-positions",
    headers=headers,
    params={"region": "strait_of_hormuz"}
)

# AI risk assessment
resp = requests.post(
    "https://energy-volatility.p.rapidapi.com/v1/risk-assessment",
    headers={**headers, "Content-Type": "application/json"},
    json={"region": "strait_of_hormuz", "conflict_type": "military", "severity": 7}
)
result = resp.json()
print(f"Risk Score: {result['risk_score']}/100")
print(f"Supply Gap: {result['supply_prediction']['predicted_gap_mbpd']} million bbl/day")
Enter fullscreen mode Exit fullscreen mode

How It Compares

Feature Energy Volatility Datalastic Ship Tracking API
Tanker positions (AIS) Yes Yes Yes
Oil/freight prices Yes No No
Port congestion Yes No No
AI risk analysis Yes No No
Free tier 50 req/mo Trial only Yes
Pro pricing $14.99/mo ~$220/mo ~$25/mo

When NOT to Use This API

  • Global vessel tracking — Coverage is Persian Gulf/Red Sea focused
  • Historical time-series — This is real-time, not a historical database
  • Tick-level commodity pricing — Oil prices update daily via FRED/EIA

Try It

Energy Volatility on RapidAPI

Free tier: 50 requests/month.


Building something with energy data? Drop a comment — I'd love to hear your use case.

Top comments (0)