AFE Leaks API
This REST API provides access to oil & gas well cost data, completions, locations, production, and associated metadata. Access is protected by Firebase authentication and Stripe subscription validation.
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.
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.
Example Full Filter
https://api.afeleaks.com/api/wells?state=TX&county=Reeves&operator=Devon&reservoir=Wolfcamp%20A&lease=Example&wellNum=1234&spudDateMin=2018-01-01&spudDateMax=2022-12-31&fpYearMin=2019&fpYearMax=2023&perfIntervalMin=4000&perfIntervalMax=7000&tvdMin=9000&tvdMax=11000&limit=200
Questions? bd@afeleaks.com