Complete reference for integrating upstream cost data and SEC financials into your applications. RESTful endpoints with JSON responses and comprehensive filtering.
๐ Get API TokenPermanent API keys for integrations, scripts, and external tools. No expiration or refresh needed.
X-API-Key: afe_your_api_key_here
Get your key: Login to API Portal
Session-based tokens for web applications. Tokens expire and require refresh.
Authorization: Bearer <firebase_token>
Get token: Via Firebase Auth in web applications
Login to get your personal API access token for authentication.
Get API Token โhttps://api.afeleaks.com
All API endpoints are relative to this base URL.
Access well costs, production data, and completion details from 100,000+ wells
Well-level cost summaries
/api/cost-data
Returns summarized cost data by well (API-level)
/api/cost-breakdown
Returns line-item level cost details
Well information and details
/api/wells
General well metadata with dynamic column selection
/api/locations
Well-path or location data (WKT format)
Production and revenue data
/api/production
Production records by well and date
/api/product
Product revenue data with well information
Completion and geology data
/api/casing
Casing design records
/api/formations
Formation tops and geology records
/api/surveys
Directional survey records
/api/welltests
Flow/pressure test data
Vendor costs and regulatory files
/api/vendor-costs
Vendor cost data with well information
/api/files
Regulatory file links and documents
limit
Max records (default: 100, max: 10,000)
offset
Skip N records for pagination
API
API well number
operator
Operator name
state
State
county
County
reservoir
Reservoir/formation
lease
Lease name
leaseNum
Lease number
wellNum
Well number
district
Regulatory district
spudDateMin
Min spud date (YYYY-MM-DD)
spudDateMax
Max spud date (YYYY-MM-DD)
updateDateMin
Min update date (YYYY-MM-DD)
updateDateMax
Max update date (YYYY-MM-DD)
Detailed descriptions of all columns returned by upstream data endpoints
Note: The /api/wells endpoint supports dynamic column selection using the columns parameter.
You can specify which columns to return (e.g., ?columns=API,operator,state,spudDate) from any of the columns listed below.
API โ 10- or 12-digit API well number (unique well identifier)api12 โ 12-digit API number (alternate format)api14 โ 14-digit API number (alternate format)lease โ Lease nameleaseNum โ Lease numberwellNum โ Well numberdistrict โ Regulatory districtcounty โ County nameoilGas โ Well type (oil/gas/both)field โ Field namefieldNum โ Field numberspudDate โ Date well was spudded (drilling started)lastSpud โ Date of last spud (if re-entered)operator โ Operator name (current or at time of record)operator_clean โ Cleaned operator name (standardized)compDate โ Completion datefirst_production โ Date of first productionlast_production โ Date of last productionreservoir โ Cleaned/standardized reservoir namelateral โ Lateral length (ft)tvd โ True vertical depth (ft)md โ Measured depth (ft)perf_top โ Top of perforated interval (ft)perf_bottom โ Bottom of perforated interval (ft)perf_interval โ Perforated interval length (ft)depth โ Total depth (ft)fluid โ Total fluid used (gallons)proppant โ Total proppant used (lbs)prop_per_ft โ Proppant per foot (lbs/ft)location โ Well location (legal description or lat/lon)state โ Stateplug_date โ Plugging datecasing_design โ Casing design descriptionupdate_date โ Date of last updateTaxpayerNumber โ Primary taxpayer numberTaxpayerName โ Primary taxpayer nameTaxSubType โ Tax subtype (if applicable)date โ Production/revenue dateleaseNum โ Lease numberdistrict โ Regulatory districtSecondaryTaxpayerNumber โ Secondary taxpayer numberSecondaryTaxpayerName โ Secondary taxpayer nameAPIGravity โ API gravity (oil quality measure)volume โ Product volume (e.g., barrels, mcf, etc.)value โ Product value (USD)marketing โ Marketing adjustment or revenueproduct โ Product type (oil, gas, NGL, etc.)leaseOil โ Lease oil production (bbl)leaseGas โ Lease gas production (mcf)update_date โ Date of last updateAPI โ API well numbertype โ AFE/Actualcapex โ Total capital expenditure (USD)component โ Cost component (e.g., drilling, completion)update_date โ Date of last updateoperator โ Operator name (cleaned)state โ Statecounty โ Countyreservoir โ Reservoir namelease โ Lease namewellNum โ Well numberspudDate โ Spud datefp_year โ First production yearperf_interval โ Perforated interval (ft)tvd โ True vertical depth (ft)afedate โ AFE dateAPI โ API well numbercost_type โ AFE/Actualtype โ Cost type (e.g., material, service)component โ Cost component (e.g., casing, cement)code โ Cost code or identifiercategory โ Cost category (e.g., drilling, completion)value โ Cost value (USD)operator โ Operator name (cleaned)state โ Statecounty โ Countyreservoir โ Reservoir namelease โ Lease namewellNum โ Well numberspudDate โ Spud datefp_year โ First production yearperf_interval โ Perforated interval (ft)tvd โ True vertical depth (ft)afedate โ AFE dateAPI โ API well numbertype โ Casing string type (e.g., surface, production)segment โ Casing segment/intervalhole_size โ Hole size (inches)hole_depth โ Hole depth (ft)size โ Casing size (inches)weight โ Casing weight (lbs/ft)grade โ Casing gradeupdate_date โ Date of last updateAPI โ API well numberdate โ Production dateoil โ Oil produced (barrels)gas โ Gas produced (MCF)water โ Water produced (barrels)update_date โ Date of last updateAPI โ API well numbergeometry_wkt โ Well geometry/location (WKT format)update_date โ Date of last updateAPI โ API well numberMD โ Measured depth (ft)TVD โ True vertical depth (ft)Inclination โ Inclination (degrees)Azimuth โ Azimuth (degrees)DogLegSeverity โ Dog leg severityN โ North coordinateE โ East coordinateVS โ Vertical sectionupdate_date โ Date of last updateAPI โ API well numberdateTst โ Test dateoilD โ Oil rate (barrels/day)gasD โ Gas rate (MCF/day)waterD โ Water rate (barrels/day)chokeSize โ Choke sizetubingPressure โ Tubing pressure (psi)casingPressure โ Casing pressure (psi)testType โ Test typetestHours โ Test duration (hours)reservoir โ Reservoir testedupdate_date โ Date of last updateAPI โ API well numberreservoir โ Formation/reservoir nametvd โ Top TVD (ft)md โ Top MD (ft)update_date โ Date of last updateAPI โ API well numberForm โ File/form typeurl โ File download URLupdate_date โ Date of last updateAPI โ API well numberdate โ Cost datevendor โ Vendor namecode โ Vendor cost codetype โ Cost typedescription โ Cost descriptionnote โ Additional notescost โ Cost amount (USD)link โ Reference linkcost_type โ AFE/Actualrig โ Rig informationphase โ Project phaseAccess SEC XBRL financial data from 10-K and 10-Q filings with comprehensive filtering
Filing metadata
/api/financials/sub
Company submission metadata (filing information)
Display information
/api/financials/pre
Presentation/display info for financial statement elements
Financial values
/api/financials/num
Numeric financial data values from SEC filings
Narrative content
/api/financials/text
Text/narrative financial data
/api/financials/textbig
Large text content (MD&A, footnotes) in chunks
cik โ Central Index Key (company identifier)name โ Company nameadsh โ Accession number (filing identifier)sic โ Standard Industrial Classificationfye โ Fiscal year end (MMDD)form โ SEC form type (10-K, 10-Q, etc.)period โ Reporting period end datefiled โ Filing dateaccepted โ SEC acceptance dateprevrpt โ Previous report indicatordetail โ Detail levelinstance โ XBRL instance documentadsh โ Accession numbertag โ XBRL tag nameversion โ Taxonomy versionplabel โ Presentation labelnegating โ Negating multiplierstmt โ Statement type (BS, IS, CF, EQ)inpth โ Presentation pathrfile โ R file referencerorder โ Report ordertbl โ Table identifieradsh โ Accession numbertag โ XBRL tag nameversion โ Taxonomy versionenddate โ Period end dateqtrs โ Number of quartersuom โ Unit of measurevalue โ Numeric valuefootnote โ Footnote referencefiled โ Filing dateaxis โ Dimensional axissegment โ Dimensional segmentadsh โ Accession numbertag โ XBRL tag nameversion โ Taxonomy versionenddate โ Period end dateqtrs โ Number of quartersvalue โ Text valuefootnote โ Footnote referencefiled โ Filing dateaxis โ Dimensional axissegment โ Dimensional segmentadsh โ Accession numbertag โ XBRL tag nameversion โ Taxonomy versionenddate โ Period end dateqtrs โ Number of quarterschunk_order โ Chunk sequence numbervalue โ Large text chunkfootnote โ Footnote referencefiled โ Filing dateaxis โ Dimensional axissegment โ Dimensional segmentcurl -H "X-API-Key: afe_your_key" \
"https://api.afeleaks.com/api/cost-data?state=TX&limit=100"
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.afeleaks.com/api/cost-data?state=TX&limit=100"
curl -H "X-API-Key: afe_your_key" \
"https://api.afeleaks.com/api/production?limit=1000&offset=5000"
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.afeleaks.com/api/production?limit=1000&offset=5000"
curl -H "X-API-Key: afe_your_key" \
"https://api.afeleaks.com/api/financials/num?cik=0000078003&form=10-K"
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.afeleaks.com/api/financials/num?cik=0000078003&form=10-K"
library(httr)
library(jsonlite)
# Using permanent API key
api_key <- "afe_your_generated_key_here"
resp <- GET(
url = "https://api.afeleaks.com/api/wells",
query = list(limit = 10, state = "TX"),
add_headers(`X-API-Key` = api_key)
)
if (status_code(resp) == 200) {
data <- content(resp, "parsed")
wells_df <- data$data
} else {
print(paste("Error:", status_code(resp)))
}
import requests
import pandas as pd
# Using permanent API key
api_key = "afe_your_generated_key_here"
headers = {"X-API-Key": api_key}
response = requests.get(
"https://api.afeleaks.com/api/wells",
params={"limit": 10, "state": "TX"},
headers=headers
)
if response.status_code == 200:
data = response.json()
wells_df = pd.DataFrame(data["data"])
else:
print(f"Error: {response.status_code}")
// Using permanent API key
const apiKey = "afe_your_generated_key_here";
fetch('https://api.afeleaks.com/api/wells?limit=10&state=TX', {
headers: {
'X-API-Key': apiKey
}
})
.then(response => response.json())
.then(data => {
console.log(`Retrieved ${data.data.length} wells`);
console.log('Wells:', data.data);
})
.catch(error => console.error('Error:', error));
// Power Query M code
let
apiKey = "afe_your_generated_key_here",
url = "https://api.afeleaks.com/api/wells?limit=1000",
headers = [#"X-API-Key" = apiKey],
response = Web.Contents(url, [Headers = headers]),
json = Json.Document(response),
data = json[data],
table = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
table
Get up and running with the AFE Leaks API in minutes
Choose your authentication method and get your credentials.
Test the API with a simple request to get well data.
curl -H "X-API-Key: afe_your_key" \
"https://api.afeleaks.com/api/wells?limit=10"
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.afeleaks.com/api/wells?limit=10"
Use the API clients or build custom integrations for your specific needs.
Our team can help you integrate AFE Leaks data into your existing systems and provide custom solutions.