{
  "openapi": "3.0.1",
  "info": {
    "title": "Ireland River Levels, Flow & Water Temperature (OPW)",
    "description": "Official OPW hydrometric data for the Republic of Ireland: river and lake water level, river flow and water temperature from about 400 stations. Daily mean/min/max back to the 1950s-1990s, 15-minute data for the last month, annual maxima. No API key.",
    "version": "0.1",
    "x-build-id": "HFjcEvyR1cBUF98yz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/denjino~ireland-river-levels-flow-opw/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-denjino-ireland-river-levels-flow-opw",
        "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/denjino~ireland-river-levels-flow-opw/runs": {
      "post": {
        "operationId": "runs-sync-denjino-ireland-river-levels-flow-opw",
        "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/denjino~ireland-river-levels-flow-opw/run-sync": {
      "post": {
        "operationId": "run-sync-denjino-ireland-river-levels-flow-opw",
        "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": {
          "mode": {
            "title": "What to return",
            "enum": [
              "readings",
              "stations"
            ],
            "type": "string",
            "description": "Readings, or only the station directory (to find station IDs).",
            "default": "readings"
          },
          "dataType": {
            "title": "Measurement",
            "enum": [
              "waterLevel",
              "riverFlow",
              "waterTemperature"
            ],
            "type": "string",
            "description": "Which OPW measurement to fetch.",
            "default": "waterLevel"
          },
          "resolution": {
            "title": "Resolution",
            "enum": [
              "daily",
              "15min",
              "annualMax"
            ],
            "type": "string",
            "description": "Daily summaries, recent 15-minute readings, or the yearly peak series used in flood studies.",
            "default": "daily"
          },
          "waterbody": {
            "title": "River or lake",
            "type": "string",
            "description": "Optional, partial match, e.g. 'Shannon', 'Liffey', 'Corrib'."
          },
          "catchment": {
            "title": "Catchment",
            "type": "string",
            "description": "Optional catchment name, partial match, e.g. 'Barrow', 'Moy'."
          },
          "search": {
            "title": "Station name search",
            "type": "string",
            "description": "Optional text search on station name, e.g. 'Athlone'."
          },
          "stationIds": {
            "title": "Station numbers",
            "type": "array",
            "description": "Optional OPW station numbers like '25017'. Use mode 'stations' to find them.",
            "items": {
              "type": "string"
            }
          },
          "stationClass": {
            "title": "Station type",
            "enum": [
              "any",
              "Level & Flow",
              "Level",
              "Tidal"
            ],
            "type": "string",
            "description": "Optional filter on OPW's station class.",
            "default": "any"
          },
          "latitude": {
            "title": "Near latitude",
            "type": "number",
            "description": "Optional. With longitude, finds stations within the radius, nearest first."
          },
          "longitude": {
            "title": "Near longitude",
            "type": "number",
            "description": "Optional longitude for the near-a-point search."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Search radius around the point.",
            "default": 25
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "YYYY-MM-DD. Default: 30 days before the end date (2 days for 15-minute data; whole record for annual maxima)."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "maxStations": {
            "title": "Max stations",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many matching stations to pull readings for.",
            "default": 5
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows (0 = no limit). You pay per row.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}