AFE Leaks API

Authentication

All requests must include a valid Firebase ID token in the Authorization header as:

Authorization: Bearer <id_token>

Get your API 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:

Well Filters:

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 name
  • leaseNum – Lease number
  • wellNum – Well number
  • district – Regulatory district
  • county – County name
  • oilGas – Well type (oil/gas/both)
  • field – Field name
  • fieldNum – Field number
  • spudDate – 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 filed
  • operator_current – Most recent operator name
  • compDate – Completion date
  • fp_year – First production year
  • first_production – Date of first production
  • last_production – Date of last production
  • lp_year – Last production year
  • reservoir_original – Original reservoir name
  • reservoir – Cleaned/standardized reservoir name
  • lateral – 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 in
  • pbDepth1 – Plug back depth (ft)
  • depth – Total depth (ft)
  • swdPermits – SWD (salt water disposal) permit info
  • total_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 permit
  • tvd_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 – State
  • plug_date – Plugging date
  • sn – Serial number
  • survey_file – Survey file link or name
  • tdDate – Total depth date
  • maxHoleDepth – Maximum hole depth (ft)
  • MineralOwnerType – Mineral owner type (fee, state, federal, etc.)
  • reservoir_deepest – Deepest reservoir encountered
  • casing_design – Casing design description
product (Production/Revenue Data)
  • TaxpayerNumber – Primary taxpayer number
  • TaxpayerName – Primary taxpayer name
  • TaxSubType – Tax subtype (if applicable)
  • date – Production/revenue date
  • leaseNum – Lease number
  • district – Regulatory district
  • SecondaryTaxpayerNumber – Secondary taxpayer number
  • SecondaryTaxpayerName – Secondary taxpayer name
  • APIGravity – API gravity (oil quality measure)
  • volume – Product volume (e.g., barrels, mcf, etc.)
  • value – Product value (USD)
  • marketing – Marketing adjustment or revenue
  • product – Product type (oil, gas, NGL, etc.)
cost_data_aggregate (Cost Data Summary)
  • API – API well number
  • local_link – Local file or document link
  • capex – Total capital expenditure (USD)
  • type – AFE/Actual
  • component – Cost component (e.g., drilling, completion)
  • update_date – Date of last update
  • link – External document or source link
cost_breakdown_details (Cost Line Items)
  • API – API well number
  • code – Cost code or identifier
  • category – 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 number
  • type – Casing string type (e.g., surface, production)
  • segment – Casing segment/interval
  • hole_size – Hole size (inches)
  • hole_depth – Hole depth (ft)
  • size – Casing size (inches)
  • weight – Casing weight (lbs/ft)
  • grade – Casing grade
  • top – Top of casing (ft)
  • depth – Set depth (ft)
  • cement – Cement type/description
  • cement_class – Cement class
  • toc – Top of cement (ft)
  • boc – Bottom of cement (ft)
  • packer – Packer depth (ft)
  • packer_type – Packer type
  • casing_remaining – Remaining casing (ft)
  • DateSet – Date casing was set
  • test_pressure – Test pressure (psi)
prod_data (Production Data)
  • API – API well number
  • date – Production date
  • oil – Oil produced (barrels)
  • gas – Gas produced (MCF)
  • water – Water produced (barrels)
  • NGL – NGL produced (barrels)
locs (Well Locations)
  • API – API well number
  • geometry_wkt – Well geometry/location (WKT format)
survey_data (Directional Surveys)
  • API – API well number
  • MD – 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 number
  • dateTst – Test date
  • oilD – Oil rate (barrels/day)
  • gasD – Gas rate (MCF/day)
  • wtrD – Water rate (barrels/day)
  • gasGrav – Gas gravity
  • apiGrav – API gravity
  • ftp – 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/type
  • method – Test method
  • gasGravDry – Gas gravity (dry)
  • bht – Bottomhole temperature (°F)
formation_data (Formation Tops)
  • API – API well number
  • reservoir – Formation/reservoir name
  • tvd – Top TVD (ft)
  • md – Top MD (ft)
file_links (Regulatory Files)
  • API – API well number
  • Form – File/form type
  • url – 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:

Columns:
  • cik - Central Index Key, unique SEC identifier for the company
  • name - Company name as reported to SEC
  • adsh - Accession number, unique identifier for the filing
  • sic - Standard Industrial Classification code
  • fye - Fiscal year end date (MMDD format)
  • form - SEC form type (10-K, 10-Q, etc.)
  • period - Reporting period end date (YYYYMMDD)
  • fy - Fiscal year
  • fp - 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:

Columns:
  • adsh - Accession number linking to submission
  • report - Report number within the filing
  • menucat - Menu category for presentation
  • tbl - Table identifier (e.g., "BS", "IS", "CF")
  • parentreport - Parent report number
  • ultparentrpt - Ultimate parent report number
  • line - 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 name
  • version - XBRL taxonomy version
  • prole - Presentation role
  • plabel - Human-readable presentation label
  • negating - Indicates if value should be negated for display
  • grp - Group identifier
  • arc - Arc identifier for relationships
  • negative - Indicates if the value is typically negative
  • ptag - Parent tag name
  • pversion - Parent tag version
  • joinID - Internal join identifier

GET /api/financials/num

Returns numeric financial data values.

Query Parameters:

Columns:
  • adsh - Accession number linking to submission
  • tag - XBRL element tag name
  • version - XBRL taxonomy version
  • qtrs - Number of quarters represented (1, 2, 3, 4, 12)
  • uom - Unit of measure (USD, shares, etc.)
  • value - The actual numeric value
  • dimn - Dimensionality (0=no dimensions, 1=single dimensions, 2=multiple dimensions, etc.)
  • dcml - Decimal precision of the value
  • axis - Dimensional axis name (e.g., "EntityAxis", "BusinessSegmentAxis")
  • segment - Dimensional segment value (e.g., "EntityName", "SegmentName")
  • segmentlabel - Human-readable segment label
  • enddate - 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:

Columns:
  • adsh - Accession number linking to submission
  • tag - XBRL element tag name
  • version - XBRL taxonomy version
  • qtrs - Number of quarters represented
  • value - The text content
  • dimn - Dimensionality indicator
  • axis - Dimensional axis name
  • segment - Dimensional segment value
  • segmentlabel - Human-readable segment label
  • enddate - Period end date
  • startdate - Period start date
  • joinID - Internal join identifier

GET /api/financials/textbig

Returns large text content (MD&A, footnotes, etc.) split into chunks.

Query Parameters:

Columns:
  • adsh - Accession number linking to submission
  • tag - XBRL element tag name
  • version - XBRL taxonomy version
  • qtrs - Number of quarters represented
  • value - Text chunk content
  • dimn - Dimensionality indicator
  • axis - Dimensional axis name
  • segment - Dimensional segment value
  • segmentlabel - Human-readable segment label
  • enddate - Period end date
  • startdate - Period start date
  • joinID - Internal join identifier
  • chunk_order - Sequential order of text chunks

Common Query Parameters

Filtering

All endpoints that join with og_data support the following filters:

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

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
Subscribe Monthly Subscribe Yearly

Premium ($100/mo or $1000/yr)

  • ✔ All Basic features
  • ✔ Premium App Access
  • ✔ Single-well cost data
  • ✔ Detailed cost breakdowns
  • ✔ Outlier & savings analysis
Subscribe Monthly Subscribe Yearly

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
Contact Us
Back to Top