Statewide API Data (dBase)
Queryable dBase
The API-to-lease map: every mapped Texas well bore, its lease, its quad and its plug date.
Get the data
Free. You will be asked to confirm an email address before the files are built — that is the only gate, and it is there so we can tell you when a large export is ready.
What this is
MAF016, RRC's Mapping Well Data Download, decoded from the 254 per-county dBase files into one table of 1,556,119 entries covering 1,198,492 distinct API numbers. It is the sheet that ties an API number to everything else RRC keys on: the lease or gas well ID it is carried under and on which schedule, the field and lease name, the operator as filed on the P-5, the drilling permit number, total depth, the completion date, the W-3 plug date, whether the well is on the proration schedule, and the USGS 7.5-minute quadrangle the bore is mapped in.
The API number is here four ways so a join needs no string surgery: `api_no` as the file publishes it (eight digits, county then unique), `api_county` and `api_unique` as the wellbore file splits them, and `api_number` dashed as 42-CCC-UUUUU, which is how the permit and wellbore files write it. Texas is state 42, so the eight digits plus that prefix are the full ten-digit API. That translation is the whole point of the dataset: 1,556,103 of the 1,556,119 entries reach a row in the wellbore file on the API halves, and 115,406 of the 115,579 current drilling permits reach a row here on the dashed form.
What you can do with it
Turn an API number into a lease: 812,660 entries name an oil lease number and 306,668 a gas well ID, which is the handle PDQ production and the proration schedules are keyed on.
Go the other way and list every mapped bore on a lease, in a field, or under an operator name. Find plugged wells by plug date, wells that came off the schedule, and API numbers that were superseded — 148,471 entries point at the number that replaced them.
Pull a county's wells with their survey, block, section and abstract for a title or land-position check without opening a shapefile.
Gotchas
One row per API is wrong here. The mapping extract carries a bore once for each lease or schedule entry it has been under, so the 1,556,119 rows cover 1,198,492 API numbers. `seq` numbers the entries within an API, and 215,300 bores have a second one. Pick one per bore — the latest completion, say — before you count wells.
It is a MAPPING extract, and RRC says so: "records contained in this file will match the API numbers identified in the quad maps, and may not represent all known API numbers in the map area." It is close to complete against the wellbore file — 1,198,476 of the 1,212,107 wellbore rows appear — but it is not the API authority.
`on_off_schedule` reads backwards. Per the manual, 'N' means the well IS on the proration schedule and 'Y' means it is off it. The column is stored as published: 481,882 N and 637,446 Y.
The lease column is one field REDEFINEd two ways. `rrc_lease_id` is the six characters as published; `oil_lease_no` is the five-digit oil lease number, filled in only when `oil_gas_code` is 'O', and `gas_rrc_id` the six-digit gas well ID, only when it is 'G'. 436,791 entries carry no schedule code at all and hold '000000' in `rrc_lease_id` with both derived columns null.
There is no district column. Oil lease numbers are only unique within a district — 39,458 of the 70,729 oil lease numbers PDQ carries are used in more than one — so joining `oil_lease_no` straight to a lease table matches the wrong lease more often than not. Gas well IDs are effectively statewide (102 of 294,448 repeat across districts), so `gas_rrc_id` is safe. For an oil lease, go through the API number instead: the PDQ well completion table carries both, and 819,086 of its 820,005 rows are in this map.
Coverage is the 254 onshore counties, code 001 to 507, all odd — which is also the county FIPS code. The federal-waters file apiFED.dbf contributes no rows to the current snapshot, so offshore blocks are absent.
26,643 entries have the literal 'NO LOCATION DATA AVAILABLE' in `survey`, which is the manual's own marker for a bore whose survey, block, section and abstract are unknown.
Dates are CCYYMMDD and mostly sane, but not always: completion dates run from 1900 to 2070. `total_depth`, `permit_no` and the two dates are zero-filled in the source when absent and are null here.
DBF truncates column names to ten characters, so the names in the pristine files (APINUM, WELLID, TOTAL_DEPT, REFER_TO_A) differ from both the MAF016 copybook's and the ones used here.
Record layout
26 columns.
api_well_map
26 columns
| # | Column | Type | RRC name | Meaning | Lookup |
|---|---|---|---|---|---|
| 1 |
county_code
join
|
text | — | The county whose dBase file this row came from, taken from the file name: api003.dbf gives '003'. Always equal to the first three digits of the API number, and also the county's FIPS code. e.g. 003 | Texas county code |
| 2 |
api_no
key
join
|
text | APINUM |
The eight-digit API number as the file publishes it: three digits of county then five of unique well. Texas is state 42, so the full ten-digit API is 42 plus these eight. e.g. 00300001 | — |
| 3 |
seq
key
|
smallint | — | The entry's ordinal among the rows sharing its API number, in file order. Not an RRC field -- the mapping extract carries a bore once per lease or schedule entry, so 1,556,119 rows cover 1,198,492 APIs and (api_no, seq) is the key. seq = 1 gives one row per bore. e.g. 1 | — |
| 4 |
api_county
join
|
text | — | The county component of the API number, split out so it joins to texas.wellbore's api_county without string surgery. Not in the source file. e.g. 003 | Texas county code |
| 5 |
api_unique
join
|
text | — | The five-digit well component of the API number, split out to match texas.wellbore's api_unique. Unique only within its county. Not in the source file. e.g. 00001 | — |
| 6 |
api_number
join
|
text | — | The same API written 42-CCC-UUUUU, which is the form texas.permits and texas.wellbore use. Not in the source file; the loader composes it so the join needs no reformatting. e.g. 42-003-00001 | — |
| 7 |
quad_num
|
text | QUADNUM |
The USGS 7.5-minute quadrangle the bore is mapped in, seven digits. The source file is organised by quad and sorted by API within it. e.g. 3202213 | — |
| 8 |
survey
|
text | SURVEY |
The original grantee, or the company or institution common to a group of surveys, as shown on the General Land Office county patent survey map. 26,643 rows carry the literal 'NO LOCATION DATA AVAILABLE', which is the manual's marker for a bore whose survey, block, section and abstract are all unknown. e.g. PSL | — |
| 9 |
block
|
text | BLOCK |
The number or letter identifying a group of surveys as a block on the GLO county patent survey map. e.g. A-42 | — |
| 10 |
section
|
text | SECTION |
The number describing a surveyed parcel, or a numbered subdivision of one. e.g. 6 | — |
| 11 |
abstract
|
text | ABSTRACT |
The GLO abstract number of the original land survey, assigned at patenting and unique within its county. e.g. 1959 | — |
| 12 |
operator
|
text | OPERATOR |
The organization name as filed on Form P-5. A NAME, not a number: this file carries no P-5 organization number, so an operator join has to go through the API number and another file. e.g. COMPOSTELLA OIL COMPANY | — |
| 13 |
total_depth
|
integer measured in ft | TOTAL_DEPT |
The maximum depth of the well bore, in feet. Zero in the source means null here. e.g. 4700 | — |
| 14 |
well_no
|
text | WELLID |
The well number, as the operator designates it. e.g. 2 | — |
| 15 |
lease_name
|
text | LEASE_NAME |
The name assigned to the lease. e.g. GINDORF | — |
| 16 |
permit_no
join
|
integer | PERMIT_NUM |
The drilling permit number RRC assigned to the approved application to drill. 000000 in the source means null here, which is 590,716 entries. | — |
| 17 |
rrc_lease_id
|
text | GAS_RRCID |
The lease field exactly as published: six characters holding either a five-digit oil lease number or a six-digit gas well ID, which the MAF016 copybook REDEFINEs one over the other. It is '000000' on the 436,791 entries carrying no schedule code. e.g. 14825 | — |
| 18 |
oil_lease_no
join
|
text | — | The five-digit oil lease number, split out of rrc_lease_id when oil_gas_code is 'O'. Only unique within a district, and this file has no district column: 39,458 of the 70,729 oil lease numbers PDQ carries are used in more than one district, so joining on this alone matches the wrong lease more often than not. e.g. 14825 | — |
| 19 |
gas_rrc_id
join
|
text | — | The six-digit gas well RRC identification number, split out of rrc_lease_id when oil_gas_code is 'G'. Effectively statewide -- 102 of the 294,448 PDQ carries repeat across districts -- so unlike the oil lease number it can be joined on its own. e.g. 015885 | — |
| 20 |
field_name
|
text | FIELD_NAME |
The name of the field the lease is in. A name only; there is no field number here. e.g. FUHRMAN-MASCHO | — |
| 21 |
completion_date
|
date | COMPLETION |
The date the well was completed, CCYYMMDD in the source. Present on 829,776 entries and running from 1900 to 2070, so the extremes are mainframe typing rather than facts. e.g. 1960-04-19 | — |
| 22 |
plug_date
|
date | PLUG_DATE |
The plug date reported on the Form W-3 plugging report. Present on 608,590 entries; absent means no plugging report has been filed, not that the well is producing. e.g. 2004-08-25 | — |
| 23 |
refer_to_api
join
|
text | REFER_TO_A |
The API number now assigned to this bore, where this one has been superseded. Set on 148,471 entries; go to that number for the well's information. e.g. 00100037 | — |
| 24 |
on_off_schedule
|
text | ON_OFF_SCH |
Whether the well is on the proration schedule -- and it reads backwards. Per MAF016, 'N' means ON the schedule (481,882 entries) and 'Y' means OFF it (637,446). Stored as published. e.g. Y | — |
| 25 |
oil_gas_code
|
text | OIL_GAS_CO |
Which proration schedule the well is or was carried on: 'O' oil (812,660 entries), 'G' gas (306,668). Null on 436,791, which is also where rrc_lease_id is all zeros. e.g. O | Oil or gas schedule |
| 26 |
file_date
|
date | — | The last-update stamp in the dBase header of the county file this row came from. Not an RRC data field -- it is how old the snapshot is, and every file in the current load says 2026-08-13. e.g. 2026-08-13 | — |
Code lookups used here
Every coded column in this dataset resolves to a real lookup table, so
a well code of G can be read as what it actually means.
Texas county code 277 values
Read by county_code, api_county
The three-digit county code RRC uses, which is also the county's FIPS code. `canonical_value` carries the full five-digit state plus county FIPS, so a county joins straight to Census geography. There are 254 Texas counties and 277 codes; the extras are offshore areas and administrative entries.
Source: Generated from texas.pdq_gp_county
Oil or gas schedule 2 values
Read by oil_gas_code
Which schedule a lease is carried on. This is not decoration: an oil lease number and a gas lease number can be the same digits and mean different leases, so a lease key is only unique with this code and the district in it.
| Code | Means |
|---|---|
O |
Oil Carried on the oil proration schedule; lease numbers are oil lease numbers. |
G |
Gas Carried on the gas proration schedule; lease numbers are gas well IDs. |
Source: PDQ Dump user manual; values confirmed as the complete distinct set in texas.pdq_og_lease_cycle.oil_gas_code
What this joins to
The Railroad Commission never states these keys anywhere in the files. They are the reason the data is hard to use, so here they are with the exact columns on both sides.
Statewide API Data (dBase) joins to Full Wellbore Database (ASCII) on API county and API unique — many rows here share a single row there.
maps the well bore
The API map to the wellbore database, on the two halves of the API number. 1,556,103 of the map's 1,556,119 entries reach a wellbore row — sixteen do not — and 1,198,476 of the wellbore file's 1,212,107 rows are in the map. This is the join that makes the map worth having: the wellbore file has the well's depth, plugging and 14(b)(2) status and no lease name, quad or survey; the map has those and no depth history. Deduplicate the map side first — an API can have several entries, one per lease it has been carried under, and seq = 1 takes the first.
statewide-api-data-dbase.api_county = full-wellbore-ascii.api_county AND statewide-api-data-dbase.api_unique = full-wellbore-ascii.api_unique
Statewide API Data (dBase) joins to PDQ Well Completion Directory on API county = API county code and API unique = API unique number — rows can match many rows in both directions.
is carried on the schedule as
The way to get from an API number to a lease WITH its district and schedule, which the map alone cannot give you: PDQ's well completion table carries the API halves alongside oil_gas_code, district_no and lease_no. 819,086 of PDQ's 820,005 completions have an entry in the map, and 998,442 of the map's 1,556,119 entries reach a completion — the rest are bores that were never carried on a proration schedule.
statewide-api-data-dbase.api_county = pdq-well-completion.api_county_code AND statewide-api-data-dbase.api_unique = pdq-well-completion.api_unique_no
Statewide API Data (dBase) joins to PDQ Regulatory Lease Directory on Gas RRC ID = Lease number — many rows here share a single row there.
is on the gas lease
The gas half of the map's lease column, resolved to the lease directory. 302,481 of the 306,668 gas entries match, and 289,503 of the 293,684 distinct gas well IDs. Safe without a district only because gas well IDs are effectively statewide: 102 of the 294,448 PDQ carries appear in more than one district. The width does the schedule restriction on its own — PDQ writes oil lease numbers five characters wide, so a six-character gas ID matches 0 non-gas rows. None of this holds for oil_lease_no, which is why there is no oil equivalent of this join; go through the well completion table instead.
statewide-api-data-dbase.gas_rrc_id = pdq-regulatory-lease-directory.lease_no
Statewide API Data (dBase) joins to Mapped Well Locations (Surface) on API number = API — one row here matches many rows there.
is the well leased as
From a coordinate to a lease. This is the join the catalogue was missing: the API sheet turns an API number into a lease, an operator, a field and a permit, and this turns it into a place. 1,004,128 of the 1,379,242 mapped surface holes find a row. The 375,114 that do not are points RRC has mapped and not tied to a current lease -- old, plugged or reassigned wells -- so neither table is a substitute for the other, and a left join is the right one in both directions. Both columns hold the same eight digits, county then unique, as text. No cast and no padding.
mapped-well-surface-locations.api = statewide-api-data-dbase.api_no
Statewide API Data (dBase) joins to Mapped Well Locations (Bottom Hole) on API number = API — one row here matches many rows there.
is the well leased as
The same join from the other end of the well, and the more useful of the two for a horizontal: it puts the lease against where the well actually produces rather than against the pad it was drilled from. 1,021,109 of the 1,396,053 bottom holes find a row, for the same reason the surface edge misses -- a mapped point is not always a currently leased well. Join on `api`, not `api10`: api10 carries the sidetrack code appended and is 10 characters only on wells that have one.
mapped-well-bottom-holes.api = statewide-api-data-dbase.api_no
Statewide API Data (dBase) joins to Drilling Permit Master and Trailer — Daily File (with latitudes and longitudes) on API number — rows can match many rows in both directions.
was assigned the mapped API
From a drilling permit to the mapped well bore, on the dashed 42-CCC-UUUUU form both files write. 115,406 of the 115,579 permits in the current file find an entry in the map. A permit whose api_number is blank — an application withdrawn before an API was assigned — can still be found here: the map carries permit_no, and 115,368 of the 115,579 permits match on that instead.
drilling-permits-daily.api_number = statewide-api-data-dbase.api_number
Where this comes from
- Published by
- Texas Railroad Commission — the original page
- Original format
- dBase DBF tables from the 1980s. Readable by GIS software, not by a spreadsheet.
- RRC publishes
- Updated twice a week (Twice a week.)
- RRC download link
- GoAnywhere MFT
- Record layout manual
- Our table
texas.api_well_map
EZRRC is an independent mirror of public-domain data published by the Texas Railroad Commission. It is not affiliated with or endorsed by the RRC. For any legal or regulatory purpose, verify against the official RRC release.