Start here — what the Texas RRC actually publishes
The Railroad Commission gives away roughly sixty oil and gas datasets. This is the map: which files exist, what each one is really about, and how they hang together once you know the join keys.
The Railroad Commission publishes some of the most complete oil and gas data in the world, in some of the least approachable formats in the world. These 12 articles explain what is in it, how the pieces key together, and how to get answers out of it.
Start with Start here — what the Texas RRC actually publishes
What the Railroad Commission publishes, and how the pieces fit.
The Railroad Commission gives away roughly sixty oil and gas datasets. This is the map: which files exist, what each one is really about, and how they hang together once you know the join keys.
A lease is not a well, a field is not a formation, and Texas counts oil and gas in two different currencies. Get this wrong and every production number you compute will be wrong.
API numbers, districts, P-5 numbers — the keys everything joins on.
The API well number is the closest thing Texas has to a primary key for a hole in the ground. Here is how it is built, why the RRC stores only part of it, and why the same well legitimately appears under several different numbers.
Districts are the RRC's administrative geography, they are not numeric, they do not nest cleanly inside anything you already have, and half the datasets are partitioned by them. Here is how to handle both districts and counties.
Every company that touches a Texas well has a six-digit P-5 number. The number is stable and the name is not. Here is what the P-5 Organization file contains, and how to use it as the operator dimension for everything else.
EBCDIC, fixed-width COBOL layouts, implied decimals, zoned signs.
A dozen RRC datasets ship in IBM's pre-ASCII mainframe character encoding. This is what EBCDIC is, how code page 037 maps onto ASCII, what a mis-decoded file looks like, and how to convert one correctly.
How to read an RRC record layout PDF and turn it into a parser: PIC clauses, 1-based positions, implied decimal points, split date parts, and the zoned-decimal sign that puts a `}` on the end of a number.
Dataset by dataset: what is in it, and what it does not tell you.
The Production Data Query dump is sixteen tables and tens of millions of rows of monthly Texas production back to 1993. This is what a cycle is, how the lease and county-lease tables differ, and why the last two months always lie.
Permit files are the fastest-moving data the RRC publishes and the most over-interpreted. Here is the permit lifecycle, the fifteen application types, the coordinate trailer records, and what a permit genuinely proves.
What was actually built downhole. The completion filings give you casing, perforations, formations and initial tests; the Full Wellbore Database gives you every hole ever drilled in Texas as a 28-record-type hierarchy.
Worked joins, the HTTP API and the Python SDK.
Nine joins that connect the RRC's separate files into one dataset, with the cardinality of each, the type and padding traps that break them, and worked SQL you can run.
Query any RRC dataset over HTTP, resolve code values, request an export in any format, and assemble a cross-dataset view of a single well — with curl, with the Python SDK, and from an MCP-capable assistant.