RRC Oil / ICE Inspections (Every Inspection)
Queryable Delimited
Every completed RRC oil-and-gas inspection since August 2015 — 3.98 million of them — whether or not it found anything.
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
INSPECTIONS.txt, the larger half of RRC's weekly OIL/ICE release and the denominator its violations file has always been missing. One row per completed inspection by an Oil and Gas Division inspector since 1 August 2015: who was inspected, where, when, by which district office, and whether every statewide rule looked at came back compliant.
3,981,260 rows in the load of 2026-08-22, from 2015-08-01 to 2026-08-14, of which 382,507 are marked non-compliant and 3,598,753 compliant. VIOLATIONS.txt beside it — published here as RRC Oil / ICE Violations — holds 396,093 rows, the individual statewide rules behind those non-compliant inspections.
The extract carries no inspection number of its own, so the table adds a surrogate `id` and the natural key is the inspected location plus the date. Everything else is RRC's: the operator and P-5 number, the oil lease or gas well ID, the lease or facility name, the API number, county, well number, drilling permit number, the complaint number where the visit answered a complaint, and the field.
What you can do with it
Ask the questions the violations file alone cannot answer. How often is an operator actually inspected, not just cited? Which district offices inspect most, and how has that moved since 2015? What share of visits to a lease come back non-compliant? How many inspections follow a public complaint?
Join to RRC Oil / ICE Violations on the inspected location and the date to see which rules a non-compliant inspection wrote up, and to the P-5 organization directory for the operator's current name and status.
Inspections that carry a drilling permit number are pre-completion visits — join those to the drilling permit master to see the well being drilled.
Gotchas
This is the whole history since August 2015, replaced in full every Monday, not a weekly increment. The file grows without bound and RRC says so; anything before 1 August 2015 is an open-records request to open.records@rrc.texas.gov, not a download.
Most rows do not identify a wellbore. Measured on 2026-08-21: 1,627,544 of 3,981,260 rows carry no API number at all (many inspections are of a facility or a whole lease), 1,623,068 carry no well number, and only 60,467 carry a drilling permit number. RRC's own manual says a field may be blank or hold a placeholder such as 'unknown' or '00000' where the inspector did not have the information, so a blank is a real answer here, not a parse failure.
`oil_lease_gas_well_id` is five digits for an oil lease and six for a gas well ID — 2,573,474 and 1,317,647 rows respectively — and it is only unique within its district and its schedule. 7,212 rows carry something longer, up to the column's full 40 characters, because the inspector wrote down the best identifier available.
`district` is the completion district of the lease or gas well ID, NOT necessarily where the site is; RRC falls back to the district the site sits in only where there is no assigned lease or well ID. `district_office_inspecting` is a different question again — the office whose inspector went out, written as a city name (Midland, Kilgore, …), and RRC writes 'Unassigned Office' where an inspector has no home district.
`compliance` is the inspection's verdict after RRC's technical review, 'Yes' or 'No', and 'No' means at least one statewide rule was certified non-compliant. It does not say which — that is what the violations file is for.
Record layout
16 columns.
inspections
16 columns
| # | Column | Type | RRC name | Meaning | Lookup |
|---|---|---|---|---|---|
| 1 |
id
key
|
bigint | — | EZRRC's row number, and the only key this table has. RRC's extract carries no inspection identifier at all, and nothing it does carry is unique: the 3,981,260 rows hold 3,850,856 distinct (operator, lease/well ID, API, well number, district, date) combinations and 3,869,866 distinct whole rows. The loader adds this surrogate so a row can be pointed at. | — |
| 2 |
operator_name
|
text | OPERATOR_NAME |
The operator of the inspected lease, well, facility or site AT THE TIME OF THE INSPECTION -- not whoever operates it now. Where the operator was unknown the inspector wrote down the best name available, so this is not a clean key: join on the P-5 number. e.g. LAMAY CORPORATION | — |
| 3 |
p5_operator_no
join
|
text | P5_OPERATOR_NO |
The operator's six-digit RRC P-5 number as of the inspection. 17,268 rows carry none and a further 7,498 carry something that is not six digits -- the best data the inspector had, written down. 19,857 of 20,000 sampled rows resolve to the P-5 organization directory once cast to integer. e.g. 484025 | — |
| 4 |
district
join
|
text | DISTRICT |
The RRC completion district of the assigned oil lease or gas well ID at the time of the inspection, written the way RRC prints it (01-06, 6E, 7B, 7C, 08, 8A, 09, 10). Where the inspected site has no assigned lease or well ID, it is instead the Oil & Gas district the site sits in. Not the same question as the office that sent the inspector. e.g. 04 | RRC district (printed designation) |
| 5 |
district_office_inspecting
|
text | DISTRICT_OFFICE_INSPECTING |
The RRC district office whose inspector went out, as a city name. Eleven values in the whole file: Midland (714,979), Kilgore (613,422), Abilene, San Antonio, Wichita Falls, Corpus Christi, San Angelo, Pampa, Houston, Lubbock and Austin (247). The manual says an inspector with no home district office shows as 'Unassigned Office'; the August 2026 file carries none of those, and no blanks. This is a different question from the `district` column beside it, which is the lease's completion district. e.g. Corpus Christi | — |
| 6 |
oil_lease_gas_well_id
join
|
text | OIL_LEASE_GAS_WELL_ID |
The oil lease number or gas well ID of the inspected lease or well at the time of the inspection: five digits for an oil lease (2,573,474 rows), six for a gas well ID (1,317,647). Unique only within its district and its schedule. 63,389 rows carry none -- an inspection of a facility has no lease -- and 7,212 carry something longer, up to the column's full 40 characters, where the inspector wrote down whatever identified the site. e.g. 015275 | — |
| 7 |
lease_fac_name
|
text | LEASE_FAC_NAME |
The name of the oil or gas lease, or of the facility, at the time of the inspection. e.g. STATE TRACT 84 | — |
| 8 |
api_no
join
|
text | API_NO |
The API number of the inspected wellbore, eight digits: the three-digit county code then RRC's five-digit unique number, with no 42 state prefix. 1,627,544 of 3,981,260 rows carry none, because a great many inspections are of a facility or a whole lease rather than of one hole in the ground. Of the 11,794 rows in a 20,000-row sample that carry eight digits, 11,792 resolve to the wellbore database once split back into county and unique halves. e.g. 27300793 | — |
| 9 |
county
|
text | COUNTY |
The name of the county the inspection was conducted in, upper case. A NAME, not a code -- this file carries no county number at all, which is why no county code set is bound to it. e.g. KLEBERG | — |
| 10 |
well_no
|
text | WELL_NO |
The operator-assigned well number of the inspected completion at the time of the inspection. Free text ('2 L', '515'), and absent on 1,623,068 rows -- the same reason the API number is. e.g. 2 L | — |
| 11 |
inspection_date
|
date | INSPECTION_DATE |
The date the inspector performed the inspection. A REAL date: the loader parses RRC's published text, and every one of the 3,981,260 rows carries one, from 2015-08-01 to 2026-08-14. Note that the violations file beside it publishes its dates as YYYYMMDD text, so a join across the two converts that side, not this one. e.g. 2026-08-02 | — |
| 12 |
drilling_permit_no
join
|
text | DRILLING_PERMIT_NO |
The drilling permit number of the inspected wellbore, on the 60,467 rows of 3,981,260 that have one. RRC's manual says it is usually recorded when the inspection is made BEFORE the well is completed, which is why it is rare -- those rows are the pre-completion visits. 59,912 of the 60,467 resolve to a permit in the daf802 drilling permit master. e.g. 910483 | — |
| 13 |
complaint_no
join
|
bigint | COMPLAINT_NO |
RRC's number for the complaint this inspection answered. 38,503 rows carry one, across 5,500 distinct complaints, so a complaint typically draws several visits. Null means the visit was not made in response to a complaint -- not that the number is missing. e.g. 5845 | — |
| 14 |
compliance
|
text | COMPLIANCE |
The inspection's verdict after RRC's technical review, spelled out: 'Yes' where every statewide rule inspected was compliant (3,598,753 rows) and 'No' where at least one was certified non-compliant (382,507). WHICH rule failed is in the violations file, not this one. Note the spelling: this column really does say Yes and No, where the violations file's own flags write Y and N. e.g. Yes | — |
| 15 |
field_name
|
text | FIELD_NAME |
The field associated with the inspected lease, well, facility or site at the time of the inspection, as a NAME; 50,284 rows carry none. The eight-digit field number is not in this file. e.g. YEARY (FIMBLE) | — |
| 16 |
ingested_at
|
timestamptz | — | When the upstream pipeline last wrote this row. Not an RRC field — it is EZRRC's provenance stamp, and it is what the freshness badge is measured against. | — |
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.
RRC district (printed designation) 14 values
Read by district
The district as the Railroad Commission prints it: 01-06, 6E, 7B, 7C, 08, 8A, 09 and 10, plus 20 for statewide. This is what appears on permits, completions, ST-1 filings and inspection reports. It is not interchangeable with the internal district number. A column holding '11' means District 8A under the internal numbering and nothing at all under this one.
| Code | Means |
|---|---|
01 |
District 01 — San Antonio RRC District 01, administered from the San Antonio district office. |
02 |
District 02 — San Antonio RRC District 02, administered from the San Antonio district office. |
03 |
District 03 — Houston RRC District 03, administered from the Houston district office. |
04 |
District 04 — Corpus Christi RRC District 04, administered from the Corpus Christi district office. |
05 |
District 05 — Kilgore RRC District 05, administered from the Kilgore district office. |
06 |
District 06 — Kilgore RRC District 06, administered from the Kilgore district office. |
6E |
District 6E — Kilgore RRC District 6E, administered from the Kilgore district office. |
7B |
District 7B — Abilene RRC District 7B, administered from the Abilene district office. |
7C |
District 7C — San Angelo RRC District 7C, administered from the San Angelo district office. |
08 |
District 08 — Midland RRC District 08, administered from the Midland district office. |
8A |
District 8A — Midland RRC District 8A, administered from the Midland district office. |
09 |
District 09 — Wichita Falls RRC District 09, administered from the Wichita Falls district office. |
10 |
District 10 — Pampa RRC District 10, administered from the Pampa district office. |
20 |
District 20 — State Wide RRC District 20, administered from the State Wide district office. |
Source: Generated from texas.pdq_gp_district.district_name
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.
RRC Oil / ICE Inspections (Every Inspection) joins to P-5 Organization (ASCII) on P5 operator number = ID — many rows here share a single row there.
inspected the operator
The operator inspected, as of the inspection, resolved to the operator directory. 19,857 of 20,000 sampled inspections match; of the 143 that do not, most carry no P-5 number at all or something the inspector wrote down that is not six digits. 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.p5_operator_no = p5-organization-ascii.id
RRC Oil / ICE Inspections (Every Inspection) joins to Drilling Permit Master on Drilling permit number = Permit number — many rows here share a single row 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
RRC Oil / ICE Inspections (Every Inspection) joins to Wellbore Drilling Permit Numbers on Drilling permit number = Permit number — rows can match many rows in both directions.
inspected a well whose permits include
The same permit number matched against the wellbore file's permit list, which is the route from an inspection to a wellbore record without splitting the API number up. Weaker than the master above — 49,637 of the 60,467 inspections that carry a permit number — because the wellbore file lists the permits it knows a bore by, not every permit RRC ever issued. Both sides are text and it runs as printed.
rrc-oil-ice-inspections-detail.drilling_permit_no = wellbore-drilling-permit-numbers.permit_number
RRC Oil / ICE Inspections (Every Inspection) joins to Completion Information in Data Format on API number — rows can match many rows in both directions.
inspected a well completed as
The completion packet is the one file that fuses the API number to eight digits exactly as this one does, so the two meet on a single column with nothing to repair. 4,501 of the 11,794 inspections in a 20,000-row sample that carry an API find a completion — the packet covers completions filed since RRC's electronic system, not every wellbore in Texas. For the wellbore database instead, split the API: 11,792 of those same 11,794 resolve to `texas.wellbore` on `api_county = substr(api_no,1,3)` and `api_unique = substr(api_no,4,5)`. That is a better join and it is not declared here only because one column cannot be joined to two.
rrc-oil-ice-inspections-detail.api_no = completion-information-data-format.api_no
RRC Oil / ICE Inspections (Every Inspection) joins to RRC Oil / ICE Violations on P5 operator number = P5 operator number and Oil lease gas well ID = Oil lease gas well ID and API number = API number and Well number = Well number and District = District and Inspection date = Violation disc date — one row here matches many rows there.
was found during
The inspection this violation was written at: the same inspected location, on the day the rule was first marked non-compliant. Neither file carries an inspection number, so this is the join, and it holds — 2,954 of 3,000 sampled violations find an inspection, 2,835 of them exactly one and 119 more than one (a location inspected twice on one day). One inspection can carry several violations, one per rule. The two sides are different types: this file publishes its dates as eight characters of text and the inspections file's date is a real date, so cast with `to_date(violation_disc_date, 'YYYYMMDD')`. The other five columns are text on both sides and compare as printed. Going the other way is weaker on purpose: 2,115 of 3,000 sampled NON-COMPLIANT inspections find a violation on this key. `violation_disc_date` stays at the FIRST discovery, so a backcheck that finds the same rule still broken is another non-compliant inspection carrying an older date.
rrc-oil-ice-inspections.p5_operator_no = rrc-oil-ice-inspections-detail.p5_operator_no AND rrc-oil-ice-inspections.oil_lease_gas_well_id = rrc-oil-ice-inspections-detail.oil_lease_gas_well_id AND rrc-oil-ice-inspections.api_no = rrc-oil-ice-inspections-detail.api_no AND rrc-oil-ice-inspections.well_no = rrc-oil-ice-inspections-detail.well_no AND rrc-oil-ice-inspections.district = rrc-oil-ice-inspections-detail.district AND rrc-oil-ice-inspections.violation_disc_date = rrc-oil-ice-inspections-detail.inspection_date
Where this comes from
- Published by
- Texas Railroad Commission — the original page
- Original format
- Delimited Separated text, usually with an unusual delimiter such as a brace.
- RRC publishes
- Updated once a week (Weekly, on Mondays.)
- RRC download link
- GoAnywhere MFT
- Record layout manual
- Our table
texas.inspections
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.