{
 "openapi": "3.1.0",
 "info": {
  "title": "The tidal Thames through London (Environment Agency): data.promptugal.news",
  "version": "v0.1.151",
  "description": "Water level at seven Environment Agency gauges on the tidal Thames from Richmond to Erith, every 15 minutes over the last 24 hours.\n\nPublisher: Environment Agency, real-time flood-monitoring API. Reuse terms: Open Government Licence v3.0, no registration; acknowledge with: \"this uses Environment Agency flood and river level data from the real-time data API (Beta)\". Not for safety-critical use. Not a warning service: follow IPMA and ANEPC.\n\nCode: Apache-2.0. Text: CC BY 4.0. The data keeps the terms of its own source (see each source card); nothing here relaxes them.",
  "license": {
   "name": "Apache-2.0 for code; each source keeps its own data terms",
   "identifier": "Apache-2.0"
  },
  "contact": {
   "name": "PrompTugal.news data",
   "url": "https://github.com/PrompTugal/PrompTugal__News__Data"
  }
 },
 "servers": [
  {
   "url": "https://data.promptugal.news",
   "description": "Production"
  }
 ],
 "externalDocs": {
  "description": "How to use the API",
  "url": "https://data.promptugal.news/api/"
 },
 "paths": {
  "/api/v1/ea-thames-tide/latest.json": {
   "get": {
    "operationId": "get_ea_thames_tide_latest",
    "tags": [
     "ea-thames-tide"
    ],
    "summary": "The tidal Thames through London (Environment Agency): the latest read",
    "description": "Water level on the tidal Thames through London, at seven Environment Agency gauges from Richmond to Erith, every 15 minutes over the 24 hours before the read, in metres as the EA published them (its datum per gauge is on the station page). Not a warning service: the EA's own flood warnings are in ea-flood. Collected once a day as the archive; the page shows the live levels read in your browser.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "provenance": {
           "type": "object",
           "properties": {
            "source": {
             "type": "string"
            },
            "page": {
             "type": "string"
            },
            "read_at": {
             "type": "string"
            },
            "by": {
             "type": "string"
            },
            "terms": {
             "type": "string"
            },
            "api": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "api"
           ]
          },
          "country": {
           "type": "string"
          },
          "place": {
           "type": "string"
          },
          "about": {
           "type": "string"
          },
          "live": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "url",
            "how"
           ]
          },
          "attribution": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "gauges": {
             "type": "integer"
            },
            "with_readings": {
             "type": "integer"
            },
            "readings": {
             "type": "integer"
            }
           },
           "required": [
            "gauges",
            "with_readings",
            "readings"
           ]
          },
          "gauges": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "station": {
              "type": "string",
              "format": "uri"
             },
             "readings": {
              "type": "integer"
             },
             "latest": {
              "type": [
               "object",
               "null"
              ],
              "properties": {
               "at": {
                "type": "string"
               },
               "m": {
                "type": "number"
               }
              },
              "required": [
               "at",
               "m"
              ]
             },
             "high_24h": {
              "type": [
               "object",
               "null"
              ],
              "properties": {
               "at": {
                "type": "string"
               },
               "m": {
                "type": "number"
               }
              },
              "required": [
               "at",
               "m"
              ]
             },
             "low_24h": {
              "type": [
               "object",
               "null"
              ],
              "properties": {
               "at": {
                "type": "string"
               },
               "m": {
                "type": "number"
               }
              },
              "required": [
               "at",
               "m"
              ]
             },
             "series": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "at": {
                 "type": "string"
                },
                "m": {
                 "type": "number"
                }
               },
               "required": [
                "at",
                "m"
               ]
              }
             }
            },
            "required": [
             "id",
             "name",
             "station",
             "readings",
             "latest",
             "high_24h",
             "low_24h",
             "series"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "country",
          "place",
          "about",
          "live",
          "attribution",
          "counts",
          "gauges"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ea-thames-tide",
           "title": "The tidal Thames through London (Environment Agency)",
           "read_at": "2026-11-21T09:19:23Z",
           "provenance": {
            "source": "https://environment.data.gov.uk/flood-monitoring/doc/reference",
            "page": "https://check-for-flooding.service.gov.uk/",
            "read_at": "2026-11-21T09:19:23Z",
            "by": "sources/ea-thames-tide/collect.mjs (code, no model; run by data.b@PrompTugal.dinis)",
            "terms": "Open Government Licence v3.0, no registration; acknowledge with: \"this uses Environment Agency flood and river level data from the real-time data API (Beta)\". Not for safety-critical use.",
            "api": "https://environment.data.gov.uk/flood-monitoring/id/stations/{id}/readings?_sorted&_limit=96"
           },
           "country": "GB",
           "place": "london",
           "about": "Water level on the tidal Thames through London, at seven Environment Agency gauges from Richmond to Erith, every 15 minutes over the 24 hours before the read, in metres as the EA published them (its datum per gauge is on the station page). Not a warning service: the EA's own flood warnings are in ea...",
           "live": {
            "url": "https://environment.data.gov.uk/flood-monitoring/id/stations/{id}/readings?_sorted&_limit=8",
            "how": "the page asks the EA for each gauge when it opens; the EA allows browser reads (CORS *)"
           },
           "attribution": "This uses Environment Agency flood and river level data from the real-time data API (Beta)",
           "counts": {
            "gauges": 7,
            "with_readings": 5,
            "readings": 480
           },
           "gauges": [
            {
             "id": "0009",
             "name": "Richmond",
             "station": "https://environment.data.gov.uk/flood-monitoring/id/stations/0009",
             "readings": 96,
             "latest": {
              "at": "2026-11-21T09:00:00Z",
              "m": 1.45
             },
             "high_24h": {
              "at": "2026-11-20T23:15:00Z",
              "m": 3.79
             },
             "low_24h": {
              "at": "2026-11-20T19:15:00Z",
              "m": -0.214
             },
             "series": [
              {
               "at": "2026-11-20T09:15:00Z",
               "m": 3.229
              },
              {
               "at": "2026-11-20T09:30:00Z",
               "m": 3.482
              },
              {
               "at": "2026-11-20T09:45:00Z",
               "m": 3.656
              }
             ]
            },
            {
             "id": "0010",
             "name": "Hammersmith",
             "station": "https://environment.data.gov.uk/flood-monitoring/id/stations/0010",
             "readings": 0,
             "latest": null,
             "high_24h": null,
             "low_24h": null,
             "series": []
            },
            {
             "id": "0006",
             "name": "Westminster",
             "station": "https://environment.data.gov.uk/flood-monitoring/id/stations/0006",
             "readings": 96,
             "latest": {
              "at": "2026-11-21T09:00:00Z",
              "m": 2.403
             },
             "high_24h": {
              "at": "2026-11-20T22:15:00Z",
              "m": 3.446
             },
             "low_24h": {
              "at": "2026-11-21T04:45:00Z",
              "m": -1.526
             },
             "series": [
              {
               "at": "2026-11-20T09:15:00Z",
               "m": 3.378
              },
              {
               "at": "2026-11-20T09:30:00Z",
               "m": 3.347
              },
              {
               "at": "2026-11-20T09:45:00Z",
               "m": 3.263
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ea-thames-tide/reads.json": {
   "get": {
    "operationId": "get_ea_thames_tide_reads",
    "tags": [
     "ea-thames-tide"
    ],
    "summary": "The tidal Thames through London (Environment Agency): every read, newest first",
    "description": "Every run of sources/ea-thames-tide/collect.mjs, newest first: each request's address, HTTP status, size, the first 16 hex of its sha256, and whether the bytes changed since the run before. The bytes and the full sha256 go to the source's vault (see card.json: latest/reads-full.json), never to git.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "runs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "at": {
              "type": "string"
             },
             "finished": {
              "type": "string"
             },
             "ok": {
              "type": "integer"
             },
             "failed": {
              "type": "integer"
             },
             "reads": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "name": {
                 "type": "string"
                },
                "url": {
                 "type": "string",
                 "format": "uri"
                },
                "at": {
                 "type": "string"
                },
                "status": {
                 "type": "integer"
                },
                "bytes": {
                 "type": "integer"
                },
                "sha256_prefix": {
                 "type": "string"
                },
                "changed": {
                 "type": "string"
                }
               },
               "required": [
                "name",
                "url",
                "at",
                "status",
                "bytes",
                "sha256_prefix",
                "changed"
               ]
              }
             }
            },
            "required": [
             "at",
             "finished",
             "ok",
             "failed",
             "reads"
            ]
           }
          }
         },
         "required": [
          "about",
          "source",
          "runs"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "Every run of sources/ea-thames-tide/collect.mjs, newest first: each request's address, HTTP status, size, the first 16 hex of its sha256, and whether the bytes changed since the run before. The bytes and the full sha256 go to the source's vault (see card.json: latest/reads-full.json), never to git.",
           "source": "ea-thames-tide",
           "runs": [
            {
             "at": "2026-11-21T09:19:23Z",
             "finished": "2026-11-21T09:20:34Z",
             "ok": 7,
             "failed": 0,
             "reads": [
              {
               "name": "gauge-0009",
               "url": "https://environment.data.gov.uk/flood-monitoring/id/stations/0009/readings?_sorted&_limit=96",
               "at": "2026-11-21T09:19:23Z",
               "status": 200,
               "bytes": 32153,
               "sha256_prefix": "3f2e4dbb7616f6c2",
               "changed": "first read"
              },
              {
               "name": "gauge-0010",
               "url": "https://environment.data.gov.uk/flood-monitoring/id/stations/0010/readings?_sorted&_limit=96",
               "at": "2026-11-21T09:19:40Z",
               "status": 200,
               "bytes": 858,
               "sha256_prefix": "6e5f514c83252666",
               "changed": "first read"
              },
              {
               "name": "gauge-0006",
               "url": "https://environment.data.gov.uk/flood-monitoring/id/stations/0006/readings?_sorted&_limit=96",
               "at": "2026-11-21T09:19:48Z",
               "status": 200,
               "bytes": 32183,
               "sha256_prefix": "ee276c6e6bf92341",
               "changed": "first read"
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ea-thames-tide/card.json": {
   "get": {
    "operationId": "get_ea_thames_tide_card",
    "tags": [
     "ea-thames-tide"
    ],
    "summary": "The tidal Thames through London (Environment Agency): the card",
    "description": "Who publishes the source, its reuse terms, the schedule, who owns it, what runs by code, by agents and by people, and the vault.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "what": {
           "type": "string"
          },
          "publisher": {
           "type": "string"
          },
          "owner": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "collector": {
           "type": "string"
          },
          "source_home": {
           "type": "string"
          },
          "reader_page": {
           "type": "string"
          },
          "schedule": {
           "type": "object",
           "properties": {
            "cadence": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "cadence",
            "how"
           ]
          },
          "terms": {
           "type": "object",
           "properties": {
            "summary": {
             "type": "string"
            },
            "page": {
             "type": "string"
            },
            "read_at": {
             "type": "string"
            },
            "quote": {
             "type": "string"
            },
            "quote_lang": {
             "type": "string"
            },
            "republish": {
             "type": "string"
            },
            "commercial_use": {
             "type": "string"
            }
           },
           "required": [
            "summary",
            "page",
            "read_at",
            "quote",
            "quote_lang",
            "republish",
            "commercial_use"
           ]
          },
          "api": {
           "type": "object",
           "properties": {
            "latest": {
             "type": "string"
            },
            "reads": {
             "type": "string"
            },
            "card": {
             "type": "string"
            },
            "openapi": {
             "type": "string"
            },
            "page": {
             "type": "string"
            }
           },
           "required": [
            "latest",
            "reads",
            "card",
            "openapi",
            "page"
           ]
          },
          "vault": {
           "type": "null"
          },
          "split": {
           "type": "object",
           "properties": {
            "code": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "agents": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "people": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           },
           "required": [
            "code",
            "agents",
            "people"
           ]
          },
          "cost": {
           "type": "object",
           "properties": {
            "per_run_tokens": {
             "type": "integer"
            },
            "per_run_model_cost_usd": {
             "type": "integer"
            },
            "runner": {
             "type": "string"
            },
            "build_tokens": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           },
           "required": [
            "per_run_tokens",
            "per_run_model_cost_usd",
            "runner",
            "build_tokens",
            "note"
           ]
          },
          "since": {
           "type": "string"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "country": {
           "type": "string"
          }
         },
         "required": [
          "id",
          "title",
          "what",
          "publisher",
          "owner",
          "region",
          "collector",
          "source_home",
          "reader_page",
          "schedule",
          "terms",
          "api",
          "vault",
          "split",
          "cost",
          "since",
          "places",
          "country"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "id": "ea-thames-tide",
           "title": "The tidal Thames through London (Environment Agency)",
           "what": "Water level at seven Environment Agency gauges on the tidal Thames from Richmond to Erith, every 15 minutes over the last 24 hours.",
           "publisher": "Environment Agency, real-time flood-monitoring API",
           "owner": "data.b@PrompTugal.dinis",
           "region": "london",
           "collector": "sources/ea-thames-tide/collect.mjs",
           "source_home": "https://environment.data.gov.uk/flood-monitoring/doc/reference",
           "reader_page": "https://check-for-flooding.service.gov.uk/",
           "schedule": {
            "cadence": "daily",
            "how": "once a day at data.b@'s morning wake: one GET per gauge (seven), 2.5 s apart, no key; the page reads the latest levels live in the browser"
           },
           "terms": {
            "summary": "Open Government Licence v3.0, no registration; acknowledge with: \"this uses Environment Agency flood and river level data from the real-time data API (Beta)\". Not for safety-critical use.",
            "page": "https://environment.data.gov.uk/flood-monitoring/doc/reference",
            "read_at": "2026-11-21",
            "quote": "These APIs are provided as open data under the Open Government Licence with no requirement for registration.",
            "quote_lang": "en",
            "republish": "yes, OGL v3.0, with the EA's credit",
            "commercial_use": "allowed"
           },
           "api": {
            "latest": "https://data.promptugal.news/api/v1/ea-thames-tide/latest.json",
            "reads": "https://data.promptugal.news/api/v1/ea-thames-tide/reads.json",
            "card": "https://data.promptugal.news/api/v1/ea-thames-tide/card.json",
            "openapi": "https://data.promptugal.news/api/v1/ea-thames-tide/openapi.json",
            "page": "https://data.promptugal.news/sources/ea-thames-tide/"
           },
           "vault": null,
           "split": {
            "code": [
             "the collector reads the source once a day and keeps the archive; the page reads the live figures in the visitor's browser"
            ],
            "agents": [
             "data.b@PrompTugal.dinis wrote the collector and card on 21 November 2026, for Dinis's London demos (tier 1 of board/team/data/london-feeds.md)"
            ],
            "people": [
             "Dinis Cruz chose tier 1 on 21 November 2026, about 09:16 UTC; no person has checked the values (not reviewed)"
            ]
           },
           "cost": {
            "per_run_tokens": 0,
            "per_run_model_cost_usd": 0,
            "runner": "data.b@'s session",
            "build_tokens": "not measured",
            "note": "Code only: no model is called when the data is collected."
           },
           "since": "2026-11-21",
           "places": [
            "london"
           ],
           "country": "GB"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ea-thames-tide/openapi.json": {
   "get": {
    "operationId": "get_ea_thames_tide_openapi",
    "tags": [
     "ea-thames-tide"
    ],
    "summary": "The tidal Thames through London (Environment Agency): this document",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 },
 "tags": [
  {
   "name": "ea-thames-tide",
   "description": "Water level at seven Environment Agency gauges on the tidal Thames from Richmond to Erith, every 15 minutes over the last 24 hours."
  }
 ],
 "x-source": {
  "id": "ea-thames-tide",
  "card": "https://data.promptugal.news/api/v1/ea-thames-tide/card.json",
  "page": "https://data.promptugal.news/sources/ea-thames-tide/"
 }
}
