Start here · tested September 12, 2026
Export Ward County permits to a table
Retrieve every matching record in a trailing 90-day Texas county query, save CSV and JSON, then use the file for an AI-assisted review. This is a permit-record table, not a list of confirmed buyers or drilling projects.
38 records
25 on page 1, 13 on page 2
10 filing labels
Kept separate, not merged into companies
12 API units
2 requests × 6 units per request
This dated run was retrieved September 12 at 22:38 UTC. Its latest returned issue date was 2026-09-04, not September 12. A later run can differ; the existing county article retains its separate September 1 snapshot.
1. Get API access and keep your key private
Start with the $50 / 10,000-unit prepaid API pack, then create a key in the authenticated API Access screen with permits:read access. Add operators:read for the optional MCP operator lookup. A Premium app subscription is not required for the API-only path. Use Node.js 18 or later on your own computer or server; this example has no package dependencies.
2. Download and run the bounded export
Download the ZIP, extract county-permits-v1.mjs and inspect the script before running it. It uses state=TX, county=Ward, days=90 and 25 records per page. It follows pagination.nextPage until hasMore=false, checks the full count and rejects repeated record identities. It stops after five requests—30 estimated units—without presenting partial data as a complete export.
# Bash: open the folder containing county-permits-v1.mjs.
# Input is hidden and is not embedded in the command history.
read -r -s -p "EnergyNetWatch API key: " ENERGYNETWATCH_API_KEY
printf '\n'
export ENERGYNETWATCH_API_KEY
node county-permits-v1.mjs
unset ENERGYNETWATCH_API_KEY
In PowerShell or another shell, set the same environment variable using your secret-management method. Never paste a real key into this website, a chat prompt or the downloaded script. The script creates a new timestamped local folder and does not overwrite existing files.
Request shape and how to adapt it
GET https://api.energynetwatch.com/api/public/permits?state=TX&county=Ward&days=90&page=1&limit=25
X-API-Key: <from your private environment>
Set ENW_COUNTY to another recognized Texas county name, such as Yoakum. This sample deliberately requires a canonical Texas county response. Use the API reference to design other-state workflows; do not assume the same county or date semantics. Missing days means all-time on this endpoint, so always keep the explicit days=90 parameter for this task.
3. Check the files and source dates
permits.csv is the working table. permits.json retains the full returned records, query, count window, per-request source dates and request IDs. In our test, all 38 record identities were unique; PITTS ENERGY CO. appeared on 14 records. That is a filing-label count, not 14 confirmed new wells.
Three-row preview from the actual export—not the complete table
- Permit number
- 918213
- Source operator label
- OCCIDENTAL PERMIAN LTD.
- Issue date
- 2026-09-04
- Permit number
- 918211
- Source operator label
- OCCIDENTAL PERMIAN LTD.
- Issue date
- 2026-09-04
- Permit number
- 918222
- Source operator label
- CRESCENT ENERGY OPERATING, LLC
- Issue date
- 2026-09-02
Import permit/API identifiers as text in Excel; a CSV double-click can change identifiers. The raw api12 field may be shorter than its name suggests—do not assume it is normalized. Null spud dates remain blank/unknown, not zero. CSV formula prefixes are neutralized; raw JSON preserves the source. County membership uses the API-county identifier with a W-1 fallback; original county labels are retained.
This is live offset pagination, not a frozen database snapshot. The script detects changed totals and repeated identities, but a simultaneous same-count replacement may not be detectable. Use the request timestamps for traceability and recheck critical records before acting.
4. Review the table with AI; use MCP for a specific lookup
Attach the JSON to a file-capable AI client and use the provided review prompt. The current MCP permit-search tool has no native county filter. Keep this API export as the county population; use the Texas regulatory operator tool for an explicitly scoped follow-up.
Open the county AI review and MCP lookup promptsWhat this run costs—and when to stop
Each permit-list request costs 6 units, not 6 units per record. Our two-page export used 12 units. One optional Texas regulatory operator search adds 2 units: 14 units total, about $0.07 of a $50 / 10,000-unit pack. The minimum pack purchase is $50; this is not a seven-cent checkout. AI-client charges are separate. Check the current API reference and your usage dashboard before scaling.
- 401: check your key. 402: check available units. 403: check scope and access.
- 429: inspect rate/quota headers and reset timing. Do not retry in a loop.
- Timeout, failed response, changed count or page-budget limit: stop and investigate; already issued requests may have consumed units.
- Zero returned records: report the exact query and window, not “no oil and gas activity.”