Oil Price API Documentation - Quick Start in 5 Minutes | REST API
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
  • Commodities

    • List Commodities
    • Get Commodity Details
  • Marine Fuels

    • List Marine Fuel Ports
    • Get Port Details with Prices
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API

Us Rig Count (US_RIG_COUNT)

Status: ✅ Available | ⚡ Real-time | 📊 Live Data

Weekly count of active us rig count from Baker Hughes. This metric is a key indicator of drilling activity and industry health in the oil and gas sector.


Quick Reference

PropertyValue
Commodity CodeUS_RIG_COUNT
NameUs Rig Count
CategoryDrilling Intelligence
CurrencyCOUNT
Unitrigs
Current Price5

| Last Updated | 2025-12-16T15:20:27Z | | Source | oilprice.firecrawl |


Get Latest Price

GET/v1/prices/latest?by_code=US_RIG_COUNT

Request

curl -X GET "https://api.oilpriceapi.com/v1/prices/latest?by_code=US_RIG_COUNT" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Accept: application/json"

Response

{
  "status": "success",
  "data": {
    "price": 5.48,
    "formatted": "5",
    "currency": "COUNT",
    "code": "US_RIG_COUNT",
    "created_at": "2025-12-16T15:20:27Z",
    "type": "spot_price",
    
    "source": "oilprice.firecrawl"
  }
}

Get Historical Data

Past 24 Hours

GET /v1/prices/past_day?by_code=US_RIG_COUNT

Past 7 Days

GET /v1/prices/past_week?by_code=US_RIG_COUNT

Past 30 Days

GET /v1/prices/past_month?by_code=US_RIG_COUNT

Past Year

GET /v1/prices/past_year?by_code=US_RIG_COUNT

See Historical Prices API for full documentation.


Code Examples

cURL

# Get latest price
curl -H "Authorization: Token YOUR_API_KEY" \
  "https://api.oilpriceapi.com/v1/prices/latest?by_code=US_RIG_COUNT"

Python

import requests

api_key = "YOUR_API_KEY"
url = "https://api.oilpriceapi.com/v1/prices/latest"

response = requests.get(
    url,
    params={"by_code": "US_RIG_COUNT"},
    headers={"Authorization": f"Token {api_key}"}
)

data = response.json()
print(f"Us Rig Count: {data['data']['formatted']}")

JavaScript

const apiKey = 'YOUR_API_KEY';
const code = 'US_RIG_COUNT';

fetch(`https://api.oilpriceapi.com/v1/prices/latest?by_code=${code}`, {
  headers: {
    'Authorization': `Token ${apiKey}`
  }
})
  .then(res => res.json())
  .then(data => {
    console.log(`Us Rig Count: ${data.data.formatted}`);
  });

Related Endpoints

  • Get All Prices - Get all commodity prices in one call
  • Historical Prices - Time-series data
  • Commodities List - Browse all commodities

Last Updated: 2025-12-16

Last Updated: 12/28/25, 12:24 AM