Back to connectors
OilPriceAPI logo

OilPriceAPI

Live

Real-time and historical commodity prices for crude oil, natural gas, diesel, gasoline, and heating oil.

Available tools

10 tools
ToolDescription
getLatestPricesGet all latest commodity prices. Returns Brent, WTI, OPEC, natural gas, diesel, gasoline, heating oil, etc.
getPriceGet the latest price for a single commodity by code (e.g. BRENT_CRUDE_USD, WTI_USD, NATURAL_GAS_USD).
getPastDayGet price history for the past day. Optionally filter to a single commodity by code.
getPastWeekGet price history for the past week. Optionally filter to a single commodity by code.
getPastMonthGet price history for the past month. Optionally filter to a single commodity by code.
getPastYearGet price history for the past year. Optionally filter to a single commodity by code.
listCommoditiesList all available commodity codes. Useful for discovering what can be queried.
getOilPricesGet latest crude oil prices: WTI, Brent, and OPEC basket.
getGasPricesGet latest gas & refined product prices: natural gas, RBOB gasoline, diesel, heating oil.
getNGLPricesGet latest NGL-related prices. Returns any NGL / propane / butane / ethane commodities available.

Setup

A few steps to connect your AI agents to OilPriceAPI.

Get started
  1. 1

    Get an Access Key

    Register at https://oilpriceapi.com and generate your access key for full access.

  2. 2

    Connect on PatchOps

    Navigate to /mcp, find OilPriceAPI, and enter your access key. Without one, some calls may return limited demo data.

  3. 3

    Start Querying

    Use getLatestPrices for all commodities, or getOilPrices / getGasPrices for grouped results.

Connect to your AI assistant

Pick the tool your team uses for the exact setup steps.

  1. 1

    Open Claude settings

    Launch Claude, click the profile button (bottom left), and go to Settings.

  2. 2

    Access connectors

    Open the Connectors tab, scroll to the bottom, and click “Add custom connector”.

  3. 3

    Name your connector

    Enter any name you’d like for this connector.

  4. 4

    Get the connector URL

    Log in to PatchOps, open the /mcp page, and copy the connector URL you want to use.

  5. 5

    Add the connector

    Paste the URL into the “Remote MCP server URL” box and click Add.

  6. 6

    Start using

    Your OilPriceAPI connector is ready to use in Claude.