{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas RRC Oil & Gas Well Permit (W-1) Scraper",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "Y9liaofPTBKrfPiCa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~texas-rrc-well-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-texas-rrc-well-permits-scraper",
        "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/scrapers_lat~texas-rrc-well-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-texas-rrc-well-permits-scraper",
        "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/scrapers_lat~texas-rrc-well-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-texas-rrc-well-permits-scraper",
        "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": {
          "operatorName": {
            "title": "Operator name",
            "type": "string",
            "description": "Filter permits by permitted operator name (begins-with match), e.g. XTO ENERGY."
          },
          "operatorNumber": {
            "title": "Operator number (P-5)",
            "type": "string",
            "description": "Filter by RRC operator (P-5) number, e.g. 945936."
          },
          "county": {
            "title": "County name",
            "type": "string",
            "description": "Filter by Texas county name, e.g. WARD, MIDLAND, REEVES. Case-insensitive; mapped to the RRC county code automatically."
          },
          "countyCode": {
            "title": "County code (advanced)",
            "type": "string",
            "description": "RRC 3-digit county code (overrides County name). e.g. 475 for Ward."
          },
          "district": {
            "title": "RRC district",
            "type": "string",
            "description": "RRC district code, e.g. 08, 8A, 7C, 01, 10."
          },
          "fieldName": {
            "title": "Field name",
            "type": "string",
            "description": "Filter by field name (begins-with), e.g. PHANTOM (WOLFCAMP)."
          },
          "fieldNumber": {
            "title": "Field number",
            "type": "string",
            "description": "Filter by RRC field number, e.g. 71052900."
          },
          "leaseName": {
            "title": "Lease name",
            "type": "string",
            "description": "Filter by lease name (begins-with)."
          },
          "leaseNumber": {
            "title": "Lease number",
            "type": "string",
            "description": "Filter by oil lease / gas well ID number."
          },
          "apiNumber": {
            "title": "API number",
            "type": "string",
            "description": "Look up a specific well by API number (digits only, no dashes), e.g. 47538447."
          },
          "wellboreProfileCode": {
            "title": "Wellbore profile code",
            "type": "string",
            "description": "Filter by wellbore profile code: V (vertical), H (horizontal), D (directional), S (sidetrack)."
          },
          "approvedDateFrom": {
            "title": "Approved date from (MM/DD/YYYY)",
            "type": "string",
            "description": "Only permits approved on or after this date, e.g. 01/01/2025."
          },
          "approvedDateTo": {
            "title": "Approved date to (MM/DD/YYYY)",
            "type": "string",
            "description": "Only permits approved on or before this date, e.g. 01/31/2025."
          },
          "submittedDateFrom": {
            "title": "Submitted date from (MM/DD/YYYY)",
            "type": "string",
            "description": "Only permits submitted on or after this date."
          },
          "submittedDateTo": {
            "title": "Submitted date to (MM/DD/YYYY)",
            "type": "string",
            "description": "Only permits submitted on or before this date."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of permit records to return. Free Apify accounts are capped at 10.",
            "default": 100
          },
          "withDetails": {
            "title": "Fetch permit details (billed: details)",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "withLease": {
            "title": "Fetch lease summary (billed: lease)",
            "type": "boolean",
            "description": "Fetch the lease detail page for lease well type, field number/name and current operator status. Default OFF. Paid Apify plans only.",
            "default": false
          },
          "withAiSummary": {
            "title": "AI permit summary (billed: ai_summary)",
            "type": "boolean",
            "description": "Add a plain-English AI summary of each permit. Default OFF. Paid Apify plans only. Charged only on a usable summary.",
            "default": false
          },
          "withAiExtract": {
            "title": "AI risk flags & tags (billed: ai_extract)",
            "type": "boolean",
            "description": "Add AI-extracted risk flags (restrictions/exceptions) and keyword tags. Default OFF. Paid Apify plans only. Charged only on usable output.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to a stable US datacenter proxy, which works well for this source.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "BUYPROXIES94952"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}