{
  "openapi": "3.0.1",
  "info": {
    "title": "Lake and Reservoir Levels Nationwide (800+ US Lakes)",
    "description": "Current lake and reservoir levels for about 800 US reservoirs plus river gauges. Search by lake name or state. Pool elevation, 24-hour change, dam release. Self-checked JSON or CSV.",
    "version": "0.3",
    "x-build-id": "M4jOrEIqxrjXDLwl0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/standardwork~lake-reservoir-levels-nationwide/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-standardwork-lake-reservoir-levels-nationwide",
        "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/standardwork~lake-reservoir-levels-nationwide/runs": {
      "post": {
        "operationId": "runs-sync-standardwork-lake-reservoir-levels-nationwide",
        "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/standardwork~lake-reservoir-levels-nationwide/run-sync": {
      "post": {
        "operationId": "run-sync-standardwork-lake-reservoir-levels-nationwide",
        "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": {
          "includeKentuckyLake": {
            "title": "Include Kentucky Lake",
            "type": "boolean",
            "description": "Include Kentucky Lake (TVA site KYDK2). Turn off to skip it even if KYDK2 is in the TVA list.",
            "default": true
          },
          "includeLakeBarkley": {
            "title": "Include Lake Barkley",
            "type": "boolean",
            "description": "Include Lake Barkley (Army Corps CWMS series). Turn off to skip it even if it is in the CWMS list.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "readings",
              "list"
            ],
            "type": "string",
            "description": "Readings fetches current levels. List returns matching lakes from the built-in index without readings, so you can browse.",
            "default": "readings"
          },
          "lakeName": {
            "title": "Lake name (search)",
            "type": "string",
            "description": "Part of a lake or dam name, e.g. Table Rock or Lake Cumberland. When set, the two default lakes are skipped unless they match."
          },
          "state": {
            "title": "State (search)",
            "type": "string",
            "description": "2-letter state code, e.g. MO. Can be combined with Lake name."
          },
          "sources": {
            "title": "Sources to search",
            "type": "array",
            "description": "Which feeds to search: corps (Army Corps reservoirs), tva, noaa (NOAA gauges). Default all three.",
            "items": {
              "type": "string"
            }
          },
          "includeRiverGauges": {
            "title": "Include NOAA river gauges in search",
            "type": "boolean",
            "description": "Off by default: searches return lake and pool gauges only. Turn on to include river stage gauges.",
            "default": false
          },
          "maxLakes": {
            "title": "Max lakes",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap on lakes returned from a search (readings mode max 200, list mode max 2000). Keeps cost predictable.",
            "default": 25
          },
          "noaaCrossCheck": {
            "title": "Live cross-check against NOAA",
            "type": "boolean",
            "description": "For lakes with a checked NOAA link, compare the reading with NOAA and flag gaps over 0.5 ft.",
            "default": true
          },
          "tvaSites": {
            "title": "TVA dam site codes",
            "type": "array",
            "description": "TVA site codes, e.g. KYDK2 (Kentucky Dam).",
            "items": {
              "type": "string"
            }
          },
          "cwmsSeries": {
            "title": "Army Corps CWMS series",
            "type": "array",
            "description": "Objects with office and name, e.g. {\"office\":\"LRN\",\"name\":\"BAHK2-BARKLEY.Elev-Pool.Inst.1Hour.0.dcp-rev\",\"label\":\"Lake Barkley\"}"
          },
          "nwpsGauges": {
            "title": "NOAA gauge IDs",
            "type": "array",
            "description": "NOAA NWPS gauge IDs (5 characters), e.g. SMLI2. Added to the results.",
            "items": {
              "type": "string"
            }
          },
          "hours": {
            "title": "Hours of history",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Hours of history to return per lake (1-168). TVA publishes only the last 48 hours, so TVA history is capped at 48. The 24-hour change is always computed.",
            "default": 24
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}