Available on Google Workspace Marketplace

OilPriceAPI for Google Sheets™Oil prices in Google Sheets, as formulas

Add source-aware oil, gas, refined-product, futures, marine-fuel, and drilling data to the spreadsheet where you work—without copying an API key into a cell or URL.

Quick start

From install to a live price in four steps

  1. Create a free OilPriceAPI account and copy an API key from the dashboard.
  2. Install the add-on from Google Workspace Marketplace, or in a sheet open Extensions > Add-ons > Get add-ons and search for OilPriceAPI.
  3. Open the add-on from the Extensions menu, choose Configure API Key and save your key. It is stored for that spreadsheet, never in a cell.
  4. Type =OILPRICE_PRICE("WTI_USD") in any cell.

In a cell

=OILPRICE_PRICE("WTI_USD")

Latest WTI_USD from the API

$99.00per barrel

As of 2026-10-16 20:46 UTC

Add =OILPRICE_INFO("WTI_USD") beside it to keep the source timestamp and freshness in the sheet.

What the add-on does

Requested data, with its source context

Return price, currency, unit, source timestamp, and freshness fields without fabricating missing values.
Build current-spreadsheet tables for reviewed OilPriceAPI datasets and selected market identifiers.
Store the OilPriceAPI key in Apps Script document properties for the current spreadsheet, never in a cell.
Show actionable recovery for missing or revoked keys, unavailable datasets, rate limits, timeouts, and malformed responses.

OAuth permissions

Three narrow permissions, each tied to a visible feature

spreadsheets.currentonly

Current spreadsheet only

Read user-selected inputs needed for an invoked feature and write formulas, requested market-data tables, and conversion outputs only in the spreadsheet where the add-on is open.

script.external_request

OilPriceAPI requests

Send HTTPS GET requests to api.oilpriceapi.com for market data the user explicitly requests. Requests use the user's OilPriceAPI key and reviewed identifiers or filters.

script.container.ui

Sidebar and dialogs

Display the add-on menu, API-key sidebar, price-selection dialog, help messages, and recovery actions inside the current spreadsheet.

Google may display default email and profile identity scopes in the Cloud configuration. OilPriceAPI for Google Sheets™ does not use those identity scopes for product behavior and does not read or store a user's Google email or profile.

Formula quickstart

Stable, source-aware worksheet functions

=OILPRICE_PRICE("WTI_USD")=OILPRICE_INFO("WTI_USD")=OILPRICE_STATUS("WTI_USD")=OILPRICE_UNIT("WTI_USD")=OILPRICE_CODES()=OILPRICE_GET("/v1/prices/latest","by_code=WTI_USD")

Storage and deletion

  • The API key is stored in document properties associated with the current spreadsheet and is never returned to the sidebar.
  • Short-lived user cache entries hold requested market responses to reduce duplicate API calls.
  • A minimal diagnostic stores endpoint path, result code, status, duration, and timestamp—never the API key or query string.
  • “Delete API Key” removes the stored key and diagnostic. Generated spreadsheet cells remain under the user's control until the user clears or deletes them.

Google user-data commitment

OilPriceAPI's use of information received from Google Workspace APIs adheres to the Google API Services User Data Policy, including the Limited Use requirements.

Frequently asked questions

How do I get oil prices in Google Sheets?

Install OilPriceAPI for Google Sheets™ from Google Workspace Marketplace, open the add-on from the Extensions menu, choose Configure API Key and paste your OilPriceAPI key. Then type =OILPRICE_PRICE("WTI_USD") in a cell, or any code listed by =OILPRICE_CODES().

Is OilPriceAPI for Google Sheets publicly installable?

Yes. The add-on is listed on Google Workspace Marketplace and installs from there or from Extensions > Add-ons > Get add-ons in Google Sheets.

Do I need an API key?

Yes. Formulas call the OilPriceAPI REST API with your key. A free key includes 50 requests per day; dataset access depends on your plan.

What Google data does the add-on access?

It works only in the spreadsheet where the user opens it. It can read user-selected inputs needed for an invoked feature and write requested OilPriceAPI results. It does not request broad Google Drive access.

What data is sent to OilPriceAPI?

Requests send the user's OilPriceAPI key and the reviewed market identifiers or filters needed for the requested data. The add-on does not send the user's general spreadsheet contents.

Can I use it without installing an add-on?

Yes. IMPORTDATA can read the API's CSV output directly, with the trade-off that the key sits in the formula URL. The Google Sheets guide on our blog walks through it.

Review and support

The add-on is published on Google Workspace Marketplace. Questions about permissions, data handling, or installation can be sent to [email protected]. A longer walkthrough, including the IMPORTDATA option, is in how to get oil prices in Google Sheets.

Google Sheets™ is a trademark of Google LLC.