# Texas Drilling Permits (Railroad Commission W-1) (`keeganlabs/texas-rrc-drilling-permits`) Actor

Every Texas oil & gas drilling permit from the Railroad Commission's official public W-1 query. Filter by county, operator, status, purpose, and date. Fresh daily, back to 1977. The only Texas drilling-permit feed on Apify.

- **URL**: https://apify.com/keeganlabs/texas-rrc-drilling-permits.md
- **Developed by:** [Keegan Labs](https://apify.com/keeganlabs) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Texas Drilling Permits — Railroad Commission (RRC) W-1 Feed

**The only Texas drilling-permit feed on Apify.** Structured, deduped oil & gas
drilling permits straight from the Railroad Commission of Texas's *official*
public Drilling Permit (W-1) Query — the same source the majors and the
thousand-dollar data vendors read. Filter by county, operator, permit status,
purpose, and date; get one clean JSON record per permit.

Texas is the largest oil & gas producer in the United States, and every well
starts with a W-1 drilling permit filed with the RRC. This actor turns that
public filing stream into a lead feed and a dataset.

### Who buys this

- **Oilfield-service suppliers** — a New Drill permit is a buy signal for rig
  services, casing, cementing, and wireline. Get the operator and location the
  day the permit issues.
- **Frac sand, water, and proppant haulers** — new horizontal permits in the
  Permian (Midland, Reeves, Martin, Loving) and Eagle Ford (Karnes, DeWitt)
  mean tonnage and truckloads to bid.
- **Drilling-chemical & mud vendors** — target operators by name and county
  before the well spuds.
- **Landmen, mineral buyers, and title shops** — track who is permitting on
  which lease, by lease name and API number.
- **Analysts & researchers** — a same-day, filterable alternative to
  Enverus / DrillingInfo, which cost **thousands of dollars per year**.

### What you get — one record per permit

Verified live example (Midland County, approved 2026-07-02):

```json
{
  "source": "webapps.rrc.state.tx.us/DP",
  "statusNumber": "916198",
  "apiNumber": "329-48443",
  "status": "Approved",
  "currentQueue": "Approved",
  "statusDate": "2026-07-02",
  "submittedDate": "2026-06-03",
  "operatorName": "PIONEER NATURAL RES. USA, INC.",
  "operatorNumber": "665748",
  "leaseName": "TURNER E41H",
  "wellNumber": "8H",
  "district": "08",
  "county": "MIDLAND",
  "wellboreProfile": "Horizontal",
  "filingPurpose": "New Drill",
  "amended": false,
  "totalDepth": 10317,
  "stackedLateralParentDp": null,
  "permitDetailUrl": "https://webapps.rrc.state.tx.us/DP/drillDownQueryAction.do?name=TURNER%2BE41H&fromPublicQuery=Y&univDocNo=499229404"
}
````

Every field is normalized: dates are ISO `YYYY-MM-DD`, the operator name and
its RRC P-5 number are split apart, total depth is an integer, and the amended
flag is a boolean. Each record links back to its official RRC permit-detail
page.

### Freshness & coverage

- **Daily.** The RRC issues drilling permits every business day; the W-1 query
  returns them the same day. This actor reads that query live — no monthly lag.
- **Back to 1977.** Query any historical window, not just the recent past.
- **Statewide.** All 254 Texas counties and all 13 RRC districts.
- **Official source.** Data comes directly from the RRC public query at
  `webapps.rrc.state.tx.us/DP` — no third-party middleman.

### Input

| Field | What it does |
|-------|--------------|
| `county` | County name (e.g. `Midland`) or 3-digit RRC code. |
| `operatorName` | Operator name contains (e.g. `PIONEER`). |
| `operatorNumber` | Exact RRC operator (P-5) number. |
| `leaseName` | Lease name contains. |
| `filingStatus` | `approved` (default), `pending`, `all`, and more. |
| `filingPurpose` | `all` (default), `newDrill`, `reenter`, … |
| `dateFrom` / `dateTo` | `YYYY-MM-DD` window. |
| `dateBasis` | Apply the window to the approval or the filing date. |
| `maxRecords` | Spend cap (default 1000). |

At least one of `county`, `operatorName`, or a date range is required.

**Example:** all New Drill permits approved in Reeves County so far this month:

```json
{
  "county": "Reeves",
  "filingStatus": "approved",
  "filingPurpose": "newDrill",
  "dateFrom": "2026-07-01",
  "dateTo": "2026-07-22"
}
```

### Pricing

Pay-per-event:

- **$0.01 per actor start**
- **$0.01 per permit record**

A typical monthly pull for one busy Permian county (a few dozen to a few
hundred New Drill permits) costs cents to a couple of dollars. Priced against
the alternative: comprehensive commercial permit intelligence (Enverus /
DrillingInfo) runs into the **thousands of dollars per year**, and there is no
other Texas drilling-permit actor on the Apify Store. The per-record rate sits
well above the general-filings baseline on this catalog ($0.003/record) because
these are high-intent, high-value oil & gas leads with buyers who already pay
enterprise data prices.

### How it works & politeness

The RRC W-1 query is a public, unauthenticated government portal — no login, no
CAPTCHA. This actor runs a single sequential session: it bootstraps a query
session, POSTs your filters, reads the server-rendered results grid (20 rows
per page), and pages through with polite delays and exponential backoff. It
sends a descriptive User-Agent and never runs parallel requests against the
RRC. An optional Apify proxy can be enabled if you are ever rate-limited.

### Notes

- This actor reads public records published by the Railroad Commission of
  Texas. It is not affiliated with or endorsed by the RRC.
- The RRC also publishes a daily *pending-permits* bulk export, but it contains
  only applications awaiting approval. This actor uses the W-1 query instead
  because it covers **every** status (approved, pending, denied, …), the full
  history back to 1977, and filters server-side by county, operator, and date.

# Actor input Schema

## `county` (type: `string`):

Texas county to search, by name (e.g. "Midland", "Reeves", "Karnes") or 3-digit RRC county code. One of county, operatorName, or a date range is required.

## `operatorName` (type: `string`):

Keep only permits whose operator name contains this text (the RRC also matches it server-side). Example: "PIONEER" or "EXXON".

## `operatorNumber` (type: `string`):

Optional exact RRC operator number (P-5 number), e.g. 665748. Narrower and more reliable than a name match when you know it.

## `leaseName` (type: `string`):

Keep only permits whose lease name contains this text.

## `filingStatus` (type: `string`):

Permit status to return. Default "approved" (issued permits). "all" returns every status; "pending" returns applications awaiting approval (earliest possible lead).

## `filingPurpose` (type: `string`):

Permit purpose filter. Default "all". "newDrill" isolates brand-new wells (the highest-value leads for service, sand, and water suppliers).

## `dateFrom` (type: `string`):

Keep only permits on or after this date (YYYY-MM-DD). Applies to the approval date or the filing date per "dateBasis".

## `dateTo` (type: `string`):

Keep only permits on or before this date (YYYY-MM-DD).

## `dateBasis` (type: `string`):

Whether the date range filters on the permit's approval (issue) date or its filing (submission) date.

## `maxRecords` (type: `integer`):

Stop after pushing this many records (caps your spend). A busy Permian county issues a few dozen to a few hundred permits per month.

## `proxyConfiguration` (type: `object`):

Optional. The RRC query is a public, unauthenticated government portal; the actor normally runs without a proxy. Enable an Apify proxy only if runs are rate-limited from Apify datacenter IPs.

## Actor input object example

```json
{
  "county": "Midland",
  "operatorName": "PIONEER",
  "operatorNumber": "665748",
  "leaseName": "TURNER",
  "filingStatus": "approved",
  "filingPurpose": "all",
  "dateFrom": "2026-07-01",
  "dateTo": "2026-07-22",
  "dateBasis": "approved",
  "maxRecords": 1000
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("keeganlabs/texas-rrc-drilling-permits").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("keeganlabs/texas-rrc-drilling-permits").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call keeganlabs/texas-rrc-drilling-permits --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=keeganlabs/texas-rrc-drilling-permits",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Texas Drilling Permits (Railroad Commission W-1)",
        "description": "Every Texas oil & gas drilling permit from the Railroad Commission's official public W-1 query. Filter by county, operator, status, purpose, and date. Fresh daily, back to 1977. The only Texas drilling-permit feed on Apify.",
        "version": "1.0",
        "x-build-id": "f9ulobDTitlctTHzY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/keeganlabs~texas-rrc-drilling-permits/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-keeganlabs-texas-rrc-drilling-permits",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/keeganlabs~texas-rrc-drilling-permits/runs": {
            "post": {
                "operationId": "runs-sync-keeganlabs-texas-rrc-drilling-permits",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/keeganlabs~texas-rrc-drilling-permits/run-sync": {
            "post": {
                "operationId": "run-sync-keeganlabs-texas-rrc-drilling-permits",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "county": {
                        "title": "County",
                        "type": "string",
                        "description": "Texas county to search, by name (e.g. \"Midland\", \"Reeves\", \"Karnes\") or 3-digit RRC county code. One of county, operatorName, or a date range is required."
                    },
                    "operatorName": {
                        "title": "Operator name contains",
                        "type": "string",
                        "description": "Keep only permits whose operator name contains this text (the RRC also matches it server-side). Example: \"PIONEER\" or \"EXXON\"."
                    },
                    "operatorNumber": {
                        "title": "Operator number",
                        "type": "string",
                        "description": "Optional exact RRC operator number (P-5 number), e.g. 665748. Narrower and more reliable than a name match when you know it."
                    },
                    "leaseName": {
                        "title": "Lease name contains",
                        "type": "string",
                        "description": "Keep only permits whose lease name contains this text."
                    },
                    "filingStatus": {
                        "title": "Filing status",
                        "enum": [
                            "approved",
                            "pending",
                            "all",
                            "cancelled",
                            "closed",
                            "denied",
                            "dismissed",
                            "withdrawn"
                        ],
                        "type": "string",
                        "description": "Permit status to return. Default \"approved\" (issued permits). \"all\" returns every status; \"pending\" returns applications awaiting approval (earliest possible lead).",
                        "default": "approved"
                    },
                    "filingPurpose": {
                        "title": "Filing purpose",
                        "enum": [
                            "all",
                            "newDrill",
                            "reenter",
                            "fieldTransfer",
                            "recompletion",
                            "reclass",
                            "amendedBhl"
                        ],
                        "type": "string",
                        "description": "Permit purpose filter. Default \"all\". \"newDrill\" isolates brand-new wells (the highest-value leads for service, sand, and water suppliers).",
                        "default": "all"
                    },
                    "dateFrom": {
                        "title": "Date from",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Keep only permits on or after this date (YYYY-MM-DD). Applies to the approval date or the filing date per \"dateBasis\"."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Keep only permits on or before this date (YYYY-MM-DD)."
                    },
                    "dateBasis": {
                        "title": "Date range basis",
                        "enum": [
                            "approved",
                            "submitted"
                        ],
                        "type": "string",
                        "description": "Whether the date range filters on the permit's approval (issue) date or its filing (submission) date.",
                        "default": "approved"
                    },
                    "maxRecords": {
                        "title": "Max records",
                        "minimum": 1,
                        "maximum": 200000,
                        "type": "integer",
                        "description": "Stop after pushing this many records (caps your spend). A busy Permian county issues a few dozen to a few hundred permits per month.",
                        "default": 1000
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional. The RRC query is a public, unauthenticated government portal; the actor normally runs without a proxy. Enable an Apify proxy only if runs are rate-limited from Apify datacenter IPs."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
