AI-Ready Energy Data

Commodity Data API for
AI & Machine Learning

Clean, structured energy price data optimized for LLM training, RAG applications, and ML models. Developer-friendly alternative to Bloomberg at 1/100th the cost.

Varies

History by Series

Broad

Energy Catalog

JSON

Consistent Schema

$19/mo

vs $25K/yr Bloomberg

The Challenge for AI Teams

Expensive Data Licenses

Bloomberg/Refinitiv cost $25K+/year - overkill for training data

Inconsistent Formats

Scraping produces messy data requiring extensive cleaning

Not RAG-Optimized

Traditional APIs weren't designed for LLM context windows

Our Solution

Usage-Based Pricing

Start free, scale as needed - no $25K minimums

Consistent JSON Schema

Every response follows the same structure - no cleaning needed

LLM-Friendly Responses

Compact, semantic data that fits LLM context limits

AI & ML Use Cases

RAG Applications

  • • Build energy-aware chatbots
  • • Real-time price lookups via function calling
  • • Historical context for price questions
  • • Structured output for LLM parsing

Model Training

  • • Historical time series where available
  • • Consistent intervals (hourly/daily)
  • • Price forecasting models
  • • Volatility prediction

Data Pipelines

  • • Webhook triggers for new data
  • • Bulk historical downloads
  • • CSV and JSON formats
  • • Pandas-ready structure

Example: LLM Function Calling

OpenAI Function Definition

{
  "name": "get_oil_price",
  "description": "Get current or historical oil prices",
  "parameters": {
    "type": "object",
    "properties": {
      "commodity": {
        "type": "string",
        "enum": ["WTI", "BRENT", "NATURAL_GAS"]
      },
      "date": {
        "type": "string",
        "description": "YYYY-MM-DD or 'latest'"
      }
    }
  }
}

API Response (LLM-Ready)

{
  "commodity": "WTI",
  "price": 75.42,
  "currency": "USD",
  "unit": "barrel",
  "change_24h": -1.23,
  "change_percent": -1.6,
  "timestamp": "2024-01-15T14:30:00Z"
}

Python ML Example

import pandas as pd
from oilpriceapi import OilPriceAPI

api = OilPriceAPI('your-api-key')

# Get training data: one year of daily WTI prices
data = api.historical.get(
    'WTI_USD',
    interval='daily',
    per_page=365
)

# Convert to DataFrame
df = pd.DataFrame([p.model_dump() for p in data.data])
df['date'] = pd.to_datetime(df['date'])

# Ready for model training: predict the next day's price
df = df.sort_values('date')
df['next_value'] = df['value'].shift(-1)
df = df.dropna(subset=['next_value'])
X = df[['value']]
y = df['next_value']

LangChain Integration

from langchain.tools import tool

@tool
def get_oil_price(commodity: str) -> str:
    """Get current oil price for analysis."""
    response = requests.get(
        f"{'{'}API_URL{'}'}/v1/prices/latest",
        headers={"Authorization": f"Token {'{'}API_KEY{'}'}"}
    )
    data = response.json()
    price_data = data['data'][commodity]
    return f"{'{'}commodity{'}'}: ${'{'}price_data['price']{'}'}/barrel"

# Add to your agent
tools = [get_oil_price]

Why AI Teams Choose Us Over Bloomberg

FeatureOilPriceAPIBloomberg/Refinitiv
Pricing$19/month (10K requests)$25,000+/year
API FormatREST + JSON (LLM-ready)Proprietary protocols
Free Tier10,000 API requests (7-day trial)None
Setup Time5 minutesWeeks (contract + integration)
ML/AI ReadyPandas, NumPy compatibleRequires data transformation
Python SDKpip install oilpriceapiComplex SDK setup

Start Building with Energy Data

Get instant API access. No credit card required. Build your first AI integration in minutes.

Starter Plan

$49/month

  • 50,000 API requests/month
  • Historical data where available
  • JSON & CSV formats
  • Python SDK included

Starting smaller? The Developer plan is $19/month for 10,000 requests — compare all plans.

No credit card required for free tier

AI & ML Data FAQ

Can I use this data for model training?

The API is built and priced for exactly this: high-volume historical pulls feeding ML workloads inside your own organization — forecasting models, classification systems, and other applications. What we sell is the access, the coverage and the throughput. We grant no rights over the underlying data itself, we cannot authorize its public redistribution, and no plan changes that.

How much historical data is available?

Starter includes up to five years of historical data where available. Professional and above include full available history. Available intervals and observations vary by source and series.

Is the data suitable for RAG applications?

Absolutely. Our JSON responses are compact and consistently structured, making them ideal for LLM context injection. Each response includes metadata like timestamps and units that help LLMs provide accurate answers.

Do you support bulk data downloads?

Yes, our historical endpoints support pagination up to 500 records per request. You can also use CSV format for easier ingestion into data pipelines and ML frameworks like Pandas.