{
  "openapi": "3.0.1",
  "info": {
    "title": "Oil & Gas Wells API: US, Canada, UK, Norway, Brazil, Australia",
    "description": "Search 4.7 million oil and gas wells from 20 US state regulators, Canada (AB, BC, SK), the UK, Netherlands, Norway, Brazil and Australia: API number, operator, well name, status, type, field, county, location, spud and completion dates, depth and regulator links, in one schema.",
    "version": "1.0",
    "x-build-id": "1pQBGy5qeeIeHRt7q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pushbuild~oil-gas-wells/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pushbuild-oil-gas-wells",
        "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/pushbuild~oil-gas-wells/runs": {
      "post": {
        "operationId": "runs-sync-pushbuild-oil-gas-wells",
        "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/pushbuild~oil-gas-wells/run-sync": {
      "post": {
        "operationId": "run-sync-pushbuild-oil-gas-wells",
        "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": {
          "apiNumbers": {
            "title": "API numbers",
            "type": "array",
            "description": "Well API numbers, with or without dashes; a prefix matches all sidetracks.",
            "items": {
              "type": "string"
            }
          },
          "operator": {
            "title": "Operator",
            "type": "string",
            "description": "Operator name contains this text."
          },
          "wellName": {
            "title": "Well name",
            "type": "string",
            "description": "Well or lease name contains this text."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO country codes: US, CA (Canada: Alberta, British Columbia, Saskatchewan), GB (United Kingdom), NL (Netherlands), NO (Norway), BR (Brazil), AU (Australia: offshore titles, Queensland, South Australia, Northern Territory, Victoria and Western Australia onshore). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "US states: TX, KS, OK, CO, NY, CA, NM, KY, AR, FL, WY, UT, AK, OH, WV, ND, PA, MT. Canadian provinces: AB, BC, SK. Australian states: QLD, SA, NT, VIC, WA.",
            "default": [
              "TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County contains this text (OK and NY)."
          },
          "field": {
            "title": "Field",
            "type": "string",
            "description": "Oil or gas field contains this text (KS and CO)."
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Status contains this text, e.g. Producing, Plugged."
          },
          "wellType": {
            "title": "Well type",
            "type": "string",
            "description": "Well type or class contains this text, e.g. OW, GW, Oil."
          },
          "spudFrom": {
            "title": "Spudded from",
            "type": "string",
            "description": "Spud date on or after (YYYY-MM-DD)."
          },
          "spudTo": {
            "title": "Spudded to",
            "type": "string",
            "description": "Spud date on or before (YYYY-MM-DD)."
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Find wells near this point (with longitude)."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Find wells near this point (with latitude)."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "type": "number",
            "description": "Search radius around the point.",
            "default": 5
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "api",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Sort by state and API number (default), newest or oldest spud date; nearest first when a point is given.",
            "default": "api"
          },
          "groupBy": {
            "title": "Group by",
            "enum": [
              "country",
              "state",
              "operator",
              "status",
              "wellType",
              "county",
              "field",
              "spudYear"
            ],
            "type": "string",
            "description": "Return well counts per group instead of wells."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows or groups to return.",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}