Drilling Intelligence API
Overview
Comprehensive drilling activity data including rig counts, frac spreads, well permits, and DUC (Drilled but Uncompleted) wells. Essential intelligence for energy traders, E&P companies, and market analysts tracking North American oil & gas production trends.
Access Level: Premium (Scale plan only)
Available Endpoints
| Endpoint | Description | Update Frequency |
|---|---|---|
/v1/drilling-intelligence/latest | All drilling metrics summary | Weekly/Monthly |
/v1/rig-counts/latest | Latest rig count data | Weekly (Fridays) |
/v1/drilling-intelligence/frac-spreads | Active frac spread counts | Monthly |
/v1/drilling-intelligence/well-permits | New well permit data | Monthly |
/v1/drilling-intelligence/duc-wells | DUC well inventory | Monthly |
/v1/drilling-intelligence/completions | Wells completed by basin | Monthly |
/v1/drilling-intelligence/wells-drilled | Wells drilled by basin | Monthly |
Authentication
All drilling intelligence endpoints require premium API access:
curl -X GET "https://api.oilpriceapi.com/v1/drilling-intelligence/latest" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Accept: application/json"
Rig Counts
Latest Rig Counts
GET /v1/rig-counts/latest
GET /v1/rig-counts/latest?by_code=CANADA_RIG_COUNT
Returns the newest observation for one series. by_code is US_RIG_COUNT (the default), CANADA_RIG_COUNT or INTERNATIONAL_RIG_COUNT, one value per request; repeating by_code returns 400 REPEATED_PARAMETER. period is not supported here and returns 422; use /v1/rig-counts/historical. Values below are illustrative.
Response:
{
"status": "success",
"data": {
"code": "US_RIG_COUNT",
"region": "United States",
"count": 604,
"currency": "COUNT",
"unit": "rigs",
"source": "market_reporting",
"created_at": "2026-11-07T00:00:00.000Z",
"collected_at": "2026-11-07T00:00:00.000Z",
"observed_at": "2026-11-06T12:00:00.000Z",
"source_date": "2026-11-06",
"formatted_date": "2026-11-06 12:00:00 UTC",
"freshness": {
"status": "current",
"age_seconds": "…",
"expected_max_age_seconds": "…"
}
}
}
| Field | Description |
|---|---|
code / region | Series code and region name (United States, Canada, International) |
count | Number of active rigs |
source_date | Baker Hughes report date for the observation; null on legacy rows collected before source dating |
observed_at | Source observation time, or null on legacy rows |
collected_at | When OilPriceAPI stored or last updated the row |
formatted_date | Observation time (collection time when there is none) as YYYY-MM-DD HH:MM:SS UTC |
source | Public source label |
freshness | Same age verdict as /v1/prices/latest: status, age_seconds, expected_max_age_seconds. Not present on historical rows |
No data returns 404 with {"status": "fail", "data": {"error": "No rig count data found"}}. For all three regions in one call, use GET /v1/rig-counts/current: rig_counts holds one entry per region in the shape above, and summary has total_us_rigs, total_canada_rigs, total_international_rigs (null, never 0, when a region has no observation), last_updated and source_date.
Source dates and the Baker Hughes overview
US and Canada rig counts are dated by Baker Hughes' own report date (source_date), not by when OilPriceAPI collected them. The primary feed is Baker Hughes' data workbook. When that feed stalls, a newer weekly total published on the Baker Hughes rig count overview page (https://rigcount.bakerhughes.com/) is served instead, but only when its source date matches its observation date and is newer than the last workbook week. It then appears in /v1/rig-counts/latest, /v1/rig-counts/current, /v1/drilling/rig-count and /v1/rig-counts/historical like any other week. Collection-dated or third-party rows never replace official Baker Hughes weeks.
Historical Rig Counts
GET /v1/rig-counts/historical?period=52w
GET /v1/rig-counts/historical?period=15y
GET /v1/rig-counts/historical?by_period[from]=2020-01-01&by_period[to]=2026-08-01
period is a relative window using d, w, m, or y and may span up to 15 years (for example 16w, 52w, 5y, 15y). by_period[from] and by_period[to] take an explicit YYYY-MM-DD range with the same 15-year ceiling. Do not combine the two. Longer windows are rejected with HTTP 422:
{
"status": "fail",
"data": {
"error": "Unsupported period. Use a relative period up to 15 years (for example 16w, 52w, 5y, or 15y)."
}
}
Results are paginated at up to 100 observations per page; pagination (page, per_page, total, total_pages) and Link headers (rel="first", "next", "last") traverse larger windows. The period object distinguishes the requested window from what is actually held:
{
"period": {
"from": "2011-08-30",
"to": "2026-08-30",
"relative": "15y",
"coverage_from": "2013-01-04",
"coverage_to": "2026-08-28",
"earliest_available": "2013-01-04",
"observations": 713,
"complete": false
}
}
| Field | Description |
|---|---|
from / to | The requested window |
coverage_from / coverage_to | First and last observation dates actually returned for the window |
earliest_available | Oldest weekly observation held for the series |
observations | Number of observations in the window |
complete | false when the requested window starts before earliest_available |
Frac Spreads
Active hydraulic fracturing crew counts by major basin:
GET /v1/drilling-intelligence/frac-spreads
Response:
{
"status": "success",
"data": {
"total_us": 265,
"by_basin": {
"permian": 145,
"eagle_ford": 35,
"bakken": 28,
"haynesville": 22,
"marcellus": 18,
"other": 17
},
"month_change": -8,
"year_ago": 290,
"metadata": {
"data_date": "2025-09-01",
"source": "Primary Vision"
}
}
}
Well Permits
New drilling permits issued by state:
GET /v1/drilling-intelligence/well-permits
Response:
{
"status": "success",
"data": {
"total_permits": 4250,
"by_state": {
"texas": 1850,
"new_mexico": 620,
"north_dakota": 380,
"oklahoma": 425,
"colorado": 290,
"wyoming": 185,
"other": 500
},
"month_over_month": {
"absolute": 125,
"percentage": 3.0
},
"oil_vs_gas": {
"oil_permits": 3200,
"gas_permits": 1050
},
"metadata": {
"period": "2025-08",
"source": "State Regulatory Agencies"
}
}
}
DUC Wells (Drilled but Uncompleted)
Inventory of wells drilled but awaiting completion:
GET /v1/drilling-intelligence/duc-wells
Response:
{
"status": "success",
"data": {
"total_duc_wells": 4435,
"by_basin": {
"permian": {
"count": 893,
"month_change": -45,
"months_inventory": 3.2
},
"eagle_ford": {
"count": 345,
"month_change": -12,
"months_inventory": 4.1
},
"bakken": {
"count": 328,
"month_change": -8,
"months_inventory": 5.5
},
"niobrara": {
"count": 287,
"month_change": 5,
"months_inventory": 4.8
}
},
"trends": {
"three_month": "declining",
"six_month": "declining",
"completion_rate": "accelerating"
},
"metadata": {
"data_date": "2025-08-31",
"source": "EIA Drilling Productivity Report",
"next_release": "2025-09-15"
}
}
}
Wells Completed
Latest EIA wells-completed series by basin. Requires the Scale plan. No query parameters — the endpoint always returns the most recent complete EIA report month, per basin plus a REST_LOWER48 remainder.
GET /v1/drilling-intelligence/completions
Response:
{
"status": "success",
"data": {
"completions": [
{
"code": "PERMIAN_WELLS_COMPLETED",
"name": "Permian Wells Completed",
"value": 484,
"unit": "wells completed",
"source": "eia_dpr",
"created_at": "2026-08-11T16:15:20.784Z",
"collected_at": "2026-08-11T16:15:20.784Z",
"observed_at": "2026-07-01T12:00:00.000Z",
"source_date": "2026-07-01",
"formatted_date": "2026-07-01 12:00:00 UTC"
}
],
"summary": {
"total": 1066,
"by_basin": {
"APPALACHIA": 90,
"BAKKEN": 69,
"EAGLEFORD": 117,
"HAYNESVILLE": 66,
"PERMIAN": 484,
"REST_LOWER48": 240
},
"period_type": "monthly",
"last_updated": "2026-08-11T16:15:20.850Z",
"source": "eia_dpr",
"source_date": "2026-07-01",
"status": "complete",
"quarter": {
"available": true,
"status": "complete",
"period": "2026-Q2",
"source_start_date": "2026-04-01",
"source_end_date": "2026-06-01",
"collected_at": "2026-08-11T16:15:23.795Z",
"total": 3069,
"by_basin": {
"APPALACHIA": 283,
"BAKKEN": 220,
"EAGLEFORD": 323,
"HAYNESVILLE": 186,
"PERMIAN": 1397,
"REST_LOWER48": 660
}
}
}
}
}
The quarter object rolls the last three complete report months into a calendar-quarter total. When no complete EIA well-activity report month is available, the endpoint returns HTTP 503 rather than partial data.
Wells Drilled
Latest EIA wells-drilled series by basin. Requires the Scale plan. Same response shape as completions, with the data array keyed wells_drilled and units of wells drilled.
GET /v1/drilling-intelligence/wells-drilled
Response (abbreviated):
{
"status": "success",
"data": {
"wells_drilled": [
{
"code": "PERMIAN_WELLS_DRILLED",
"name": "Permian Wells Drilled",
"value": 484,
"unit": "wells drilled",
"source": "eia_dpr",
"observed_at": "2026-07-01T12:00:00.000Z",
"source_date": "2026-07-01"
}
],
"summary": {
"total": 1024,
"by_basin": {
"APPALACHIA": 67,
"BAKKEN": 58,
"EAGLEFORD": 121,
"HAYNESVILLE": 56,
"PERMIAN": 484,
"REST_LOWER48": 238
},
"period_type": "monthly",
"source": "eia_dpr",
"status": "complete"
}
}
}
Both endpoints return HTTP 401 without a valid API key, HTTP 403 on plans below Scale, and HTTP 503 when no complete authoritative EIA report month is available.
Summary Endpoint
Get all drilling intelligence metrics in one call:
GET /v1/drilling-intelligence/summary
Market Impact Analysis
Leading Indicators
| Metric | Increasing | Decreasing |
|---|---|---|
| Rig Count | Higher future production | Lower future production |
| Frac Spreads | Near-term production boost | Production slowdown |
| Well Permits | Future drilling activity up | Future drilling down |
| DUC Wells | Potential for quick production | Completions outpacing drilling |
Typical Lead Times
- Rig Count → Production: 4-6 months
- Frac Spreads → Production: 1-3 months
- Permits → Drilling: 6-12 months
- DUC Completions → Production: 2-4 weeks
Rate Limits
- Requests: 60 requests per fixed 60-second window per API key on all plans
- Cache: 5 minutes for real-time, 1 hour for historical
Example Usage
Python - Production Forecast
import requests
def analyze_production_outlook():
headers = {'Authorization': 'Token YOUR_API_KEY'}
# Get drilling intelligence
response = requests.get(
'https://api.oilpriceapi.com/v1/drilling-intelligence/summary',
headers=headers
)
data = response.json()
# Simple production outlook
rig_trend = data['rig_counts']['us']['week_change']
duc_trend = data['duc_wells']['total_change']
if rig_trend > 0 and duc_trend < 0:
return "Bullish: Rigs up, DUCs being completed"
elif rig_trend < 0 and duc_trend > 0:
return "Bearish: Rigs down, DUCs building"
else:
return "Neutral: Mixed signals"
JavaScript - Basin Comparison
async function compareBasins() {
const response = await fetch(
"https://api.oilpriceapi.com/v1/drilling-intelligence/completions",
{
headers: {
Authorization: "Token YOUR_API_KEY",
},
},
);
const { data } = await response.json();
// Find the basin completing the most wells this report month
const mostActive = Object.entries(data.summary.by_basin).sort(
(a, b) => b[1] - a[1],
)[0];
console.log(
`Most active basin: ${mostActive[0]} with ${mostActive[1]} wells completed`,
);
}
Error Codes
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Premium access required |
| 404 | Data not found |
| 429 | Rate limit exceeded |
| 503 | Data temporarily unavailable |
Data Sources
- Rig Counts: Baker Hughes (weekly, Fridays at noon CST)
- Frac Spreads: Primary Vision (monthly)
- Well Permits: State regulatory agencies (monthly)
- DUC Wells: EIA Drilling Productivity Report (monthly)
Related Endpoints
/v1/prices/latest?code=WTI_USD- WTI crude oil price/v1/prices/latest?code=NATURAL_GAS_USD- Natural gas price/v1/storage/cushing- Cushing oil storage levels