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.

Preview the first 100 rows

What this is

OGA049's DRILLING PERMIT TAPE, daf804.txt.gz: the permit master segment on its own, one 510-byte record per approved W-1 filing, carrying the operator, the lease, the well number, the intended total depth, the surface tract, the type of application and every date the Commission stamps on a permit.

It is the same 950,665 records as the '02' segment inside the master-and-trailer tape, so EZRRC serves it from the same table rather than parsing the same records twice. Upstream compared the two files on the same day: identical key sets, nothing in one and not the other, and process_permits_master.py refuses to be pointed at daf804 for that reason. Downloading the original here still gets you daf804 itself, byte for byte, and it is much the smaller file — 83 MB against 174.

This is not texas.permits. The daily and end-of-month files are the rolling daf420.dat extract — 115,579 rows, the last few years, one flattened row per permit with coordinates on it. This table is the whole history, and it has no coordinates.

What you can do with it

Read the permit record RRC's mainframe writes, byte offset for byte offset, over the full half-century — the intended depth, the surface tract, the spud and surface-casing dates, and the amended, extended, expired and cancelled dates that say what became of the permit.

Count permits by operator, county, district or application type for any month since 1976, which the daily and end-of-month files cannot do because they do not reach back.

Join to the wellbore database on the API number to find out whether the permitted hole was ever drilled: all 40,000 permits in two independent samples resolved to a wellbore record.

Gotchas

No coordinates. The 14 and 15 GPS trailer records are in the layout, but the August 2026 tape carries none of them, so nothing here can be mapped. Use the daily or end-of-month permit file for that.

district is RRC's INTERNAL district number, not the district the industry prints: 10 is District 08, 11 is 8A, 13 is District 09, 14 is District 10, 07 is 6E. Reading '10' as District 10 puts 194,516 Permian Basin permits in the Panhandle. county_code holds the three-digit code — unlike texas.permits, which holds the county NAME in the column of that name.

application_type is the RAW two-digit code here, '01' rather than 'DRILL', because nothing decodes this file on load the way the daily one is decoded. The code list is rrc.application_type, which documents fifteen; six appear in the table.

The permit number is not a key. Before September 1986 an application's status number and its permit number were different numbers — 306,221 of these 950,665 rows — and six permit numbers sit under two applications each after renumbering. The key is (status_no, status_seq): the application and its amendment sequence, which counts DOWN from 99, so 99 is the original filing and 98 the first amendment.

The surface location is stored two ways and a flag says which. Where location_format_flag is 'N' (726,536 rows) the typed section/block/survey/abstract columns are filled; where it is 'O' (224,119) the whole 82-byte area is free text in surface_location_old and the two *_distance_old columns. The nearest-well block is free text in every row of the current file: nearest_well_feet is populated in none of the 950,665.

All-zero numerics and dates are the mainframe's "not given" and load as NULL rather than 0 or 0001-01-01. cancellation_reason is filled in three rows of the entire file.

Sentinel dates are everywhere: 0000-00-00, 00000000 and 1900-01-01 all mean "not recorded". The upstream loader turns the unparseable ones into NULL, but a 1900 date that parsed cleanly is still a placeholder, not a fact.

Record layout

70 columns. Byte positions are 1-based and come from the RRC record layout, so you can check our decoding against the original file yourself.

dp_permit 70 columns

Record layout for dp_permit — 70 columns, with byte positions
# Column Type Bytes RRC name Meaning Lookup
1 status_no key join integer DA-STATUS-NUMBER The seven-digit status number RRC assigns to a W-1 application when it arrives. For applications since September 1986 it is also the permit number; for the 306,221 older ones it is not, which is why every table in this family is keyed on it rather than on the permit number. e.g. 830732
2 status_seq key integer DA-STATUS-SEQUENCE-NUMBER The amendment sequence, which counts DOWN from 99: 99 is the original filing, 98 the first amendment, 97 the second. 877,260 of the 993,336 applications are still at 99. e.g. 99
3 permit_no join integer 3-9 DA-PERMIT-NUMBER The permit number, carried down from the permit segment. Indexed but not a key: it differs from the status number on 306,221 pre-1986 permits, and six permit numbers sit under two applications each. e.g. 830732
4 permit_seq integer 10-11 DA-PERMIT-SEQUENCE-NUMBER The permit's own amendment sequence, counting down from 99.
5 county_code join text 12-14 DA-PERMIT-COUNTY-CODE Three-digit county code AS RRC APPROVED IT, which is not always the county the operator reported in the root. '000' on the rows with no county. e.g. 389 Texas county code
6 lease_name text 15-46 DA-PERMIT-LEASE-NAME Lease name as RRC approved it, up to 32 characters. e.g. LEFT HAND BULL
7 district join text 47-48 DA-PERMIT-DISTRICT RRC district as approved, stored as the internal ADP code: 07 is 6E, 08 is 7B, 09 is 7C, 10 is District 08, 11 is 8A, 13 is District 09, 14 is District 10. Six rows carry '00'. e.g. 10 RRC district (internal number)
8 well_no text 49-54 DA-PERMIT-WELL-NUMBER Well number as RRC approved it, up to six characters. e.g. 8901H
9 total_depth integer measured in ft 55-59 DA-PERMIT-TOTAL-DEPTH Permitted total depth of the well, in feet. Zero on the tape means not given and loads as NULL. e.g. 10700
10 operator_no join integer 60-65 DA-PERMIT-OPERATOR-NUMBER The operator's P-5 organization number as approved, an integer. All 20,000 sampled values resolve to texas.operators. e.g. 166150
11 application_type text 66-67 DA-TYPE-APPLICATION What the operator asked permission to do, as the RAW two-digit code: 01 drill, 05 other, 07 re-enter, 09 field transfer, 14 recompletion, 15 reclass are the six the current file uses, and rrc.application_type documents all fifteen the layout defines. Nothing decodes this on load, unlike texas.permits. e.g. 01 Drilling permit application type
12 other_explanation text 68-97 DA-OTHER-EXPLANATION Up to thirty characters of free text explaining application type 05, 'other'. Filled on 306,297 permits.
13 address_unique_no integer 98-103 DA-ADDRESS-UNIQUE-NUMBER RRC's internal key for retrieving the operator's address from the P-5 system.
14 zip_prefix text 104-108 DA-ZIP-CODE-PREFIX First five digits of the operator's ZIP code.
15 zip_suffix text 109-112 DA-ZIP-CODE-SUFFIX Last four digits of the operator's ZIP code.
16 fiche_set_no integer 113-118 DA-FICHE-SET-NUMBER Microfiche page the permit was printed on. RRC internal.
17 onshore_county text 119-121 DA-ONSHORE-COUNTY Three-digit code of the corresponding onshore county when the drilling is in an offshore county. '000' and '0' are the placeholders for 'not offshore'.
18 received_date date 122-129 DA-RECEIVED-DATE Date the W-1 was received in Austin, CCYYMMDD on the tape.
19 issue_date date 130-137 DA-PERMIT-ISSUED-DATE Date the application was approved. 1976-05-28 to 2026-07-07 on the current file, and the date the industry counts. e.g. 2017-11-01
20 amended_date date 138-145 DA-PERMIT-AMENDED-DATE Date the permit was amended. Filled on 162,735 permits.
21 extended_date date 146-153 DA-PERMIT-EXTENDED-DATE Date the permit was extended. Filled on 4,962 permits.
22 spud_date date 154-161 DA-PERMIT-SPUD-DATE Date drilling started. Filled on 552,348 permits — RRC records one only when it is reported, so a null is not proof the well was never drilled.
23 surface_casing_date date 162-169 DA-PERMIT-SURFACE-CASING-DATE Date surface casing was set in the well. Filled on 359,909 permits.
24 well_status text 170 DA-WELL-STATUS One-character well status code, from OGA049M Appendix B. W (543,015) and D (99,731) dominate and 267,534 permits carry none. No code set has been transcribed for it, so exports show the raw letter.
25 well_status_date date 171-178 DA-PERMIT-WELL-STATUS-DATE Date the well status above was recorded. Filled on 683,174 permits.
26 expired_date date 179-186 DA-PERMIT-EXPIRED-DATE Date the permit expires. Filled on 949,694 of the 950,665 permits.
27 cancelled_date date 187-194 DA-PERMIT-CANCELLED-DATE Date the permit was cancelled. Filled on 5,906 permits.
28 cancellation_reason text 195-224 DA-CANCELLATION-REASON Up to thirty characters of free text giving the reason for cancellation. Filled on three rows of the whole file.
29 p12_filed_flag text 225 DA-P12-FILED-FLAG Y when a Form P-12, certificate of pooling authority, was filed with this permit.
30 substd_acreage_flag text 226 DA-SUBSTANDARD-ACREAGE-FLAG Y when the drilling tract is smaller than the standard acreage density rules require, which is what the Form W-1A certifies.
31 rule36_flag text 227 DA-RULE-36-FLAG Y when the well is expected to produce significant quantities of hydrogen sulphide, which is what Statewide Rule 36 governs.
32 h9_flag text 228 DA-H9-FLAG Y when Form H-9, the certificate of compliance with Rule 36, was filed.
33 rule37_case_no integer 229-235 DA-RULE-37-CASE-NUMBER The case number when the application needs an exception to Statewide Rule 37, the well-spacing rule. Filled on 138,884 permits.
34 rule38_docket_no integer 236-242 DA-RULE-38-DOCKET-NUMBER The docket number when the application needs an exception to Statewide Rule 38, the well-density rule. Filled on 12,547 permits.
35 location_format_flag text 243 DA-LOCATION-FORMATION-FLAG Which of the two surface-location formats this row uses. 'N' (726,536 rows) means the typed section/block/survey/abstract and footage columns are filled; 'O' (224,119) means the whole 82-byte area is free text in surface_location_old and the two *_distance_old columns. Upstream stores the row under the flag that governs it rather than always slicing it the 'new' way.
36 surface_location_old text 244-295 DA-OLD-SURFACE-LOCATION Up to 52 characters of free-form surface location — section, block, survey and abstract run together — on the 224,103 rows whose location_format_flag is 'O'.
37 surface_section text 244-251 DA-SURFACE-SECTION Survey section the surface hole is in, new location format. Filled on 400,949 permits.
38 surface_block text 252-261 DA-SURFACE-BLOCK Survey block the surface hole is in, new location format.
39 surface_survey text 262-316 DA-SURFACE-SURVEY Name of the original land survey the surface hole is in, up to 55 characters.
40 surface_abstract text 317-322 DA-SURFACE-ABSTRACT Abstract number of the survey the surface hole is in.
41 surface_acres numeric measured in acres 326-333 DA-SURFACE-ACRES Acres in the lease, to two decimal places. PIC 9(06)V9(2) on the tape, with the point implied; upstream applies it. e.g. 443.01
42 surface_miles_from_city numeric measured in mi 334-339 DA-SURFACE-MILES-FROM-CITY Miles from the nearest town, to two decimal places. PIC 9(04)V9(2) — SIX characters, not eight: reading eight takes the first two letters of the direction with it and turns '000800NE' into a distance.
43 surface_direction_from_city text 340-345 DA-SURFACE-DIRECTION-FROM-CITY Free-form direction to the nearest town, six characters.
44 surface_nearest_city text 346-358 DA-SURFACE-NEAREST-CITY Name of the nearest town, thirteen characters. e.g. SARAGOSA, TX
45 surface_lease_distance_old text 359-386 DA-OLD-SURFACE-LEASE-DISTANCE The distance and direction from the lease lines as one 28-character free-text string, on the rows whose location format is 'O'.
46 surface_lease_feet1 numeric measured in ft 359-366 DA-SURFACE-LEASE-FEET-1 Feet from the first lease line, two decimal places.
47 surface_lease_direction1 text 367-379 DA-SURFACE-LEASE-DIRECTION-1 Direction of the first lease-line call, e.g. 'N', 'S (RIVER)'.
48 surface_lease_feet2 numeric measured in ft 380-387 DA-SURFACE-LEASE-FEET-2 Feet from the second lease line, two decimal places.
49 surface_lease_direction2 text 388-400 DA-SURFACE-LEASE-DIRECTION-2 Direction of the second lease-line call.
50 surface_survey_distance_old text 401-428 DA-OLD-SURFACE-SURVEY-DISTANCE The distance and direction from the survey lines as one 28-character free-text string, on the 'O'-format rows.
51 surface_survey_feet1 numeric measured in ft 401-408 DA-SURFACE-SURVEY-FEET-1 Feet from the first survey line, two decimal places.
52 surface_survey_direction1 text 409-421 DA-SURFACE-SURVEY-DIRECTION-1 Direction of the first survey-line call.
53 surface_survey_feet2 numeric measured in ft 422-429 DA-SURFACE-SURVEY-FEET-2 Feet from the second survey line, two decimal places.
54 surface_survey_direction2 text 430-442 DA-SURFACE-SURVEY-DIRECTION-2 Direction of the second survey-line call.
55 nearest_well text 443-470 DA-NEAREST-WELL Distance and direction to the nearest well, as 28 characters of free text. Filled on 945,346 permits — the old format, which is the only one this file uses.
56 nearest_well_feet numeric measured in ft 443-450 DA-NEAREST-WELL-FEET Feet to the nearest well in the new format. Populated in NONE of the 950,665 rows: nearest_well_format_flag is 'O' on all but nine.
57 nearest_well_direction text 451-463 DA-NEAREST-WELL-DIRECTION Direction to the nearest well in the new format. Empty for the same reason.
58 nearest_well_format_flag text 471 DA-NEAREST-WELL-FORMAT-FLAG 'O' when the nearest-well call is free text and 'N' when it is typed. 'O' on 950,656 of the 950,665 rows.
59 final_update date 472-479 DA-FINAL-UPDATE DA-FINAL-UPDATE: the date the permit was validated after completion papers were reviewed and the well began to be documented as a producing well. Filled on 319,514 permits, and the closest thing in this file to 'the hole was drilled and completed'.
60 cancelled_flag text 480 DA-CANCELLED-FLAG 'P' when the whole permit was cancelled, 'F' when only one filing (amendment) was.
61 spud_in_flag text 481 DA-SPUD-IN-FLAG Y when a spud-in date has been received for this permit. RRC internal.
62 directional_well_flag text 482 DA-DIRECTIONAL-WELL-FLAG Y when the wellbore deviates from vertical.
63 sidetrack_well_flag text 483 DA-SIDETRACK-WELL-FLAG Y when the well is a sidetrack — drilled sideways out of an existing hole, usually around an obstruction, and back down.
64 moved_indicator text 484 DA-MOVED-INDICATOR Y while a permit record is being moved to the correct status record, N once the nightly program has done it. RRC internal.
65 conv_issued_date date 485-492 DA-PERMIT-CONV-ISSUED-DATE The issue date again, decoded. The tape stores 30,000,000 minus CCYYMMDD so the mainframe could sort newest first; upstream reads it back to a date. Filled on 950,650 rows and should agree with issue_date.
66 rule37_granted_code text 493 DA-RULE-37-GRANTED-CODE 'A' or 'B', naming the subsection a Rule 37 permit was granted under — 37(h)(2)(A) or 37(h)(2)(B). Filled on 448,622 permits.
67 horizontal_well_flag text 494 DA-HORIZONTAL-WELL-FLAG The RAW flag: 'Y' means horizontal (197,299 rows). The manual says N and 0 both mean it is not, and the file uses both — 397,691 N and 355,675 zeros. texas.permits renders the same byte as the words Horizontal and Vertical; this column does not. e.g. Y
68 duplicate_permit_flag text 495 DA-DUPLICATE-PERMIT-FLAG Y when the permit duplicates a previously issued one that was given an unperfed completion status. The duplicate is created when completion papers are filed and is typed as a recompletion.
69 nearest_lease_line text 496-502 DA-NEAREST-LEASE-LINE Distance in feet to the nearest lease line. PIC X(07), and it really is text: '1154', '40.0', '1.0' all appear, so it is kept as written rather than coerced. e.g. 1.0
70 api_number join text 503-510 API-NUMBER API number formatted 42-CCC-UUUUU, the spelling texas.permits and texas.wellbore use. Present on 950,646 of the 950,665 rows, and every sampled value resolves to a wellbore. e.g. 42-389-36336

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.

Drilling permit application type 15 values

Read by application_type

What the operator asked permission to do. A single wellbore accumulates several of these over its life: an original DRILL, then a RE-ENTER or a PLUG-BACK years later. The pipeline that loads this data resolves the code on the way in, so the warehouse column holds the text below rather than the raw RRC code. Both are recorded here so the original filing can be read either way.

See all 15 codes

Source: OilGasDataProcessing process_permits.applicationTypeString (OGA049 field ROOT-APPLICATION-TYPE)

Texas county code 277 values

Read by county_code

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.

See all 277 codes

Source: Generated from texas.pdq_gp_county

RRC district (internal number) 14 values

Read by district

RRC's internal sequential district numbering, 01 to 14 plus 20 for statewide. The production data, the UIC database and the high-cost gas certifications all use this. Internal 07 is District 6E, 08 is 7B, 09 is 7C, 10 is District 08, 11 is 8A, 13 is 09 and 14 is District 10. There is no internal 12.

RRC district (internal number) — 14 codes and their meanings
CodeMeans
01 District 01 — San Antonio (internal 01) Internal district number 01, which RRC prints as District 01 and administers from San Antonio.
02 District 02 — San Antonio (internal 02) Internal district number 02, which RRC prints as District 02 and administers from San Antonio.
03 District 03 — Houston (internal 03) Internal district number 03, which RRC prints as District 03 and administers from Houston.
04 District 04 — Corpus Christi (internal 04) Internal district number 04, which RRC prints as District 04 and administers from Corpus Christi.
05 District 05 — Kilgore (internal 05) Internal district number 05, which RRC prints as District 05 and administers from Kilgore.
06 District 06 — Kilgore (internal 06) Internal district number 06, which RRC prints as District 06 and administers from Kilgore.
07 District 6E — Kilgore (internal 07) Internal district number 07, which RRC prints as District 6E and administers from Kilgore.
08 District 7B — Abilene (internal 08) Internal district number 08, which RRC prints as District 7B and administers from Abilene.
09 District 7C — San Angelo (internal 09) Internal district number 09, which RRC prints as District 7C and administers from San Angelo.
10 District 08 — Midland (internal 10) Internal district number 10, which RRC prints as District 08 and administers from Midland.
11 District 8A — Midland (internal 11) Internal district number 11, which RRC prints as District 8A and administers from Midland.
13 District 09 — Wichita Falls (internal 13) Internal district number 13, which RRC prints as District 09 and administers from Wichita Falls.
14 District 10 — Pampa (internal 14) Internal district number 14, which RRC prints as District 10 and administers from Pampa.
20 District 20 — State Wide (internal 20) Internal district number 20, which RRC prints as District 20 and administers from State Wide.

Source: Generated from texas.pdq_gp_district.district_no

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.

Drilling Permit Master joins to Full Wellbore Database (ASCII) on API number — many rows here share a single row there.

permitted the wellbore

The permit's API number, resolved to the wellbore database — which is how you find out whether a permitted hole was ever actually drilled. Both files write it dashed as 42-CCC-UUUUU, so the columns compare directly. Two independent samples of 20,000 permits each matched 20,000: a random 3% TABLESAMPLE, and a contiguous block of status numbers, because a sample of one shape can flatter a key that is really clustered. api_number is blank on 19 of the 950,665 permits and those cannot join. Many permits to one hole, not one to one: a wellbore accumulates several permits over its life.

drilling-permit-master.api_number = full-wellbore-ascii.api_number

Drilling Permit Master joins to P-5 Organization (ASCII) on Operator number = ID — many rows here share a single row there.

was permitted to

The P-5 organization number RRC approved on the permit, resolved to the operator directory for the company's name, address and current P-5 status. Both sides are integers here — unusually for this catalogue — so the comparison runs as printed. All 20,000 sampled permits resolve. The directory is a snapshot of today, so it gives you the operator's status now and not its status when the permit was issued.

drilling-permit-master.operator_no = p5-organization-ascii.id

Drilling Permit Master joins to Horizontal Drilling Permits on Permit number = Permit number and Permit sequence = Sequence number — one row here matches many rows there.

is the permit

Every horizontal permit record back to its full permit master row, for the depth, the dates, the application type and the surface tract daf318 does not carry. Measured over the WHOLE of texas.permits_horizontal: 173,511 of 173,511 match on the permit number alone, and 173,501 still match when the amendment sequence is included — ten rows name a permit+sequence pair the master file does not have. Many to one on purpose: a permit appears in daf318 once per permitted field crossed with each validated completion, so 173,511 records hold 144,600 distinct permit+sequence pairs.

horizontal-drilling-permits.permit_no = drilling-permit-master.permit_no AND horizontal-drilling-permits.sequence_no = drilling-permit-master.permit_seq

Drilling Permit Master joins to RRC Oil / ICE Inspections (Every Inspection) on Permit number = Drilling permit number — one row here matches many rows there.

inspected a well permitted as

The drilling permit of the wellbore inspected. Only 60,467 of 3,981,260 inspections carry a permit number — RRC records it mainly on visits made BEFORE the well was completed — but where it is there it is good: 59,912 of those 60,467 find a permit in the daf802 master. The rolling daf420 extract behind Drilling Permits (Daily) finds only 43,826 of the same rows, because it holds a window rather than the history. These two columns are different types — one is text, the other an integer — so a direct equality is rejected by Postgres. Cast the text side to integer, which also disposes of any leading zeros; casting the integer to text would not, because '000123' and 123 are not equal as text.

rrc-oil-ice-inspections-detail.drilling_permit_no = drilling-permit-master.permit_no

Drilling Permit Master joins to Statewide Field Data on Permit number = Discovery permit number — one row here matches many rows there.

was discovered by the well permitted as

From a field to the drilling permit of its discovery well. 4,455 of the 4,456 fields that carry a discovery permit find it in the permit master -- the whole W-1 history since 1976 -- against 83 in the rolling daily extract, which only holds the last few years. Only 4,456 of the 65,826 fields carry one at all: the rest were discovered before RRC started recording it here.

statewide-field-data.discovery_permit_no = drilling-permit-master.permit_no

Drilling Permit Master joins to RRC Oil / ICE Violations on Permit number = Drilling permit number — one row here matches many rows there.

cited a well permitted by

The same permit number against the daf802 permit master, which is the whole W-1 history rather than the bores one file happens to list: 8,123 of the 8,191 violations that carry a permit number find a permit. These two columns are different types — one is text, the other an integer — so a direct equality is rejected by Postgres. Cast the text side to integer, which also disposes of any leading zeros; casting the integer to text would not, because '000123' and 123 are not equal as text.

rrc-oil-ice-inspections.drilling_permit_no = drilling-permit-master.permit_no

Where this comes from

Published by
Texas Railroad Commission — the original page
Original format
Fixed-width Columns are byte ranges with no separators, described only in a scanned record layout.
RRC publishes
Updated once a month (Monthly. Available by the 7th working day.)
RRC download link
GoAnywhere MFT
Record layout manuals
Our table
texas.dp_permit

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.