Real-time oil & commodity price data directly in Google Sheets
This Google Sheets add-on brings live commodity prices to your spreadsheets:
- Custom Functions:
=OILPRICE("BRENT_CRUDE_USD") - Sidebar UI: Fetch and manage prices easily
- Auto-Convert: Standardize all prices to $/MMBtu
- Historical Data: Access 20+ years of daily prices
=OILPRICE("BRENT_CRUDE_USD") // Returns latest Brent Crude price
=OILPRICE_HISTORY("WTI_USD", 30) // Returns 30 days of WTI data
=OILPRICE_CONVERT("NATURAL_GAS_GBP") // Returns price in $/MMBtu- API key management
- Commodity selection (20+ commodities)
- Fetch latest prices
- Convert to $/MMBtu
- Historical data charts
- Usage tracking
- Free: 1,000 requests/month
- Exploration: 10,000 requests/month + historical data
- Production+: Higher limits + webhooks
- Open any Google Sheet
- Extensions β Add-ons β Get add-ons
- Search "OilPriceAPI Energy Prices"
- Click Install
- Open Google Sheets
- Extensions β Apps Script
- Copy code from
Code.gsandSidebar.html - Save and refresh
Visit https://oilpriceapi.com/auth/signup to get your free API key.
- Extensions β OilPriceAPI β Configure
- Enter your API key
- Click Save
In any cell, type:
=OILPRICE("BRENT_CRUDE_USD")
- Extensions β OilPriceAPI β Fetch Prices
- Select commodities
- Click Fetch
- Data appears in "Data" sheet
| Commodity | Latest Price | $/MMBtu | 30-Day Change |
|-----------------|--------------|----------|---------------|
| Brent Crude | $71.45 | $12.32 | +2.3% |
| WTI Crude | $66.20 | $11.41 | +1.8% |
| Natural Gas (US)| $4.84 | $4.84 | -3.2% |
| UK Natural Gas | Β£7.50 | $99.30 | +15.7% |
- Fetch past year data
- Insert β Chart
- Select date and price columns
- Choose line chart
Free Tier:
- 1,000 requests/month
- Real-time prices
- 20+ commodities
- Custom functions
Exploration ($15/mo):
- 10,000 requests/month
- Historical data access
- Pandas integration (Python SDK)
- Email support
Production ($45/mo):
- 50,000 requests/month
- Webhooks
- Priority support
- 99.9% uptime SLA
google-sheets-energy-addin/
βββ Code.gs # Main Apps Script code
βββ Sidebar.html # Sidebar UI
βββ appsscript.json # Project manifest
βββ README.md # This file
βββ docs/
βββ index.html # GitHub Pages landing page
- Open Google Apps Script editor
- Make changes to Code.gs or Sidebar.html
- Click Run β test function
- Debug in Apps Script console
- Click Deploy β New deployment
- Type: Add-on
- Description: Version X.X.X
- Click Deploy
- API Reference: https://docs.oilpriceapi.com
- Custom Functions Guide: https://www.oilpriceapi.com/tools/sheets-functions
- Video Tutorials: https://www.youtube.com/oilpriceapi
- Support: support@oilpriceapi.com
- None currently
- API keys stored securely in user properties
- No data shared with third parties
- HTTPS encryption for all API calls
- Privacy Policy
- Terms of Service
Having issues?
- Email: support@oilpriceapi.com
- GitHub Issues: https://github.com/OilpriceAPI/google-sheets-addin/issues
- Documentation: https://www.oilpriceapi.com/tools/sheets-support
- Create new sheet named "Dashboard"
- Add formulas:
=OILPRICE("BRENT_CRUDE_USD") =OILPRICE("WTI_USD") =OILPRICE("NATURAL_GAS_USD") - Format as table
- Add conditional formatting for price changes
- Extensions β OilPriceAPI β Fetch Historical
- Select "Brent Crude" and "Past Year"
- Data appears in "Historical" sheet
- Create line chart to visualize trends
A1: Commodity | B1: =OILPRICE("NATURAL_GAS_USD")
A2: Volume (MMBtu) | B2: 1000
A3: Total Cost | B3: =B1*B2
- 98% Less Cost: Compared to Bloomberg Terminal
- 20+ Commodities: Brent, WTI, Natural Gas, Coal, and more
- 20 Years of Data: Daily historical prices since 2005
- Production-Ready: Used by analysts, traders, and developers worldwide
- Free Tier: 1,000 requests/month, no credit card required
MIT License - See LICENSE file for details
Contributions welcome! Please:
- Fork the repository
- Create feature branch
- Submit pull request
- Python SDK: https://github.com/OilpriceAPI/python-sdk
- Node.js SDK: https://github.com/OilpriceAPI/oilpriceapi-node
- Excel Add-in: https://github.com/OilpriceAPI/excel-energy-addin
Built with β€οΈ by OilPriceAPI