# Texas RRC Oil & Gas Well Permit (W-1) Scraper (`scrapers_lat/texas-rrc-well-permits-scraper`) Actor

Export Texas Railroad Commission W-1 drilling permits: API number, operator, lease, field, county, RRC district, wellbore profile, total depth, status, spud & completion dates, GPS and survey location. JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/texas-rrc-well-permits-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.32 / 1,000 permit records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 RRC Oil & Gas Well Permit (W-1) Scraper](https://scrapers.lat/banners/texas-rrc-well-permits-scraper.png)](https://console.apify.com/actors/uefCpaPA5gzAkAgCP/input)

## Texas RRC Oil & Gas Well Permit (W-1) Scraper

Here is one real result, with every field the actor returns:

```json
{
  "apiNumber": "47538447",
  "apiNumberFormatted": "475-38447",
  "district": "08",
  "rrcDistrict": "08",
  "leaseName": "MI DIA 48 WD1",
  "leaseNumber": "62302",
  "wellNumber": "901H",
  "operatorName": "XTO ENERGY INC.",
  "operatorNumber": "945936",
  "county": "WARD",
  "submittedDate": "07/18/2024",
  "approvedDate": "01/21/2025",
  "statusNumber": "881636",
  "wellboreProfile": "Horizontal",
  "filingPurpose": "New Drill",
  "amendment": true,
  "totalDepth": 10800,
  "stackedLateralParentDp": null,
  "status": "APPROVED",
  "universalDocNo": "497523671",
  "permitDetailUrl": "https://webapps2.rrc.texas.gov/EWA/drillingPermitDetailAction.do?methodToCall=searchByUniversalDocNo&universalDocNo=497523671",
  "leaseDetailUrl": "https://webapps2.rrc.texas.gov/EWA/leaseDetailAction.do?searchType=apiNo&apiNo=47538447&distCode=08&leaseNo=62302&methodToCall=displayLeaseDetail",
  "gisViewerUrl": "https://gis.rrc.texas.gov/GISViewer/index.html?api=47538447",
  "imagesUrl": "https://rrcsearch3.neubus.com/esd3-rrc/api.php?function=GetImage&api_no=47538447",
  "sourceUrl": "https://webapps2.rrc.texas.gov/EWA/drillingPermitsQueryAction.do",
  "issuedDate": "01/21/2025",
  "filedMethod": "Online",
  "wellStatusCode": "W - Final Completion",
  "spudDate": "11/12/2022",
  "drillingCompletedDate": "03/29/2023",
  "surfaceCasingDate": "11/13/2022",
  "completedWellType": "Oil Well",
  "completedDate": "03/29/2023",
  "validatedDate": "01/24/2025",
  "swr": "SWR 36, SWR 37",
  "distanceFromNearestTown": "4.0 miles",
  "directionFromNearestTown": "NE",
  "nearestTown": "Pecos",
  "surfaceLocationType": "Land",
  "gpsDatum": "NAD 83",
  "gpsX": "1321987.25",
  "gpsY": "10516620.43",
  "statePlaneZone": "Central",
  "section": "48",
  "block": "33",
  "survey": "H&TC RR CO / WHEAT, P H",
  "abstractNumber": "443",
  "permitRestrictions": "30 The designated interval for one or more of the fields approved in this permit appears to overlap with the designated interval of another field or fields in this district...",
  "leaseWellType": "Oil",
  "leaseFieldNumber": "71052900",
  "leaseFieldName": "PHANTOM (WOLFCAMP)",
  "currentOperatorStatus": "Active",
  "aiSummary": null,
  "aiRiskFlags": null,
  "aiTags": null
}
```

The most complete Texas oil and gas drilling permit scraper available. It returns every field the Railroad Commission W-1 Drilling Permit Query exposes (API number, operator, lease, field, county, RRC district, wellbore profile, total depth, status and dates), plus per-permit detail (spud, drilling-completed and surface-casing dates, completed well type, GPS coordinates, survey and legal location, permit restrictions) and lease summary (lease well type, field number and current operator status), and gives you 8 filters to target exactly the permits you need.

**📥 [Input](https://console.apify.com/actors/uefCpaPA5gzAkAgCP/input) · 📤 [Output](https://console.apify.com/actors/uefCpaPA5gzAkAgCP/output-schema) · 💰 [Pricing](https://console.apify.com/actors/uefCpaPA5gzAkAgCP/information/latest/pricing) · ▶️ [Examples](https://console.apify.com/actors/uefCpaPA5gzAkAgCP/runs)**

![Platform](https://img.shields.io/badge/platform-Apify-1a1a1a) ![Coverage](https://img.shields.io/badge/coverage-Texas%20statewide-2ea44f) ![Output](https://img.shields.io/badge/output-JSON%20%7C%20CSV%20%7C%20Excel-blue) ![Billing](https://img.shields.io/badge/billing-Pay%20per%20result-orange)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)
- [More scrapers at scrapers.lat](#more-scrapers-at-scraperslat)

### What it does

This actor searches the Texas Railroad Commission (RRC) public W-1 Drilling Permit Query and returns clean, structured permit records for landmen, mineral and royalty investors, and title shops. Every permit comes back with the operator, lease, field, county, RRC district, wellbore profile, total depth, permit status and the submitted and approved dates.

Turn on permit details and each record is enriched from the permit detail page with spud, drilling-completed and surface-casing dates, completed well type, SWR reference, surface location (nearest town, distance, direction), GPS coordinates and datum, survey and legal location (section, block, survey, abstract number) and any permit restrictions. Turn on lease summary to add the lease well type, field number and current operator status.

You can filter by operator name or number, county, RRC district, field name or number, lease name or number, API number, wellbore profile, and approved or submitted date ranges.

### Quickstart

Run this input to pull recent horizontal permits approved in Ward County, District 08, with full permit details:

```json
{
  "county": "WARD",
  "district": "08",
  "approvedDateFrom": "01/01/2025",
  "approvedDateTo": "01/31/2025",
  "maxItems": 100,
  "withDetails": true
}
```

### Input reference

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| operatorName | string | no | Permitted operator name, begins-with match | `XTO ENERGY` |
| operatorNumber | string | no | RRC operator (P-5) number | `945936` |
| county | string | no | Texas county name, mapped to RRC code automatically | `WARD` |
| countyCode | string | no | RRC 3-digit county code (overrides county name) | `475` |
| district | string | no | RRC district code | `08` |
| fieldName | string | no | Field name, begins-with match | `PHANTOM (WOLFCAMP)` |
| fieldNumber | string | no | RRC field number | `71052900` |
| leaseName | string | no | Lease name, begins-with match | `MI DIA` |
| leaseNumber | string | no | Oil lease or gas well ID number | `62302` |
| apiNumber | string | no | Look up a specific well by API number (digits only) | `47538447` |
| wellboreProfileCode | string | no | Wellbore profile code: V, H, D, S | `H` |
| approvedDateFrom | string | no | Permits approved on or after (MM/DD/YYYY) | `01/01/2025` |
| approvedDateTo | string | no | Permits approved on or before (MM/DD/YYYY) | `01/31/2025` |
| submittedDateFrom | string | no | Permits submitted on or after (MM/DD/YYYY) | `01/01/2025` |
| submittedDateTo | string | no | Permits submitted on or before (MM/DD/YYYY) | `01/31/2025` |
| maxItems | integer | no | Maximum permits to return (free accounts capped at 10) | `100` |
| withDetails | boolean | no | Fetch permit detail page (default true) | `true` |
| withLease | boolean | no | Fetch lease summary (default false, paid plans) | `false` |
| withAiSummary | boolean | no | Add an AI plain-English permit summary (default false) | `false` |
| withAiExtract | boolean | no | Add AI risk flags and tags (default false) | `false` |
| proxyConfiguration | object | no | Proxy settings (defaults to a stable US datacenter proxy) | `{ "useApifyProxy": true }` |

### Output reference

| Name | Type | Description |
| --- | --- | --- |
| apiNumber | string | Well API number, digits only |
| apiNumberFormatted | string | API number formatted with dash |
| district | string | RRC district code |
| rrcDistrict | string | RRC district code (normalized) |
| leaseName | string | Lease name |
| leaseNumber | string | Oil lease or gas well ID number |
| wellNumber | string | Well number |
| operatorName | string | Permitted operator name |
| operatorNumber | string | RRC operator (P-5) number |
| county | string | County name |
| submittedDate | string | Permit submitted date |
| approvedDate | string | Permit approved date |
| statusNumber | string | RRC status (tracking) number |
| wellboreProfile | string | Wellbore profile (Vertical, Horizontal, Directional) |
| filingPurpose | string | Filing purpose (New Drill, Recompletion, etc.) |
| amendment | boolean | Whether the permit is an amendment |
| totalDepth | integer | Total permitted depth in feet |
| stackedLateralParentDp | string | Stacked lateral parent well DP number |
| status | string | Permit status (APPROVED, etc.) |
| universalDocNo | string | RRC universal document number |
| permitDetailUrl | string | Link to the RRC permit detail page |
| leaseDetailUrl | string | Link to the RRC lease detail page |
| gisViewerUrl | string | Link to the RRC GIS map viewer for the well |
| imagesUrl | string | Link to scanned permit images |
| sourceUrl | string | Query source URL |
| issuedDate | string | Permit issued date (details) |
| filedMethod | string | Filing method, e.g. Online (details) |
| wellStatusCode | string | Completion well status code (details) |
| spudDate | string | Spud date (details) |
| drillingCompletedDate | string | Drilling completed date (details) |
| surfaceCasingDate | string | Surface casing date (details) |
| completedWellType | string | Completed well type, e.g. Oil Well (details) |
| completedDate | string | Completion date (details) |
| validatedDate | string | Validated date (details) |
| swr | string | Statewide Rule reference (details) |
| distanceFromNearestTown | string | Distance from nearest town (details) |
| directionFromNearestTown | string | Direction from nearest town (details) |
| nearestTown | string | Nearest town (details) |
| surfaceLocationType | string | Surface location type, e.g. Land (details) |
| gpsDatum | string | GPS datum, e.g. NAD 83 (details) |
| gpsX | string | Surface location X coordinate (details) |
| gpsY | string | Surface location Y coordinate (details) |
| statePlaneZone | string | State plane zone (details) |
| section | string | Survey section (details) |
| block | string | Survey block (details) |
| survey | string | Survey name (details) |
| abstractNumber | string | Abstract number (details) |
| permitRestrictions | string | Permit restrictions text (details) |
| leaseWellType | string | Lease well type (lease) |
| leaseFieldNumber | string | Lease field number (lease) |
| leaseFieldName | string | Lease field name (lease) |
| currentOperatorStatus | string | Current operator status, e.g. Active (lease) |
| aiSummary | string | AI plain-English summary (ai\_summary) |
| aiRiskFlags | array | AI-extracted risk flags (ai\_extract) |
| aiTags | array | AI-extracted keyword tags (ai\_extract) |

### Example output record

See the real record at the top of this page. Fields marked (details), (lease) or (ai\_\*) populate only when the matching add-on is enabled.

### Run via API and CLI

Start a run with the Apify API:

```bash
curl -X POST "https://api.apify.com/v2/acts/uefCpaPA5gzAkAgCP/runs?token=YOUR_APIFY_TOKEN" \
  -H "content-type: application/json" \
  -d '{"county":"WARD","district":"08","approvedDateFrom":"01/01/2025","approvedDateTo":"01/31/2025","maxItems":100}'
```

Or with the Apify CLI:

```bash
apify call scrapers_lat/texas-rrc-well-permits-scraper \
  --input '{"operatorName":"XTO ENERGY","maxItems":100}'
```

### Fetch results

Download dataset items as JSON, CSV or Excel:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_TOKEN&format=csv"
```

### Billing and limits

This actor is pay per result. You are charged one `result` event per permit returned. Optional add-on events: `details` (permit detail enrichment, on by default), `lease` (lease summary), `ai_summary` and `ai_extract`. Add-on events are charged only when they return usable data, and paid add-ons are disabled for free Apify accounts. Free accounts are capped at 10 results per run. When you set a spend limit, the actor stops returning and charging once the limit is reached. Failed fetches are never charged.

### FAQ and troubleshooting

**Which permits are covered?** Texas statewide W-1 drilling permits from the RRC Online Research Queries system, current and historical.

**Do I get monthly production volumes?** Not in this actor. It focuses on permits, well detail and lease summary. Monthly production volumes live in a separate RRC system.

**Why are the detail fields null?** They populate only when `withDetails` is on (default) and the permit detail page returns them.

**County filter not applied?** Use the exact county name (any case) or pass `countyCode` directly.

**Nothing returned?** Loosen your filters or widen the date range. Very broad searches are paginated automatically up to `maxItems`.

### More scrapers at scrapers.lat

Browse the full catalog of company registry, licensing, finance and public-record scrapers at [scrapers.lat](https://scrapers.lat).

# Actor input Schema

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

Filter permits by permitted operator name (begins-with match), e.g. XTO ENERGY.

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

Filter by RRC operator (P-5) number, e.g. 945936.

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

Filter by Texas county name, e.g. WARD, MIDLAND, REEVES. Case-insensitive; mapped to the RRC county code automatically.

## `countyCode` (type: `string`):

RRC 3-digit county code (overrides County name). e.g. 475 for Ward.

## `district` (type: `string`):

RRC district code, e.g. 08, 8A, 7C, 01, 10.

## `fieldName` (type: `string`):

Filter by field name (begins-with), e.g. PHANTOM (WOLFCAMP).

## `fieldNumber` (type: `string`):

Filter by RRC field number, e.g. 71052900.

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

Filter by lease name (begins-with).

## `leaseNumber` (type: `string`):

Filter by oil lease / gas well ID number.

## `apiNumber` (type: `string`):

Look up a specific well by API number (digits only, no dashes), e.g. 47538447.

## `wellboreProfileCode` (type: `string`):

Filter by wellbore profile code: V (vertical), H (horizontal), D (directional), S (sidetrack).

## `approvedDateFrom` (type: `string`):

Only permits approved on or after this date, e.g. 01/01/2025.

## `approvedDateTo` (type: `string`):

Only permits approved on or before this date, e.g. 01/31/2025.

## `submittedDateFrom` (type: `string`):

Only permits submitted on or after this date.

## `submittedDateTo` (type: `string`):

Only permits submitted on or before this date.

## `maxItems` (type: `integer`):

Maximum number of permit records to return. Free Apify accounts are capped at 10.

## `withDetails` (type: `boolean`):

Fetch each permit's detail page for spud/completion dates, completed well type, GPS coordinates, survey/legal location and permit restrictions. Default ON. Charged only when detail data is returned.

## `withLease` (type: `boolean`):

Fetch the lease detail page for lease well type, field number/name and current operator status. Default OFF. Paid Apify plans only.

## `withAiSummary` (type: `boolean`):

Add a plain-English AI summary of each permit. Default OFF. Paid Apify plans only. Charged only on a usable summary.

## `withAiExtract` (type: `boolean`):

Add AI-extracted risk flags (restrictions/exceptions) and keyword tags. Default OFF. Paid Apify plans only. Charged only on usable output.

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

Proxy settings. Defaults to a stable US datacenter proxy, which works well for this source.

## Actor input object example

```json
{
  "maxItems": 100,
  "withDetails": true,
  "withLease": false,
  "withAiSummary": false,
  "withAiExtract": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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("scrapers_lat/texas-rrc-well-permits-scraper").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("scrapers_lat/texas-rrc-well-permits-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 scrapers_lat/texas-rrc-well-permits-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/texas-rrc-well-permits-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uefCpaPA5gzAkAgCP/builds/Y9liaofPTBKrfPiCa/openapi.json
