{
  "openapi": "3.0.1",
  "info": {
    "title": "Gulf of America Offshore Drilling Permits & Rig Monitor (BSEE)",
    "description": "Track new and changed Gulf of America offshore drilling permits from BSEE, with rig, water depth, location, and live borehole status.",
    "version": "0.1",
    "x-build-id": "AffNzT97jPGL3wJ32"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maniginam~gulf-offshore-drilling-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maniginam-gulf-offshore-drilling-monitor",
        "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/maniginam~gulf-offshore-drilling-monitor/runs": {
      "post": {
        "operationId": "runs-sync-maniginam-gulf-offshore-drilling-monitor",
        "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/maniginam~gulf-offshore-drilling-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-maniginam-gulf-offshore-drilling-monitor",
        "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": {
          "operatorContains": {
            "title": "Operator name contains",
            "maxLength": 80,
            "type": "string",
            "description": "Case-insensitive text that must appear in the operator name, for example shell or chevron.  Leave empty for all operators."
          },
          "areaCodes": {
            "title": "OCS area codes",
            "maxItems": 100,
            "type": "array",
            "description": "Two-letter BSEE area codes, matched against the surface or bottom-hole area.  Examples: GC Green Canyon, MC Mississippi Canyon, WR Walker Ridge, KC Keathley Canyon, AT Atwater Valley, GB Garden Banks, AC Alaminos Canyon.  Leave empty for the whole Gulf.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "approvedSince": {
            "title": "Approved on or after",
            "type": "string",
            "description": "Earliest date BSEE approved the permit (YYYY-MM-DD).  Leave empty for no lower bound."
          },
          "approvedUntil": {
            "title": "Approved on or before",
            "type": "string",
            "description": "Latest date BSEE approved the permit (YYYY-MM-DD), inclusive.  Leave empty for no upper bound."
          },
          "minWaterDepthFt": {
            "title": "Minimum water depth (ft)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Only permits in at least this much water, for example 5000 for deepwater.  Leave empty for any depth."
          },
          "boreholeStatuses": {
            "title": "Borehole statuses",
            "uniqueItems": true,
            "type": "array",
            "description": "Only permits whose borehole currently has one of these BSEE statuses, for example Drilling active.  Leave empty for any status, including permits with no borehole yet.",
            "items": {
              "type": "string",
              "enum": [
                "APD",
                "AST",
                "CNL",
                "COM",
                "CT",
                "DRL",
                "DSI",
                "PA",
                "ST",
                "TA",
                "VCW"
              ],
              "enumTitles": [
                "Application for permit to drill",
                "Approved sidetrack",
                "Cancelled",
                "Completed",
                "Core test well",
                "Drilling active",
                "Drilling suspended",
                "Permanently abandoned",
                "Sidetracked",
                "Temporarily abandoned",
                "Volume chamber well"
              ]
            }
          },
          "maxResults": {
            "title": "Maximum permits to check",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper limit on matching permits checked in this run, newest approval first.  Each published permit is one permit-record event.  To watch every Gulf permit in monitor mode, raise it to 50000; only new or changed permits are published and charged.",
            "default": 1000
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed permits (monitor mode)",
            "type": "boolean",
            "description": "When on, the Actor remembers each permit for these exact filters and publishes only permits that are new or whose approval time, rig, borehole status, spud date, or total depth date changed since the previous run.  Unchanged permits are skipped and not charged.  Use it with a daily schedule.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}