What API has historical oil prices?
OilPriceAPI is a historical oil prices API: pull decades of WTI and Brent crude history — WTI goes back to 1983 — through daily, weekly, and monthly REST endpoints, with a free tier and Python/JavaScript SDKs.
Built for backtests, charts, and research — consistent JSON time series you can page through by interval.
40+ years of WTI history
WTI (WTI_USD) historical data goes back to 1983 — over four decades for long-horizon backtests.
Daily / weekly / monthly
Choose the granularity per request: /history/day, /history/week, or /history/month.
WTI, Brent & more
Historical series for both crude benchmarks plus 20+ other energy and commodity codes.
Clean JSON time series
Consistent, paginated JSON arrays that load straight into pandas, R, or a charting library.
Free tier to start
A 7-day trial with 10,000 requests, no credit card; paid plans from $15/month.
Official SDKs
Production-ready SDKs for Python, JavaScript/Node.js, Java, C#, and Ruby.
Endpoints you'll use
GET /v1/prices/history/day?by_code=WTI_USDDaily WTI history.
GET /v1/prices/history/week?by_code=BRENT_CRUDE_USDWeekly Brent history.
GET /v1/prices/history/month?by_code=WTI_USDMonthly WTI history for long-range charts.
Frequently asked questions
How far back does the historical oil price data go?
OilPriceAPI's WTI history goes back to 1983 — more than 40 years. Brent and other benchmarks also have multi-year history.
What intervals are available?
Daily, weekly, and monthly. Use /v1/prices/history/day, /history/week, or /history/month with a by_code parameter.
What format is the historical data?
JSON time series over a REST endpoint — easy to load into pandas, R, spreadsheets, or a charting library.
Is historical data available on the free tier?
Yes — the 7-day free trial (10,000 requests, no credit card) includes historical endpoints; paid plans start at $15/month.
Start with a free OilPriceAPI key
historical-oil-prices-api