texasrrcapi

Docs

Base URL https://api.texasrrcapi.com. JSON over HTTPS. Independent of and not affiliated with the Railroad Commission of Texas; built from its public files.

Quick start

Get a key on the pricing page (Free needs no card). The key is shown once.

curl https://api.texasrrcapi.com/v1/production?from=202501&to=202512 \
  -H "X-API-Key: $RRC_KEY"

That returns monthly statewide oil, gas, condensate and casinghead volumes for 2025.

Authentication

Send the key in X-API-Key. The MCP endpoint also accepts Authorization: Bearer <key>. Keys are stored only as SHA-256 hashes. Rotate with POST /v1/account/rotate (the old key stops working); manage billing with POST /v1/account/portal, which returns a Stripe billing portal link.

Plans and limits

PlanRequests / monthRateRows per callSQLMCPBulk
Free1,0002 / s100NoNoNo
Pro100,00010 / s10,000YesYesNo
Business1,000,00050 / s10,000YesYesYes
EnterpriseCustomCustom10,000YesYesYes

GET /v1/account returns your plan, limits and usage this month. Identical GET requests may be served from the edge cache for up to five minutes; those do not count against your quota.

IDs

The same entity has the same ID in every dataset. Raw RRC columns are kept exactly as published; IDs are added beside them.

ColumnFormatExample
operator_id6-digit P-5 number, leading zeros kept000016
api1042 + 3-digit county + 5-digit unique4215130339
lease_idOil O-<district>-<5 digits>; gas well G-<6 digits>O-01-00001
permit_no7 digits, zero-padded0004167
districtRRC code: 01–06, 6E, 7B, 7C, 08, 8A, 09, 107C
field_no8 digits60823501

Typed copies of text columns end in __num (exact integers or decimals) or __date. They exist only where every value converts exactly. Decimals are returned as strings.

Provenance

Every response carries meta.snapshot_id and, per dataset used, source_release_id and conformed_release_id. Rows carry source_sha256 and source_uri: the hash and location of the original RRC file. Cite the snapshot ID to make a result reproducible.

Data notes

Endpoints

RequestReturns
GET /v1/catalogDatasets, tables, columns, row counts, ID and typed columns, release IDs
GET /v1/operators/{operator_id}P-5 record, row counts across every dataset, newest 20 drilling permits
GET /v1/wells/{api10}Wellbores, permits, completions (PDQ), inspections, violations, surface and bottom-hole locations, well paths, completion packets (newest first)
GET /v1/leases/{lease_id}Monthly production (date order), wellbores, inspections
GET /v1/permits/{permit_no}Permit records from the master, daily and horizontal files, inspections
GET /v1/production?group_by=&id=&from=&to=Monthly totals: state, district, operator or field; months as YYYYMM. Oil and condensate in bbl, gas in mcf
GET /v1/tables/{dataset}/{table}?col=value&limit=&after=Any table with equality filters; page with next_cursor passed as after
POST /v1/queryRead-only SQL (Pro and up)
GET /v1/bulk?dataset=Signed Parquet download links (Business and up)
GET /v1/changes?since=Change feed
GET /v1/statusFreshness per dataset (no key)
GET /v1/accountPlan, limits, usage

Example: an operator

curl https://api.texasrrcapi.com/v1/operators/257097 -H "X-API-Key: $RRC_KEY"

{"data": {"organization": {"operator_id": "257097", ...},
          "counts": {"drilling_permits.da_permit": 19549, "wellbore_ewa.og_wellbore_ewa": 15181,
                     "inspections.inspections": 165, "violations.violations": 13, ...},
          "recent_permits": {"rows": [...], "truncated": false}},
 "meta": {"snapshot_id": "...", "sources": {"p5_organizations": {"source_release_id": "..."}, ...}}}

MCP for agents

Streamable HTTP at https://api.texasrrcapi.com/mcp (Pro and up). Tools: catalog, get_operator, get_well, get_lease, get_permit, get_production, query_sql. Results match the REST API, provenance included.

Claude Code

claude mcp add --transport http texasrrcapi https://api.texasrrcapi.com/mcp \
  --header "Authorization: Bearer $RRC_KEY"

Cursor and other clients (mcp.json)

{"mcpServers": {"texasrrcapi": {"url": "https://api.texasrrcapi.com/mcp",
  "headers": {"Authorization": "Bearer YOUR_KEY"}}}}

SQL

DuckDB SQL over "<dataset>"."<table>", read-only: no writes, no file or network access, settings locked. 15-second timeout; up to 10,000 rows (limit). Precomputed rollups live in agg.production_state, agg.production_district, agg.production_operator and agg.production_field.

curl https://api.texasrrcapi.com/v1/query -H "X-API-Key: $RRC_KEY" -H "content-type: application/json" \
  -d '{"sql": "SELECT district, sum(LEASE_OIL_PROD_VOL__num) oil FROM \"pdq\".\"og_lease_cycle\" WHERE CYCLE_YEAR_MONTH__num BETWEEN 202501 AND 202512 GROUP BY 1 ORDER BY 2 DESC"}'

Bulk downloads

GET /v1/bulk (Business and up) lists every table of the current snapshot as zstd Parquet with row count, size, SHA-256 and a signed download link valid for up to one hour. Add ?dataset=pdq for one dataset. Check the SHA-256 after download.

Change feed

GET /v1/changes?since=2026-10-01 or ?since=<snapshot_id> lists each new snapshot: which datasets got a new source release and how each table's row count moved. Poll it, then re-pull only what changed. Changes are reported per dataset and table, not per row.

Status

api.texasrrcapi.com/status shows every dataset's upstream schedule, last change and row count. JSON at /v1/status, no key required.

Errors

StatusMeaning
400Malformed ID or parameter; the message gives the expected format
401Missing, invalid or revoked key
403Your plan does not include this feature (SQL, MCP, bulk)
404Entity not found in the current snapshot
408SQL query exceeded 15 seconds
429Rate limit or monthly quota reached
503A snapshot is loading; retry shortly