{
  "openapi": "3.0.1",
  "info": {
    "title": "USGS Earthquake Events: Data Export & Change Monitor",
    "description": "Export earthquakes from the official USGS catalog by time, area (rectangle across the date line or circle), magnitude and depth, with PAGER alert, tsunami flag and felt reports. Monitor new, revised and deleted events between runs.",
    "version": "0.1",
    "x-build-id": "70b4q0DRYITV9ahLm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~usgs-earthquake-events/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-usgs-earthquake-events",
        "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/cliqtomedia~usgs-earthquake-events/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-usgs-earthquake-events",
        "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/cliqtomedia~usgs-earthquake-events/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-usgs-earthquake-events",
        "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": {
          "lastDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Time window ending now (or at endTime). Ignored when startTime is set. Default: 7 days.",
            "default": 7
          },
          "startTime": {
            "title": "Start time (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?)?$",
            "type": "string",
            "description": "Optional window start: a date like 2026-10-01 (00:00 UTC) or a UTC time like 2026-10-01T06:00:00Z. A time without offset is UTC."
          },
          "endTime": {
            "title": "End time (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?)?$",
            "type": "string",
            "description": "Optional window end, same format as startTime. Default: now."
          },
          "minMagnitude": {
            "title": "Minimum magnitude",
            "minimum": -2,
            "maximum": 10,
            "type": "number",
            "description": "Smallest magnitude to include. Default 4.5 (felt worldwide news-level events). Lower values return many more small events. Via API, null means no limit, which also includes the few events without a magnitude.",
            "default": 4.5
          },
          "maxMagnitude": {
            "title": "Maximum magnitude",
            "minimum": -2,
            "maximum": 10,
            "type": "number",
            "description": "Largest magnitude to include. Default: no limit."
          },
          "minDepthKm": {
            "title": "Minimum depth (km)",
            "minimum": -100,
            "maximum": 1000,
            "type": "number",
            "description": "Shallowest hypocenter depth in kilometres. Negative depths are above sea level. Default: no limit."
          },
          "maxDepthKm": {
            "title": "Maximum depth (km)",
            "minimum": -100,
            "maximum": 1000,
            "type": "number",
            "description": "Deepest hypocenter depth in kilometres. Default: no limit."
          },
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "Which seismic event types to include. Default: earthquake only (quarry blasts, explosions and other events excluded). Clear the list to include every type.",
            "items": {
              "type": "string",
              "enum": [
                "earthquake",
                "explosion",
                "quarry blast",
                "ice quake",
                "other event",
                "landslide",
                "mining explosion",
                "rock burst",
                "sonic boom",
                "volcanic eruption",
                "nuclear explosion",
                "chemical explosion",
                "induced or triggered event",
                "experimental explosion",
                "collapse",
                "acoustic noise",
                "mine collapse",
                "not reported",
                "snow avalanche",
                "rockslide",
                "meteorite",
                "volcanic explosion"
              ]
            },
            "default": [
              "earthquake"
            ]
          },
          "alertLevel": {
            "title": "PAGER alert level",
            "enum": [
              "any",
              "green",
              "yellow",
              "orange",
              "red"
            ],
            "type": "string",
            "description": "Only events with this USGS PAGER estimated-impact alert level. Most events have no PAGER alert, so this filter returns few rows. Default: any (no PAGER filter).",
            "default": "any"
          },
          "reviewStatus": {
            "title": "Review status",
            "enum": [
              "all",
              "reviewed",
              "automatic"
            ],
            "type": "string",
            "description": "Automatic solutions are preliminary and change more often; reviewed ones are checked by seismologists. Default: all.",
            "default": "all"
          },
          "minLatitude": {
            "title": "Rectangle: min latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "South edge of a rectangle (-90..90). Leave all area fields empty to search the whole world."
          },
          "maxLatitude": {
            "title": "Rectangle: max latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "North edge of the rectangle."
          },
          "minLongitude": {
            "title": "Rectangle: min longitude (west)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "West edge (-180..180). If west is greater than east, e.g. 170 and -170, the rectangle crosses the date line (antimeridian) and covers Fiji/Tonga-style regions correctly."
          },
          "maxLongitude": {
            "title": "Rectangle: max longitude (east)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "East edge (-180..180)."
          },
          "latitude": {
            "title": "Circle: center latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center of a circle search. Use either the rectangle or the circle, not both."
          },
          "longitude": {
            "title": "Circle: center longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude of the circle."
          },
          "radiusKm": {
            "title": "Circle: radius (km)",
            "minimum": 0.1,
            "maximum": 20001,
            "type": "number",
            "description": "Circle radius in kilometres (up to 20001)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "largest"
            ],
            "type": "string",
            "description": "Order of results; with maxResults it decides which events are kept when more match.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum event rows per run (1–500). When more events match, the run says how many exist at the source instead of silently cutting them. Default: 100.",
            "default": 100
          },
          "monitorKey": {
            "title": "Monitor key",
            "pattern": "^[A-Za-z0-9-]{1,40}$",
            "maxLength": 40,
            "type": "string",
            "description": "Any name, e.g. japan-m5. Runs with the same key compare against the previous run and mark events new, revised, deleted or unchanged. The snapshot is kept in your account in the named key-value store usgs-earthquake-events-monitor."
          },
          "previousDatasetId": {
            "title": "Previous dataset ID",
            "type": "string",
            "description": "Alternative to monitorKey: the ID of the dataset of an earlier run of this Actor (for example the run's defaultDatasetId). The run compares against its event rows."
          },
          "onlyChanges": {
            "title": "Only changes",
            "type": "boolean",
            "description": "In change monitoring, write only new, revised and deleted events (unchanged ones are counted in the run summary, not charged). Turn off to get every matching event with its change type.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}