{
  "openapi": "3.0.1",
  "info": {
    "title": "USGS Earthquakes Near My Sites",
    "description": "Match the official USGS recent-earthquake feed against a small facility list and deliver new or materially revised nearby event findings with distance and source provenance.",
    "version": "0.1",
    "x-build-id": "p2rmiQQl2bxRwDb0N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/natstandridge~usgs-earthquake-asset-proximity-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-natstandridge-usgs-earthquake-asset-proximity-feed",
        "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/natstandridge~usgs-earthquake-asset-proximity-feed/runs": {
      "post": {
        "operationId": "runs-sync-natstandridge-usgs-earthquake-asset-proximity-feed",
        "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/natstandridge~usgs-earthquake-asset-proximity-feed/run-sync": {
      "post": {
        "operationId": "run-sync-natstandridge-usgs-earthquake-asset-proximity-feed",
        "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": {
          "assets": {
            "title": "Sites to watch",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Explicit list of 0–50 sites. Each site has a unique safe id, latitude, longitude and radiusKm (1–2000). An explicit empty list returns zero findings and makes no source request; omitting assets is invalid in the Actor runtime.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "lat",
                "lon",
                "radiusKm"
              ],
              "properties": {
                "id": {
                  "title": "Site ID",
                  "type": "string",
                  "editor": "textfield",
                  "description": "Unique 1–50 character site identifier; letters, digits, underscores or hyphens, starting with a letter or digit.",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,49}$"
                },
                "lat": {
                  "title": "Latitude",
                  "type": "number",
                  "editor": "number",
                  "description": "Site latitude in decimal degrees, from -90 to 90.",
                  "minimum": -90,
                  "maximum": 90
                },
                "lon": {
                  "title": "Longitude",
                  "type": "number",
                  "editor": "number",
                  "description": "Site longitude in decimal degrees, from -180 to 180.",
                  "minimum": -180,
                  "maximum": 180
                },
                "radiusKm": {
                  "title": "Alert radius in kilometers",
                  "type": "number",
                  "editor": "number",
                  "description": "Great-circle radius around the site, from 1 to 2000 km.",
                  "minimum": 1,
                  "maximum": 2000
                }
              }
            }
          },
          "monitorKey": {
            "title": "Watch name",
            "minLength": 1,
            "maxLength": 50,
            "type": "string",
            "description": "Stable 1–50 character watch identifier used with previousSnapshot to suppress repeat findings; letters, digits, underscores and hyphens only."
          },
          "lookbackHours": {
            "title": "Event lookback hours",
            "minimum": 1,
            "maximum": 144,
            "type": "integer",
            "description": "Include only USGS event times in the last 1–144 hours, within the fixed past-week feed."
          },
          "minMagnitude": {
            "title": "Minimum magnitude",
            "minimum": 2.5,
            "maximum": 9.5,
            "type": "number",
            "description": "Reported USGS magnitude threshold from 2.5 to 9.5. The fixed feed itself contains only M2.5+ events."
          },
          "maxFindings": {
            "title": "Maximum new findings",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "At most 1–200 delivered event-by-site findings per run. Unsent findings are reported as partial and are not charged."
          },
          "previousSnapshot": {
            "title": "Prior delivered snapshot (optional)",
            "maxItems": 500,
            "type": "array",
            "description": "Paste OUTPUT.snapshot from the prior run with the same monitorKey. Only delivered findings update it; up to 500 asset/event signatures.",
            "items": {
              "type": "object"
            }
          },
          "maxRunSeconds": {
            "title": "Work budget in seconds",
            "minimum": 45,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for the one fixed USGS feed request, matching and dataset delivery (45–180 seconds)."
          },
          "requestTimeoutSeconds": {
            "title": "Source request timeout in seconds",
            "minimum": 5,
            "maximum": 30,
            "type": "integer",
            "description": "Network timeout of 5–30 seconds for the fixed USGS HTTPS request. Source redirects are refused."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}