AFE Leaks API
Authentication
All requests must include a valid Firebase ID token in the Authorization
header as:
Authorization: Bearer <id_token>
Base URL
https://api.afeleaks.com
Endpoints
GET /api/cost-data
Returns summarized cost data by well (API-level).
GET /api/cost-breakdown
Returns line-item level cost details.
GET /api/wells
Returns general well metadata. Supports dynamic column selection.
GET /api/production
Returns production records.
GET /api/casing
Returns casing design records.
GET /api/locations
Returns well-path or location data.
GET /api/surveys
Returns directional survey records.
GET /api/welltests
Returns flow/pressure test data.
GET /api/formations
Returns formation tops and geology records.
GET /api/files
Returns regulatory file links.
GET /api/product
Returns product data with associated well information. Supports filtering by product details and well metadata.
Product Filters:
product
- Product name/typedateMin
/dateMax
- Date rangevalueMin
/valueMax
- Value rangevolumeMin
/volumeMax
- Volume range
Well Filters:
API
- API numberleaseNum
- Lease numberdistrict
- Districtoperator
- Operator namestate
- Statecounty
- Countyreservoir
- Reservoirlease
- Lease namewellNum
- Well numberspudDateMin
/spudDateMax
- Spud date range
Column Reference: Oil & Gas Data Endpoints
This section describes the columns returned by the main oil & gas API endpoints. Not all endpoints return every column; see endpoint-specific docs above for details.
og_data (Well Metadata)
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)operator_original
– Original operator name as filedoperator_current
– Most recent operator namecompDate
– Completion datefp_year
– First production yearfirst_production
– Date of first productionlast_production
– Date of last productionlp_year
– Last production yearreservoir_original
– Original reservoir namereservoir
– Cleaned/standardized reservoir namelateral
– Lateral length (ft)tvd
– True vertical depth (ft)md
– Measured depth (ft)maxCasingDepth
– Maximum casing depth (ft)perf_top
– Top of perforated interval (ft)perf_bottom
– Bottom of perforated interval (ft)perf_interval
– Perforated interval length (ft)shutInDate
– Date well was shut inpbDepth1
– Plug back depth (ft)depth
– Total depth (ft)swdPermits
– SWD (salt water disposal) permit infototal_proppant_filings
– Total proppant used (from filings, lbs)fluid
– Total fluid used (gallons)proppant
– Total proppant used (lbs)fluid_recomplete
– Fluid used in recompletion (gallons)proppant_recomplete
– Proppant used in recompletion (lbs)permit_type
– Permit type (e.g., new drill, recomplete)prop_per_ft
– Proppant per foot (lbs/ft)permit_date_refrac
– Date of refrac permittvd_min_survey
– Minimum TVD from survey (ft)tvd_max_survey
– Maximum TVD from survey (ft)md_min_survey
– Minimum MD from survey (ft)md_max_survey
– Maximum MD from survey (ft)location
– Well location (legal description or lat/lon)state
– Stateplug_date
– Plugging datesn
– Serial numbersurvey_file
– Survey file link or nametdDate
– Total depth datemaxHoleDepth
– Maximum hole depth (ft)MineralOwnerType
– Mineral owner type (fee, state, federal, etc.)reservoir_deepest
– Deepest reservoir encounteredcasing_design
– Casing design description
product (Production/Revenue Data)
TaxpayerNumber
– 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.)
cost_data_aggregate (Cost Data Summary)
API
– API well numberlocal_link
– Local file or document linkcapex
– Total capital expenditure (USD)type
– AFE/Actualcomponent
– Cost component (e.g., drilling, completion)update_date
– Date of last updatelink
– External document or source link
cost_breakdown_details (Cost Line Items)
API
– API well numbercode
– Cost code or identifiercategory
– Cost category (e.g., drilling, completion)type
– Cost type (e.g., material, service)component
– Cost component (e.g., casing, cement)value
– Cost value (USD)cost_type
– AFE/Actual
casing_data (Casing Design)
API
– 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 gradetop
– Top of casing (ft)depth
– Set depth (ft)cement
– Cement type/descriptioncement_class
– Cement classtoc
– Top of cement (ft)boc
– Bottom of cement (ft)packer
– Packer depth (ft)packer_type
– Packer typecasing_remaining
– Remaining casing (ft)DateSet
– Date casing was settest_pressure
– Test pressure (psi)
prod_data (Production Data)
API
– API well numberdate
– Production dateoil
– Oil produced (barrels)gas
– Gas produced (MCF)water
– Water produced (barrels)NGL
– NGL produced (barrels)
locs (Well Locations)
API
– API well numbergeometry_wkt
– Well geometry/location (WKT format)
survey_data (Directional Surveys)
API
– API well numberMD
– Measured depth (ft)TVD
– True vertical depth (ft)Inclination
– Inclination (degrees)Azimuth
– Azimuth (degrees)NS
– North-south offset (ft)EW
– East-west offset (ft)VS
– Vertical section (ft)DLS
– Dogleg severity (degrees/100ft)file
– Survey file link (internal)url
– Survey file URL
test_data (Well Tests)
API
– API well numberdateTst
– Test dateoilD
– Oil rate (barrels/day)gasD
– Gas rate (MCF/day)wtrD
– Water rate (barrels/day)gasGrav
– Gas gravityapiGrav
– API gravityftp
– Flowing tubing pressure (psi)siwhp
– Shut-in wellhead pressure (psi)bhp
– Bottomhole pressure (psi)lineP
– Line pressure (psi)casingP
– Casing pressure (psi)choke
– Choke size/typemethod
– Test methodgasGravDry
– Gas gravity (dry)bht
– Bottomhole temperature (°F)
formation_data (Formation Tops)
API
– API well numberreservoir
– Formation/reservoir nametvd
– Top TVD (ft)md
– Top MD (ft)
file_links (Regulatory Files)
API
– API well numberForm
– File/form typeurl
– File download URL
XBRL Financial Data Endpoints
Access to SEC XBRL financial data from 10-K and 10-Q filings. All endpoints support pagination with limit
and offset
parameters.
GET /api/financials/sub
Returns company submission metadata (filing information).
Query Parameters:
cik
- Company CIK numberadsh
- Accession numberform
- Form type (10-K, 10-Q, etc.)name
- Company name (partial match)
Columns:
cik
- Central Index Key, unique SEC identifier for the companyname
- Company name as reported to SECadsh
- Accession number, unique identifier for the filingsic
- Standard Industrial Classification codefye
- Fiscal year end date (MMDD format)form
- SEC form type (10-K, 10-Q, etc.)period
- Reporting period end date (YYYYMMDD)fy
- Fiscal yearfp
- Fiscal period (Q1, Q2, Q3, Q4, FY)filed
- Date the filing was submitted to SEC
GET /api/financials/pre
Returns presentation/display information for financial statement elements.
Query Parameters:
adsh
- Accession numbertag
- XBRL tag nametbl
- Table identifierstmt
- Statement type (BS, IS, CF, EQ)plabel
- Presentation label (partial match)cik
- Company CIK numbername
- Company name (partial match)
Columns:
adsh
- Accession number linking to submissionreport
- Report number within the filingmenucat
- Menu category for presentationtbl
- Table identifier (e.g., "BS", "IS", "CF")parentreport
- Parent report numberultparentrpt
- Ultimate parent report numberline
- Line number in the presentation (order)stmt
- Statement type (BS=Balance Sheet, IS=Income Statement, CF=Cash Flow, CI = Consolidated Income Statement, EQ=Equity)tag
- XBRL element tag nameversion
- XBRL taxonomy versionprole
- Presentation roleplabel
- Human-readable presentation labelnegating
- Indicates if value should be negated for displaygrp
- Group identifierarc
- Arc identifier for relationshipsnegative
- Indicates if the value is typically negativeptag
- Parent tag namepversion
- Parent tag versionjoinID
- Internal join identifier
GET /api/financials/num
Returns numeric financial data values.
Query Parameters:
adsh
- Accession numbertag
- XBRL tag nameenddate
- Period end dateaxis
- Dimensional axis namesegment
- Dimensional segment valuecik
- Company CIK numbername
- Company name (partial match)
Columns:
adsh
- Accession number linking to submissiontag
- XBRL element tag nameversion
- XBRL taxonomy versionqtrs
- Number of quarters represented (1, 2, 3, 4, 12)uom
- Unit of measure (USD, shares, etc.)value
- The actual numeric valuedimn
- Dimensionality (0=no dimensions, 1=single dimensions, 2=multiple dimensions, etc.)dcml
- Decimal precision of the valueaxis
- Dimensional axis name (e.g., "EntityAxis", "BusinessSegmentAxis")segment
- Dimensional segment value (e.g., "EntityName", "SegmentName")segmentlabel
- Human-readable segment labelenddate
- Period end date (YYYY-MM-DD)startdate
- Period start date (YYYY-MM-DD)joinID
- Internal join identifier
GET /api/financials/text
Returns text/narrative financial data.
Query Parameters:
adsh
- Accession numbertag
- XBRL tag nameenddate
- Period end dateaxis
- Dimensional axis namesegment
- Dimensional segment valuecik
- Company CIK numbername
- Company name (partial match)
Columns:
adsh
- Accession number linking to submissiontag
- XBRL element tag nameversion
- XBRL taxonomy versionqtrs
- Number of quarters representedvalue
- The text contentdimn
- Dimensionality indicatoraxis
- Dimensional axis namesegment
- Dimensional segment valuesegmentlabel
- Human-readable segment labelenddate
- Period end datestartdate
- Period start datejoinID
- Internal join identifier
GET /api/financials/textbig
Returns large text content (MD&A, footnotes, etc.) split into chunks.
Query Parameters:
adsh
- Accession numbertag
- XBRL tag nameenddate
- Period end dateaxis
- Dimensional axis namesegment
- Dimensional segment valuechunk_order
- Order of text chunkcik
- Company CIK numbername
- Company name (partial match)
Columns:
adsh
- Accession number linking to submissiontag
- XBRL element tag nameversion
- XBRL taxonomy versionqtrs
- Number of quarters representedvalue
- Text chunk contentdimn
- Dimensionality indicatoraxis
- Dimensional axis namesegment
- Dimensional segment valuesegmentlabel
- Human-readable segment labelenddate
- Period end datestartdate
- Period start datejoinID
- Internal join identifierchunk_order
- Sequential order of text chunks
Common Query Parameters
limit
: Max records to return (default: 100, max: 10,000)offset
: Starting row offset for pagination (default: 0)
Filtering
All endpoints that join with og_data
support the following filters:
operator
state
county
reservoir
lease
wellNum
spudDateMin
/spudDateMax
fpYearMin
/fpYearMax
perfIntervalMin
/perfIntervalMax
tvdMin
/tvdMax
Column Selection (Wells Endpoint)
Use the ?columns=
parameter to return a subset of columns.
/api/wells?columns=API,lease,leaseNum,wellNum,state,county,operator,...
Errors
403 Unauthorized
– missing/invalid token or no subscription500 Internal Server Error
– server failure
Pagination Example
/api/cost-data?limit=5000&offset=10000
Returns rows 10,001–15,000.
Compare Plans
Compare Plans
Basic ($10/mo or $100/yr)
- ✔ Basic App Access
- ✔ Benchmark well costs
- ✔ Key driver trends
- ✔ Access paid research
- ❌ No single-well detail
- ❌ No cost breakdowns
Premium ($100/mo or $1000/yr)
- ✔ All Basic features
- ✔ Premium App Access
- ✔ Single-well cost data
- ✔ Detailed cost breakdowns
- ✔ Outlier & savings analysis
API Access (Contact Us)
- ✔ All Premium features
- ✔ Direct API access to all endpoints
- ✔ Integrate into Power BI / internal systems
- ✔ Ideal for teams & dashboards
- 📌 Requires separate license agreement