{
 "openapi": "3.1.0",
 "info": {
  "title": "data.promptugal.news API v1",
  "version": "v0.1.39",
  "description": "Every GET file of data.promptugal.news, 12 sources. Each response schema is inferred from the real file (x-inferred) and each example is a real file cut to a readable size. Data terms by source:\n\n- adsb-faro: adsb.lol: its API data is licensed under the Open Database License (ODbL 1.0): share-alike, with attribution; no key needed up to 500 requests a day per address.\n- base-gov-pt: IMPIC publishes these contracts as open data on dados.gov.pt with the licence \"Outra (Domínio Público)\" (other-pd, public domain); we name IMPIC and the Portal BASE as the source and link each contract's page.\n- events-pt: Strictest of the sources: no reuse licence or terms page was found for any of the four hosts (teatrodasfiguras.pt and cm-tavira.pt show only \"Todos os direitos reservados\" in their footers, and cm-tavira.pt has no robots.txt). The robots.txt files that exist allow the paths read; agendalx.pt sets Content-Signal search=yes, ai-train=no, use=reference. So: reference use only, name the source, link to the event, no AI training. Not reviewed by a person: whether this is enough to republish is for Dinis.\n- ipma-city-forecasts: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- ipma-fire-risk: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- ipma-observations: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- ipma-sea: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- ipma-uv: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- ipma-warnings: IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.\n- meteoalarm-pt: MeteoAlarm: re-users must name the national service (IPMA), keep the time of issue, link www.meteoalarm.org and publish MeteoAlarm's disclaimer. latest.json carries all four.\n- social: Organisations only, official interfaces only, by link. Bluesky: robots.txt of the public API allows crawling it and asks for backoff on 429; the Terms of Service (14 Aug 2025) leave each post's content with its author, so we store link and metadata only and credit the organisation. Mastodon: mastodon.social's terms (effective 2026-08-31) say whoever owns the content retains ownership and allow API access; its robots.txt disallows only /media_proxy/, /interact/ and a domain-blocks path. Licence on each post: the platform's terms, holder the organisation. Not reviewed by a person.\n- storm-charles-archive: The storm site's own data: Apache-2.0 (its repository's licence). Quoted sources keep their own terms; each item links its source.\n\nNot 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/index.json": {
   "get": {
    "operationId": "get_index",
    "tags": [
     "meta"
    ],
    "summary": "The catalogue",
    "description": "The catalogue of data.promptugal.news: the raw public data behind every PrompTugal site, collected by code, no articles. Not a warning service: follow IPMA and ANEPC.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "api": {
           "type": "string"
          },
          "contract": {
           "type": "string"
          },
          "version": {
           "type": "string"
          },
          "built_at": {
           "type": "string"
          },
          "site": {
           "type": "string"
          },
          "licence": {
           "type": "object",
           "properties": {
            "code": {
             "type": "string"
            },
            "text": {
             "type": "string"
            },
            "data": {
             "type": "string"
            }
           },
           "required": [
            "code",
            "text",
            "data"
           ]
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "publisher": {
              "type": "string"
             },
             "cadence": {
              "type": "string"
             },
             "read_at": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "headline": {
              "type": "string"
             },
             "latest": {
              "type": "string",
              "format": "uri"
             },
             "reads": {
              "type": [
               "string",
               "null"
              ],
              "format": "uri"
             },
             "card": {
              "type": "string",
              "format": "uri"
             },
             "openapi": {
              "type": "string",
              "format": "uri"
             },
             "page": {
              "type": "string",
              "format": "uri"
             },
             "vault_id": {
              "type": [
               "string",
               "null"
              ]
             },
             "terms_summary": {
              "type": "string"
             }
            },
            "required": [
             "id",
             "title",
             "publisher",
             "cadence",
             "read_at",
             "status",
             "headline",
             "latest",
             "reads",
             "card",
             "openapi",
             "page",
             "vault_id",
             "terms_summary"
            ]
           }
          },
          "by_place": {
           "type": "array",
           "items": {
            "type": "string",
            "format": "uri"
           }
          },
          "by_place_index": {
           "type": "string"
          },
          "events_by_place_index": {
           "type": "string"
          },
          "openapi": {
           "type": "string"
          },
          "swagger": {
           "type": "string"
          }
         },
         "required": [
          "about",
          "api",
          "contract",
          "version",
          "built_at",
          "site",
          "licence",
          "sources",
          "by_place",
          "by_place_index",
          "events_by_place_index",
          "openapi",
          "swagger"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "The catalogue of data.promptugal.news: the raw public data behind every PrompTugal site, collected by code, no articles. Not a warning service: follow IPMA and ANEPC.",
           "api": "v1",
           "contract": "https://data.promptugal.news/api/v1/README.md",
           "version": "v0.1.39",
           "built_at": "2026-11-18T16:32:56.422Z",
           "site": "https://data.promptugal.news",
           "licence": {
            "code": "Apache-2.0",
            "text": "CC BY 4.0",
            "data": "each source keeps its own terms (terms_summary, and the card)"
           },
           "sources": [
            {
             "id": "adsb-faro",
             "title": "Flights around Faro airport",
             "publisher": "adsb.lol (community ADS-B receivers)",
             "cadence": "hourly",
             "read_at": "2026-11-18T16:30:05Z",
             "status": "ok",
             "headline": "5 airline flights, 0 other aircraft",
             "latest": "https://data.promptugal.news/api/v1/adsb-faro/latest.json",
             "reads": "https://data.promptugal.news/api/v1/adsb-faro/reads.json",
             "card": "https://data.promptugal.news/api/v1/adsb-faro/card.json",
             "openapi": "https://data.promptugal.news/api/v1/adsb-faro/openapi.json",
             "page": "https://data.promptugal.news/sources/adsb-faro/",
             "vault_id": "sd1fblzs",
             "terms_summary": "adsb.lol: its API data is licensed under the Open Database License (ODbL 1.0): share-alike, with attribution; no key needed up to 500 requests a day per address."
            },
            {
             "id": "base-gov-pt",
             "title": "Public contracts (Portal BASE)",
             "publisher": "IMPIC, Instituto dos Mercados Públicos, do Imobiliário e da Construção (Portal BASE), through dados.gov.pt",
             "cadence": "every 6 hours",
             "read_at": "2026-11-18T16:30:06Z",
             "status": "ok",
             "headline": "1514 contracts",
             "latest": "https://data.promptugal.news/api/v1/base-gov-pt/latest.json",
             "reads": "https://data.promptugal.news/api/v1/base-gov-pt/reads.json",
             "card": "https://data.promptugal.news/api/v1/base-gov-pt/card.json",
             "openapi": "https://data.promptugal.news/api/v1/base-gov-pt/openapi.json",
             "page": "https://data.promptugal.news/sources/base-gov-pt/",
             "vault_id": null,
             "terms_summary": "IMPIC publishes these contracts as open data on dados.gov.pt with the licence \"Outra (Domínio Público)\" (other-pd, public domain); we name IMPIC and the Portal BASE as the source and link each contract's page."
            },
            {
             "id": "events-pt",
             "title": "Events in Portugal, by place",
             "publisher": "Câmara Municipal de Lisboa (Agenda Cultural de Lisboa, agendalx.pt) Câmara Municipal de Lagos (cm-lagos.pt), Teatro das Figuras, Faro (teatrodasfiguras.pt) and Câmara Municipal de Tavira (cm-tavira.pt)",
             "cadence": "every 6 hours",
             "read_at": "2026-11-18T16:30:08Z",
             "status": "partly failed",
             "headline": "141 events",
             "latest": "https://data.promptugal.news/api/v1/events-pt/latest.json",
             "reads": "https://data.promptugal.news/api/v1/events-pt/reads.json",
             "card": "https://data.promptugal.news/api/v1/events-pt/card.json",
             "openapi": "https://data.promptugal.news/api/v1/events-pt/openapi.json",
             "page": "https://data.promptugal.news/sources/events-pt/",
             "vault_id": null,
             "terms_summary": "Strictest of the sources: no reuse licence or terms page was found for any of the four hosts (teatrodasfiguras.pt and cm-tavira.pt show only \"Todos os direitos reservados\" in their footers, and cm-tavira.pt has no robots.txt). The robots.txt files that exist allow the paths read; agendalx.pt sets Co..."
            }
           ],
           "by_place": [
            "https://data.promptugal.news/api/v1/by-place/now/albufeira.json",
            "https://data.promptugal.news/api/v1/by-place/now/alcoutim.json",
            "https://data.promptugal.news/api/v1/by-place/now/algarve.json"
           ],
           "by_place_index": "https://data.promptugal.news/api/v1/by-place/now/index.json",
           "events_by_place_index": "https://data.promptugal.news/api/v1/events/by-place/index.json",
           "openapi": "https://data.promptugal.news/api/v1/openapi.json",
           "swagger": "https://data.promptugal.news/api/swagger/"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/openapi.json": {
   "get": {
    "operationId": "get_openapi",
    "tags": [
     "meta"
    ],
    "summary": "This document",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/README.md": {
   "get": {
    "operationId": "get_readme",
    "tags": [
     "meta"
    ],
    "summary": "The stability contract",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "text/markdown": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/adsb-faro/latest.json": {
   "get": {
    "operationId": "get_adsb_faro_latest",
    "tags": [
     "adsb-faro"
    ],
    "summary": "Flights around Faro airport: the latest read",
    "description": "What adsb.lol's community receivers saw within 40 nautical miles of Faro airport at the time read. Airline flights (an ICAO airline code and a flight number as callsign) by callsign; every other aircraft only counted. Coverage depends on volunteers' receivers: absence here is not proof an aircraft was not there.",
    "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"
            },
            "licence": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "licence"
           ]
          },
          "about": {
           "type": "string"
          },
          "airport": {
           "type": "object",
           "properties": {
            "icao": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "lat": {
             "type": "number"
            },
            "lon": {
             "type": "number"
            },
            "within_nm": {
             "type": "integer"
            }
           },
           "required": [
            "icao",
            "name",
            "lat",
            "lon",
            "within_nm"
           ]
          },
          "feed_time_ms": {
           "type": "integer"
          },
          "counts": {
           "type": "object",
           "properties": {
            "airline": {
             "type": "integer"
            },
            "other_aircraft": {
             "type": "integer"
            },
            "other_on_ground": {
             "type": "integer"
            },
            "by_airline": {
             "type": "object",
             "properties": {
              "AMB": {
               "type": "integer"
              },
              "EZY": {
               "type": "integer"
              },
              "IBS": {
               "type": "integer"
              },
              "JMJ": {
               "type": "integer"
              }
             },
             "required": [
              "AMB",
              "EZY",
              "IBS",
              "JMJ"
             ]
            },
            "by_altitude_band": {
             "type": "object",
             "properties": {
              "30,000 ft and above": {
               "type": "integer"
              }
             },
             "required": [
              "30,000 ft and above"
             ]
            }
           },
           "required": [
            "airline",
            "other_aircraft",
            "other_on_ground",
            "by_airline",
            "by_altitude_band"
           ]
          },
          "airline": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "callsign": {
              "type": "string"
             },
             "airline_icao": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "alt_ft": {
              "type": "integer"
             },
             "on_ground": {
              "type": "boolean"
             },
             "ground_speed_kt": {
              "type": "number"
             },
             "track_deg": {
              "type": "number"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             }
            },
            "required": [
             "callsign",
             "airline_icao",
             "type",
             "alt_ft",
             "on_ground",
             "ground_speed_kt",
             "track_deg",
             "lat",
             "lon"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "airport",
          "feed_time_ms",
          "counts",
          "airline"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "adsb-faro",
           "title": "Flights around Faro airport",
           "read_at": "2026-11-18T16:30:05Z",
           "provenance": {
            "source": "https://api.adsb.lol/v2/point/37.0144/-7.9659/40",
            "page": "https://globe.adsb.lol/?lat=37.014&lon=-7.966&zoom=9",
            "read_at": "2026-11-18T16:30:05Z",
            "by": "sources/adsb-faro/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "adsb.lol: its API data is licensed under the Open Database License (ODbL 1.0): share-alike, with attribution; no key needed up to 500 requests a day per address.",
            "licence": "ODbL 1.0 (adsb.lol)"
           },
           "about": "What adsb.lol's community receivers saw within 40 nautical miles of Faro airport at the time read. Airline flights (an ICAO airline code and a flight number as callsign) by callsign; every other aircraft only counted. Coverage depends on volunteers' receivers: absence here is not proof an aircraft w...",
           "airport": {
            "icao": "LPFR",
            "name": "Faro airport",
            "lat": 37.0144,
            "lon": -7.9659,
            "within_nm": 40
           },
           "feed_time_ms": 1795019406501,
           "counts": {
            "airline": 5,
            "other_aircraft": 0,
            "other_on_ground": 0,
            "by_airline": {
             "AMB": 1,
             "EZY": 2,
             "IBS": 1,
             "JMJ": 1
            },
            "by_altitude_band": {
             "30,000 ft and above": 5
            }
           },
           "airline": [
            {
             "callsign": "AMB556",
             "airline_icao": "AMB",
             "type": "C680",
             "alt_ft": 47000,
             "on_ground": false,
             "ground_speed_kt": 428.2,
             "track_deg": 47.37,
             "lat": 36.52,
             "lon": -8.15
            },
            {
             "callsign": "EZY93VG",
             "airline_icao": "EZY",
             "type": "A20N",
             "alt_ft": 39000,
             "on_ground": false,
             "ground_speed_kt": 429.3,
             "track_deg": 185.88,
             "lat": 36.5,
             "lon": -7.82
            },
            {
             "callsign": "EZY95KM",
             "airline_icao": "EZY",
             "type": "A20N",
             "alt_ft": 39025,
             "on_ground": false,
             "ground_speed_kt": 412.9,
             "track_deg": 192.59,
             "lat": 36.84,
             "lon": -8.07
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/base-gov-pt/latest.json": {
   "get": {
    "operationId": "get_base_gov_pt_latest",
    "tags": [
     "base-gov-pt"
    ],
    "summary": "Public contracts (Portal BASE): the latest read",
    "description": "Public contracts published on the Portal BASE in the last 90 days (from 2026-08-20) where the contracting entity is the câmara municipal of Lisboa or of one of the Algarve's 16 municipalities (Quarteira is a parish of Loulé and has no câmara of its own). From IMPIC's open data, which is updated about weekly: a contract appears here some days after it is signed. object is cut to 200 characters. A contractor that is a company keeps its name and NIF; a contractor that looks like a natural person (its NIF, or none) is shown only as \"a natural person\", and the contract's object text is then left out. Our record, not an official one: each contract links its page on base.gov.pt.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "shape": {
           "type": "string"
          },
          "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"
            },
            "dataset": {
             "type": "string"
            },
            "terms_page": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "dataset",
            "terms_page",
            "how"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "contracts": {
             "type": "integer"
            },
            "places": {
             "type": "integer"
            },
            "by_place": {
             "type": "object",
             "properties": {
              "lisboa": {
               "type": "integer"
              },
              "albufeira": {
               "type": "integer"
              },
              "alcoutim": {
               "type": "integer"
              },
              "aljezur": {
               "type": "integer"
              },
              "castro-marim": {
               "type": "integer"
              },
              "faro": {
               "type": "integer"
              },
              "lagoa": {
               "type": "integer"
              },
              "lagos": {
               "type": "integer"
              },
              "loule": {
               "type": "integer"
              },
              "monchique": {
               "type": "integer"
              },
              "olhao": {
               "type": "integer"
              },
              "portimao": {
               "type": "integer"
              },
              "sao-bras-de-alportel": {
               "type": "integer"
              },
              "silves": {
               "type": "integer"
              },
              "tavira": {
               "type": "integer"
              },
              "vila-do-bispo": {
               "type": "integer"
              },
              "vila-real-de-santo-antonio": {
               "type": "integer"
              }
             },
             "required": [
              "lisboa",
              "albufeira",
              "alcoutim",
              "aljezur",
              "castro-marim",
              "faro",
              "lagoa",
              "lagos",
              "loule",
              "monchique",
              "olhao",
              "portimao",
              "sao-bras-de-alportel",
              "silves",
              "tavira",
              "vila-do-bispo",
              "vila-real-de-santo-antonio"
             ]
            },
            "records_scanned": {
             "type": "null"
            },
            "window_days": {
             "type": "integer"
            },
            "objects_withheld": {
             "type": "integer"
            }
           },
           "required": [
            "contracts",
            "places",
            "by_place",
            "records_scanned",
            "window_days",
            "objects_withheld"
           ]
          },
          "note": {
           "type": "string"
          },
          "dataset": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "dataset": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "files": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "year": {
                "type": "integer"
               },
               "file": {
                "type": "string"
               },
               "resource": {
                "type": "string"
               },
               "resource_modified": {
                "type": "string"
               },
               "bytes": {
                "type": "integer"
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "year",
               "file",
               "resource",
               "resource_modified",
               "bytes",
               "read_at"
              ]
             }
            }
           },
           "required": [
            "name",
            "dataset",
            "licence",
            "files"
           ]
          },
          "places": {
           "type": "object",
           "properties": {
            "faro": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "portimao": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "loule": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "object_withheld": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "silves": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "olhao": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "lagos": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "lisboa": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": [
                 "number",
                 "null"
                ]
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "vila-real-de-santo-antonio": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "object_withheld": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "albufeira": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "monchique": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "lagoa": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "castro-marim": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "aljezur": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "alcoutim": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "object_withheld": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "sao-bras-de-alportel": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "integer"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "tavira": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 },
                 "council": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            },
            "vila-do-bispo": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": "string"
               },
               "object_withheld": {
                "type": "null"
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind",
                  "nif",
                  "name",
                  "country"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            }
           },
           "required": [
            "faro",
            "portimao",
            "loule",
            "silves",
            "olhao",
            "lagos",
            "lisboa",
            "vila-real-de-santo-antonio",
            "albufeira",
            "monchique",
            "lagoa",
            "castro-marim",
            "aljezur",
            "alcoutim",
            "sao-bras-de-alportel",
            "tavira",
            "vila-do-bispo"
           ]
          }
         },
         "required": [
          "shape",
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "note",
          "dataset",
          "places"
         ],
         "x-inferred": true
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/base-gov-pt/places/index.json": {
   "get": {
    "operationId": "get_base_gov_pt_places_index",
    "tags": [
     "base-gov-pt"
    ],
    "summary": "Public contracts (Portal BASE): the places that have a file",
    "description": "Public contracts (Portal BASE): one file per place, each the same shape as latest.json with only that place.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "items": {
              "type": "integer"
             }
            },
            "required": [
             "id",
             "url",
             "items"
            ]
           }
          }
         },
         "required": [
          "about",
          "read_at",
          "places"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "Public contracts (Portal BASE): one file per place, each the same shape as latest.json with only that place.",
           "read_at": "2026-11-18T16:30:06Z",
           "places": [
            {
             "id": "albufeira",
             "url": "https://data.promptugal.news/api/v1/base-gov-pt/places/albufeira.json",
             "items": 92
            },
            {
             "id": "alcoutim",
             "url": "https://data.promptugal.news/api/v1/base-gov-pt/places/alcoutim.json",
             "items": 15
            },
            {
             "id": "aljezur",
             "url": "https://data.promptugal.news/api/v1/base-gov-pt/places/aljezur.json",
             "items": 36
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/base-gov-pt/places/{place}.json": {
   "get": {
    "operationId": "get_base_gov_pt_place",
    "tags": [
     "base-gov-pt"
    ],
    "summary": "Public contracts (Portal BASE): one place",
    "description": "The same shape as latest.json, with only this place in places.",
    "parameters": [
     {
      "name": "place",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "albufeira",
        "alcoutim",
        "aljezur",
        "castro-marim",
        "faro",
        "lagoa",
        "lagos",
        "lisboa",
        "loule",
        "monchique",
        "olhao",
        "portimao",
        "sao-bras-de-alportel",
        "silves",
        "tavira",
        "vila-do-bispo",
        "vila-real-de-santo-antonio"
       ]
      },
      "example": "albufeira"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "shape": {
           "type": "string"
          },
          "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"
            },
            "dataset": {
             "type": "string"
            },
            "terms_page": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "dataset",
            "terms_page",
            "how"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "contracts": {
             "type": "integer"
            },
            "places": {
             "type": "integer"
            },
            "by_place": {
             "type": "object",
             "properties": {
              "albufeira": {
               "type": "integer"
              }
             },
             "required": [
              "albufeira"
             ]
            },
            "records_scanned": {
             "type": "null"
            },
            "window_days": {
             "type": "integer"
            },
            "objects_withheld": {
             "type": "integer"
            }
           },
           "required": [
            "contracts",
            "places",
            "by_place",
            "records_scanned",
            "window_days",
            "objects_withheld"
           ]
          },
          "note": {
           "type": "string"
          },
          "dataset": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "dataset": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "files": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "year": {
                "type": "integer"
               },
               "file": {
                "type": "string"
               },
               "resource": {
                "type": "string"
               },
               "resource_modified": {
                "type": "string"
               },
               "bytes": {
                "type": "integer"
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "year",
               "file",
               "resource",
               "resource_modified",
               "bytes",
               "read_at"
              ]
             }
            }
           },
           "required": [
            "name",
            "dataset",
            "licence",
            "files"
           ]
          },
          "places": {
           "type": "object",
           "properties": {
            "albufeira": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "place": {
                "type": "string"
               },
               "object": {
                "type": [
                 "string",
                 "null"
                ]
               },
               "object_withheld": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "buyer_kind": {
                "type": "string"
               },
               "contracting_entity": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "nif": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "nif"
                ]
               },
               "contractors": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "kind": {
                   "type": "string"
                  },
                  "nif": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "country": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "kind"
                 ]
                }
               },
               "price_eur": {
                "type": "number"
               },
               "base_price_eur": {
                "type": "number"
               },
               "published": {
                "type": "string",
                "format": "date"
               },
               "signed": {
                "type": "string",
                "format": "date"
               },
               "decision": {
                "type": "string",
                "format": "date"
               },
               "procedure": {
                "type": "string"
               },
               "contract_types": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "license": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string",
                  "format": "uri"
                 },
                 "id": {
                  "type": "string"
                 },
                 "holder": {
                  "type": "string"
                 },
                 "note": {
                  "type": "string"
                 }
                },
                "required": [
                 "name",
                 "url",
                 "id",
                 "holder",
                 "note"
                ]
               },
               "read_at": {
                "type": "string"
               }
              },
              "required": [
               "id",
               "place",
               "object",
               "object_withheld",
               "buyer_kind",
               "contracting_entity",
               "contractors",
               "price_eur",
               "base_price_eur",
               "published",
               "signed",
               "decision",
               "procedure",
               "contract_types",
               "url",
               "license",
               "read_at"
              ]
             }
            }
           },
           "required": [
            "albufeira"
           ]
          }
         },
         "required": [
          "shape",
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "note",
          "dataset",
          "places"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "shape": "2",
           "source": "base-gov-pt",
           "title": "Public contracts (Portal BASE)",
           "read_at": "2026-11-18T16:30:06Z",
           "provenance": {
            "source": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
            "page": "https://www.base.gov.pt/",
            "read_at": "2026-11-18T16:30:06Z",
            "by": "sources/base-gov-pt/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IMPIC publishes these contracts as open data on dados.gov.pt with the licence \"Outra (Domínio Público)\" (other-pd, public domain); we name IMPIC and the Portal BASE as the source and link each contract's page.",
            "dataset": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
            "terms_page": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
            "how": "IMPIC's yearly file on dados.gov.pt (contratos2026.zip), stream-parsed in memory, the approach of PrompTugal__News__Civic tools/extract-base.mjs"
           },
           "about": "Public contracts published on the Portal BASE in the last 90 days (from 2026-08-20) where the contracting entity is the câmara municipal of Lisboa or of one of the Algarve's 16 municipalities (Quarteira is a parish of Loulé and has no câmara of its own). From IMPIC's open data, which is updated abou...",
           "counts": {
            "contracts": 92,
            "places": 1,
            "by_place": {
             "albufeira": 92
            },
            "records_scanned": null,
            "window_days": 90,
            "objects_withheld": 186
           },
           "note": "The dataset file had not changed since the last read, so it was not downloaded again; each contract keeps the time of the read that found it.",
           "dataset": {
            "name": "Contratos Públicos - Portal Base - IMPIC (open data on dados.gov.pt)",
            "dataset": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
            "licence": "other-pd",
            "files": [
             {
              "year": 2026,
              "file": "contratos2026.zip",
              "resource": "https://dados.gov.pt/s/resources/contratos-publicos-portal-base-impic-contratos-de-2012-a-2026/20261115-100642-624650f6/contratos2026.zip",
              "resource_modified": "2026-11-15T10:06:42.704000+00:00",
              "bytes": 69765818,
              "read_at": "2026-11-18T15:50:50Z"
             }
            ]
           },
           "places": {
            "albufeira": [
             {
              "id": "15927119",
              "place": "albufeira",
              "object": "Empreitada de construção de salas, instalações sanitárias e gabinetes em monobloco para a EBSA e EB 2,3 Francisco Cabrita, incluindo infraestruturas.",
              "object_withheld": null,
              "buyer_kind": "council",
              "contracting_entity": {
               "name": "Município de Albufeira",
               "nif": "503539473"
              },
              "contractors": [
               {
                "kind": "company",
                "nif": "514110686",
                "name": "RENATO ARANTES UNIPESSOAL",
                "country": "PRT"
               }
              ],
              "price_eur": 476791.45,
              "base_price_eur": 562613.91,
              "published": "2026-11-12",
              "signed": "2026-11-11",
              "decision": "2026-10-22",
              "procedure": "Concurso público",
              "contract_types": [
               "Empreitadas de obras públicas"
              ],
              "url": "https://www.base.gov.pt/Base4/pt/detalhe/?type=contratos&id=15927119",
              "license": {
               "name": "Outra (Domínio Público)",
               "url": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
               "id": "other-pd",
               "holder": "IMPIC, Instituto dos Mercados Públicos, do Imobiliário e da Construção",
               "note": "As dados.gov.pt publishes the dataset. Our record of it is CC BY 4.0."
              },
              "read_at": "2026-11-18T15:50:50Z"
             },
             {
              "id": "15919124",
              "place": "albufeira",
              "object": "Participação do Município de Albufeira no Travel Summit 2026 como parceiro nível Platina",
              "object_withheld": null,
              "buyer_kind": "council",
              "contracting_entity": {
               "name": "Município de Albufeira",
               "nif": "503539473"
              },
              "contractors": [
               {
                "kind": "company",
                "nif": "506529517",
                "name": "REPRESENTAÇÕES TURÍSTICAS GEA PORTUGAL LDA",
                "country": "PRT"
               }
              ],
              "price_eur": 24390.24,
              "base_price_eur": 24390.24,
              "published": "2026-11-10",
              "signed": "2026-11-10",
              "decision": "2026-11-05",
              "procedure": "Ajuste Direto Regime Geral",
              "contract_types": [
               "Aquisição de serviços"
              ],
              "url": "https://www.base.gov.pt/Base4/pt/detalhe/?type=contratos&id=15919124",
              "license": {
               "name": "Outra (Domínio Público)",
               "url": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
               "id": "other-pd",
               "holder": "IMPIC, Instituto dos Mercados Públicos, do Imobiliário e da Construção",
               "note": "As dados.gov.pt publishes the dataset. Our record of it is CC BY 4.0."
              },
              "read_at": "2026-11-18T15:50:50Z"
             },
             {
              "id": "15910248",
              "place": "albufeira",
              "object": "AQUISIÇÃO DE ESPETÁCULO DE ANO NOVO",
              "object_withheld": null,
              "buyer_kind": "council",
              "contracting_entity": {
               "name": "Município de Albufeira",
               "nif": "503539473"
              },
              "contractors": [
               {
                "kind": "company",
                "nif": "509921434",
                "name": "Impossible World – Worldwide Entertainment Productions S.A,",
                "country": "PRT"
               }
              ],
              "price_eur": 337000,
              "base_price_eur": 337000,
              "published": "2026-11-09",
              "signed": "2026-11-02",
              "decision": "2026-09-21",
              "procedure": "Ajuste Direto Regime Geral",
              "contract_types": [
               "Aquisição de serviços"
              ],
              "url": "https://www.base.gov.pt/Base4/pt/detalhe/?type=contratos&id=15910248",
              "license": {
               "name": "Outra (Domínio Público)",
               "url": "https://dados.gov.pt/pt/datasets/66d72d488ca4b7cb2de28712/",
               "id": "other-pd",
               "holder": "IMPIC, Instituto dos Mercados Públicos, do Imobiliário e da Construção",
               "note": "As dados.gov.pt publishes the dataset. Our record of it is CC BY 4.0."
              },
              "read_at": "2026-11-18T15:50:50Z"
             }
            ]
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/events-pt/latest.json": {
   "get": {
    "operationId": "get_events_pt_latest",
    "tags": [
     "events-pt"
    ],
    "summary": "Events in Portugal, by place: the latest read",
    "description": "Events on now or starting within 60 days (to 2027-01-17) in the places listed, as schema.org Event records, each with its source URL and the time read. Dates are as the source gives them (Lisbon time; a time is added only where a single start hour is shown); a long-running event shows its first and last day. organizer is null where the source does not name an organiser (the agenda's publisher is in source). A dated record read by code, not a ticketing or booking service: check the organiser before travelling.",
    "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"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "host": {
                "type": "string"
               },
               "what": {
                "type": "string"
               },
               "route": {
                "type": "string",
                "format": "uri"
               },
               "terms": {
                "type": "string"
               }
              },
              "required": [
               "host",
               "what",
               "route",
               "terms"
              ]
             }
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "sources"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "events": {
             "type": "integer"
            },
            "places": {
             "type": "integer"
            },
            "by_source": {
             "type": "object",
             "properties": {
              "www.agendalx.pt": {
               "type": "integer"
              },
              "www.cm-lagos.pt": {
               "type": "integer"
              },
              "teatrodasfiguras.pt": {
               "type": "integer"
              },
              "cm-tavira.pt": {
               "type": "integer"
              }
             },
             "required": [
              "www.agendalx.pt",
              "www.cm-lagos.pt",
              "teatrodasfiguras.pt",
              "cm-tavira.pt"
             ]
            },
            "dropped_duplicates_or_unknown_place": {
             "type": "integer"
            }
           },
           "required": [
            "events",
            "places",
            "by_source",
            "dropped_duplicates_or_unknown_place"
           ]
          },
          "places": {
           "type": "object",
           "properties": {
            "lagos": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "@type": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "startDate": {
                "type": "string"
               },
               "endDate": {
                "type": [
                 "string",
                 "null"
                ],
                "format": "date"
               },
               "location": {
                "type": "object",
                "properties": {
                 "@type": {
                  "type": "string"
                 },
                 "name": {
                  "type": "string"
                 },
                 "address": {
                  "type": "null"
                 },
                 "geo": {
                  "type": "null"
                 }
                },
                "required": [
                 "@type",
                 "name",
                 "address",
                 "geo"
                ]
               },
               "organizer": {
                "type": "null"
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "source": {
                "type": "string",
                "format": "uri"
               },
               "read_at": {
                "type": "string"
               },
               "place": {
                "type": "string"
               }
              },
              "required": [
               "@type",
               "name",
               "startDate",
               "endDate",
               "location",
               "organizer",
               "url",
               "source",
               "read_at",
               "place"
              ]
             }
            },
            "faro": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "@type": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "startDate": {
                "type": "string",
                "format": "date"
               },
               "endDate": {
                "type": [
                 "null",
                 "string"
                ]
               },
               "location": {
                "type": "object",
                "properties": {
                 "@type": {
                  "type": "string"
                 },
                 "name": {
                  "type": "string"
                 },
                 "address": {
                  "type": "null"
                 },
                 "geo": {
                  "type": "null"
                 }
                },
                "required": [
                 "@type",
                 "name",
                 "address",
                 "geo"
                ]
               },
               "organizer": {
                "type": "null"
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "source": {
                "type": "string",
                "format": "uri"
               },
               "read_at": {
                "type": "string"
               },
               "place": {
                "type": "string"
               }
              },
              "required": [
               "@type",
               "name",
               "startDate",
               "endDate",
               "location",
               "organizer",
               "url",
               "source",
               "read_at",
               "place"
              ]
             }
            },
            "tavira": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "@type": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "startDate": {
                "type": "string"
               },
               "endDate": {
                "type": "null"
               },
               "location": {
                "type": "object",
                "properties": {
                 "@type": {
                  "type": "string"
                 },
                 "name": {
                  "type": "string"
                 },
                 "address": {
                  "type": "null"
                 },
                 "geo": {
                  "type": "null"
                 }
                },
                "required": [
                 "@type",
                 "name",
                 "address",
                 "geo"
                ]
               },
               "organizer": {
                "type": "null"
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "source": {
                "type": "string",
                "format": "uri"
               },
               "read_at": {
                "type": "string"
               },
               "place": {
                "type": "string"
               }
              },
              "required": [
               "@type",
               "name",
               "startDate",
               "endDate",
               "location",
               "organizer",
               "url",
               "source",
               "read_at",
               "place"
              ]
             }
            }
           },
           "required": [
            "lagos",
            "faro",
            "tavira"
           ]
          },
          "gaps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "host": {
              "type": "string"
             },
             "why": {
              "type": "string"
             },
             "read_at": {
              "type": "string"
             }
            },
            "required": [
             "host",
             "why",
             "read_at"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "places",
          "gaps"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "events-pt",
           "title": "Events in Portugal, by place",
           "read_at": "2026-11-18T16:30:08Z",
           "provenance": {
            "source": "https://www.agendalx.pt/wp-json/agendalx/v1/events?per_page=50",
            "page": "https://www.agendalx.pt/",
            "read_at": "2026-11-18T16:30:08Z",
            "by": "sources/events-pt/collect.mjs (code, no model; run by data.b@PrompTugal.dinis)",
            "terms": "Strictest of the sources: no reuse licence or terms page was found for any of the four hosts (teatrodasfiguras.pt and cm-tavira.pt show only \"Todos os direitos reservados\" in their footers, and cm-tavira.pt has no robots.txt). The robots.txt files that exist allow the paths read; agendalx.pt sets Co...",
            "sources": [
             {
              "host": "www.agendalx.pt",
              "what": "Agenda Cultural de Lisboa (Câmara Municipal de Lisboa)",
              "route": "https://www.agendalx.pt/wp-json/agendalx/v1/events?per_page=50",
              "terms": "No terms page found. robots.txt (read 18 Nov 2026) allows all paths and sets \"Content-Signal: search=yes,ai-train=no,use=reference\": reference use with the source named and linked; no AI training."
             },
             {
              "host": "www.cm-lagos.pt",
              "what": "Câmara Municipal de Lagos, events list",
              "route": "https://www.cm-lagos.pt/municipio/eventos",
              "terms": "No terms page found. robots.txt (read 18 Nov 2026) disallows only administrative folders, not /municipio/eventos."
             },
             {
              "host": "teatrodasfiguras.pt",
              "what": "Teatro das Figuras, Faro (municipal theatre), agenda page",
              "route": "https://teatrodasfiguras.pt/agenda",
              "terms": "No terms of use page found (its information pages are directions, opening hours, privacy and cookies only). robots.txt (read 18 Nov 2026) allows all but /private/. The footer says \"Todos os direitos reservados\". Titles, dates and links only; each event links to its page."
             }
            ]
           },
           "about": "Events on now or starting within 60 days (to 2027-01-17) in the places listed, as schema.org Event records, each with its source URL and the time read. Dates are as the source gives them (Lisbon time; a time is added only where a single start hour is shown); a long-running event shows its first and ...",
           "counts": {
            "events": 141,
            "places": 3,
            "by_source": {
             "www.agendalx.pt": 0,
             "www.cm-lagos.pt": 92,
             "teatrodasfiguras.pt": 10,
             "cm-tavira.pt": 39
            },
            "dropped_duplicates_or_unknown_place": 0
           },
           "places": {
            "lagos": [
             {
              "@type": "Event",
              "name": "EXPOSIÇÃO “O CRUZEIRO”, de Timo Dillner",
              "startDate": "2026-10-03",
              "endDate": "2026-12-30",
              "location": {
               "@type": "Place",
               "name": "Centro Cultural de Lagos – Sala de Exposições 1",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://www.cm-lagos.pt/municipio/eventos/16100-exposição-“o-cruzeiro”,-de-timo-dillner",
              "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
              "read_at": "2026-11-18T16:30:17Z",
              "place": "lagos"
             },
             {
              "@type": "Event",
              "name": "CLUBE DA CIÊNCIA",
              "startDate": "2026-10-07",
              "endDate": "2026-12-05",
              "location": {
               "@type": "Place",
               "name": "Centro Ciência Viva de Lagos",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://www.cm-lagos.pt/municipio/eventos/16162-clube-da-ciência_16162",
              "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
              "read_at": "2026-11-18T16:30:17Z",
              "place": "lagos"
             },
             {
              "@type": "Event",
              "name": "WORKSHOPS NO ESPAÇO JOVEM – ESCULTURA EM PLÁSTICO",
              "startDate": "2026-10-31",
              "endDate": "2026-11-22",
              "location": {
               "@type": "Place",
               "name": "Espaço Jovem do Município de Lagos – Ateliê de Expressão Plástica (salas 403 e 405)",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://www.cm-lagos.pt/municipio/eventos/16149-workshops-no-espaço-jovem-–-escultura-em-plástico",
              "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
              "read_at": "2026-11-18T16:30:17Z",
              "place": "lagos"
             }
            ],
            "faro": [
             {
              "@type": "Event",
              "name": "O Mundo Inteiro à Espera",
              "startDate": "2026-11-21",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Teatro das Figuras",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://teatrodasfiguras.pt/agenda/o-mund-inteiro-a-espera",
              "source": "https://teatrodasfiguras.pt/agenda (Teatro das Figuras, Faro, agenda page)",
              "read_at": "2026-11-18T16:30:22Z",
              "place": "faro"
             },
             {
              "@type": "Event",
              "name": "O Principezinho | Um musical para plateia e marionetas",
              "startDate": "2026-11-25",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Teatro das Figuras",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://teatrodasfiguras.pt/agenda/o-principezinho",
              "source": "https://teatrodasfiguras.pt/agenda (Teatro das Figuras, Faro, agenda page)",
              "read_at": "2026-11-18T16:30:22Z",
              "place": "faro"
             },
             {
              "@type": "Event",
              "name": "Picota (Este lugar também me pertence)",
              "startDate": "2026-11-26",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Teatro das Figuras",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://teatrodasfiguras.pt/agenda/picota-este-lugar-tambem-me-pertence",
              "source": "https://teatrodasfiguras.pt/agenda (Teatro das Figuras, Faro, agenda page)",
              "read_at": "2026-11-18T16:30:22Z",
              "place": "faro"
             }
            ],
            "tavira": [
             {
              "@type": "Event",
              "name": "Dansanté no Teatro | Aula de dança para a saúde e bem estar dos séniores",
              "startDate": "2026-11-18T10:30",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Teatro Municipal António Pinheiro Tavira",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://cm-tavira.pt/site/evento/dansante-no-teatro-aula-de-danca-para-a-saude-e-bem-estar-dos-seniores/2026-11-18/",
              "source": "https://cm-tavira.pt/site/evento/ (Camara Municipal de Tavira, Events Calendar route /site/wp-json/tribe/events/v1/events)",
              "read_at": "2026-11-18T16:30:27Z",
              "place": "tavira"
             },
             {
              "@type": "Event",
              "name": "Festival Internacional de Órgão do Algarve 2026 | Visita ao novo órgão, pelo organeiro Dinarte Machado",
              "startDate": "2026-11-20T17:00",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Igreja do Carmo",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://cm-tavira.pt/site/evento/festival-internacional-de-orgao-do-algarve-2026-visita-ao-novo-orgao-pelo-organeiro-dinarte-machado/",
              "source": "https://cm-tavira.pt/site/evento/ (Camara Municipal de Tavira, Events Calendar route /site/wp-json/tribe/events/v1/events)",
              "read_at": "2026-11-18T16:30:27Z",
              "place": "tavira"
             },
             {
              "@type": "Event",
              "name": "Encontro com Autores | Apresentação do livro “Comer a Natureza” de Paulo Moreira",
              "startDate": "2026-11-20T18:00",
              "endDate": null,
              "location": {
               "@type": "Place",
               "name": "Biblioteca Municipal Álvaro de Campos",
               "address": null,
               "geo": null
              },
              "organizer": null,
              "url": "https://cm-tavira.pt/site/evento/encontro-com-autores-apresentacao-do-livro-comer-a-natureza-de-paulo-moreira/",
              "source": "https://cm-tavira.pt/site/evento/ (Camara Municipal de Tavira, Events Calendar route /site/wp-json/tribe/events/v1/events)",
              "read_at": "2026-11-18T16:30:27Z",
              "place": "tavira"
             }
            ]
           },
           "gaps": [
            {
             "host": "dados.cm-lisboa.pt",
             "why": "Cloudflare bot check (\"Just a moment...\") on the open data API; its robots.txt also sets Content-Signal ai-train=no, use=reference. Respected, not worked around.",
             "read_at": "2026-11-18T14:00:00Z"
            },
            {
             "host": "www.lisboa.pt",
             "why": "HTTP 403 on its legal and terms pages (aviso-legal, termos-e-condicoes). Respected.",
             "read_at": "2026-11-18T14:00:00Z"
            },
            {
             "host": "visitalgarve.pt, eventos.visitalgarve.pt",
             "why": "eventos.visitalgarve.pt robots.txt allows all (read 18 Nov 2026), but the agenda is an empty JavaScript page (a React app, no server-rendered list, no feed or sitemap found) over a private POST API (api.visitalgarve.pt/website/Travelplanner/Search/Events) whose robots.txt was unreachable and whose t...",
             "read_at": "2026-11-18T18:00:00Z"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-city-forecasts/latest.json": {
   "get": {
    "operationId": "get_ipma_city_forecasts_latest",
    "tags": [
     "ipma-city-forecasts"
    ],
    "summary": "IPMA daily forecasts by place: the latest read",
    "description": "IPMA's daily forecast for each place, five days, each place with its own source address and time read. weather_type is IPMA's code (https://api.ipma.pt/open-data/weather-type-classe.json); wind_class and rain_class are IPMA's classes.",
    "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"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "string",
              "format": "uri"
             }
            },
            "source_pattern": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "sources",
            "source_pattern"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "places": {
             "type": "integer"
            },
            "read": {
             "type": "integer"
            }
           },
           "required": [
            "places",
            "read"
           ]
          },
          "cities": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "name": {
              "type": "string"
             },
             "area": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "source": {
              "type": "string",
              "format": "uri"
             },
             "read_at": {
              "type": "string"
             },
             "updated": {
              "type": "string"
             },
             "days": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "date": {
                 "type": "string",
                 "format": "date"
                },
                "t_min_c": {
                 "type": "number"
                },
                "t_max_c": {
                 "type": "number"
                },
                "rain_prob_pct": {
                 "type": "integer"
                },
                "weather_type": {
                 "type": "integer"
                },
                "wind_dir": {
                 "type": "string"
                },
                "wind_class": {
                 "type": "integer"
                },
                "rain_class": {
                 "type": [
                  "integer",
                  "null"
                 ]
                }
               },
               "required": [
                "date",
                "t_min_c",
                "t_max_c",
                "rain_prob_pct",
                "weather_type",
                "wind_dir",
                "wind_class",
                "rain_class"
               ]
              }
             }
            },
            "required": [
             "id",
             "name",
             "area",
             "lat",
             "lon",
             "source",
             "read_at",
             "updated",
             "days"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "cities"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-city-forecasts",
           "title": "IPMA daily forecasts by place",
           "read_at": "2026-11-18T16:30:33Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1010500.json",
            "page": "https://www.ipma.pt/en/otempo/prev.localidade.hora/",
            "read_at": "2026-11-18T16:30:33Z",
            "by": "sources/ipma-city-forecasts/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.",
            "sources": [
             "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1010500.json",
             "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1020500.json",
             "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1030300.json"
            ],
            "source_pattern": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/{globalIdLocal}.json"
           },
           "about": "IPMA's daily forecast for each place, five days, each place with its own source address and time read. weather_type is IPMA's code (https://api.ipma.pt/open-data/weather-type-classe.json); wind_class and rain_class are IPMA's classes.",
           "counts": {
            "places": 35,
            "read": 35
           },
           "cities": [
            {
             "id": 1010500,
             "name": "Aveiro",
             "area": "AVR",
             "lat": 40.6413,
             "lon": -8.6535,
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1010500.json",
             "read_at": "2026-11-18T16:30:36Z",
             "updated": "2026-11-18T15:31:02",
             "days": [
              {
               "date": "2026-11-18",
               "t_min_c": 16.3,
               "t_max_c": 19.8,
               "rain_prob_pct": 100,
               "weather_type": 9,
               "wind_dir": "W",
               "wind_class": 2,
               "rain_class": 2
              },
              {
               "date": "2026-11-19",
               "t_min_c": 14.3,
               "t_max_c": 19.4,
               "rain_prob_pct": 100,
               "weather_type": 7,
               "wind_dir": "W",
               "wind_class": 2,
               "rain_class": 1
              },
              {
               "date": "2026-11-20",
               "t_min_c": 13.5,
               "t_max_c": 18.1,
               "rain_prob_pct": 100,
               "weather_type": 9,
               "wind_dir": "SE",
               "wind_class": 1,
               "rain_class": 2
              }
             ]
            },
            {
             "id": 1020500,
             "name": "Beja",
             "area": "BJA",
             "lat": 38.02,
             "lon": -7.87,
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1020500.json",
             "read_at": "2026-11-18T16:30:38Z",
             "updated": "2026-11-18T15:31:02",
             "days": [
              {
               "date": "2026-11-18",
               "t_min_c": 15.2,
               "t_max_c": 22.1,
               "rain_prob_pct": 100,
               "weather_type": 10,
               "wind_dir": "SW",
               "wind_class": 2,
               "rain_class": 1
              },
              {
               "date": "2026-11-19",
               "t_min_c": 11,
               "t_max_c": 18.5,
               "rain_prob_pct": 0,
               "weather_type": 2,
               "wind_dir": "W",
               "wind_class": 2,
               "rain_class": null
              },
              {
               "date": "2026-11-20",
               "t_min_c": 10,
               "t_max_c": 17.9,
               "rain_prob_pct": 2,
               "weather_type": 3,
               "wind_dir": "SE",
               "wind_class": 1,
               "rain_class": null
              }
             ]
            },
            {
             "id": 1030300,
             "name": "Braga",
             "area": "BRG",
             "lat": 41.5475,
             "lon": -8.4227,
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1030300.json",
             "read_at": "2026-11-18T16:30:41Z",
             "updated": "2026-11-18T15:31:02",
             "days": [
              {
               "date": "2026-11-18",
               "t_min_c": 11.8,
               "t_max_c": 18.5,
               "rain_prob_pct": 100,
               "weather_type": 9,
               "wind_dir": "SW",
               "wind_class": 2,
               "rain_class": 2
              },
              {
               "date": "2026-11-19",
               "t_min_c": 9.9,
               "t_max_c": 16.3,
               "rain_prob_pct": 100,
               "weather_type": 7,
               "wind_dir": "SW",
               "wind_class": 1,
               "rain_class": 1
              },
              {
               "date": "2026-11-20",
               "t_min_c": 12,
               "t_max_c": 15,
               "rain_prob_pct": 100,
               "weather_type": 9,
               "wind_dir": "S",
               "wind_class": 1,
               "rain_class": 2
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-city-forecasts/raw/{file}": {
   "get": {
    "operationId": "get_ipma_city_forecasts_raw",
    "tags": [
     "ipma-city-forecasts"
    ],
    "summary": "IPMA daily forecasts by place: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "city-1010500.json",
        "city-1020500.json",
        "city-1030300.json",
        "city-1030800.json",
        "city-1040200.json",
        "city-1050200.json",
        "city-1060300.json",
        "city-1070500.json",
        "city-1080500.json",
        "city-1080800.json",
        "city-1081100.json",
        "city-1081505.json",
        "city-1090700.json",
        "city-1090821.json",
        "city-1100900.json",
        "city-1110600.json",
        "city-1121400.json",
        "city-1131200.json",
        "city-1141600.json",
        "city-1151200.json",
        "city-1151300.json",
        "city-1160900.json",
        "city-1171400.json",
        "city-1182300.json",
        "city-2310300.json",
        "city-2320100.json",
        "city-3410100.json",
        "city-3420300.json",
        "city-3430100.json",
        "city-3440100.json",
        "city-3450200.json",
        "city-3460200.json",
        "city-3470100.json",
        "city-3480200.json",
        "city-3490100.json",
        "distrits-islands.json"
       ]
      },
      "example": "city-1010500.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "owner": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "precipitaProb": {
              "type": "string"
             },
             "tMin": {
              "type": "string"
             },
             "tMax": {
              "type": "string"
             },
             "predWindDir": {
              "type": "string"
             },
             "idWeatherType": {
              "type": "integer"
             },
             "classWindSpeed": {
              "type": "integer"
             },
             "longitude": {
              "type": "string"
             },
             "forecastDate": {
              "type": "string",
              "format": "date"
             },
             "classPrecInt": {
              "type": "integer"
             },
             "latitude": {
              "type": "string"
             },
             "idRegiao": {
              "type": "integer"
             },
             "idAreaAviso": {
              "type": "string"
             },
             "idConcelho": {
              "type": "integer"
             },
             "globalIdLocal": {
              "type": "integer"
             },
             "idDistrito": {
              "type": "integer"
             },
             "local": {
              "type": "string"
             }
            },
            "required": [
             "longitude",
             "latitude"
            ]
           }
          },
          "globalIdLocal": {
           "type": "integer"
          },
          "dataUpdate": {
           "type": "string"
          }
         },
         "required": [
          "owner",
          "country",
          "data"
         ],
         "x-inferred": true
        },
        "examples": {
         "city-1010500.json": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "owner": "IPMA",
           "country": "PT",
           "data": [
            {
             "precipitaProb": "100.0",
             "tMin": "16.3",
             "tMax": "19.8",
             "predWindDir": "W",
             "idWeatherType": 9,
             "classWindSpeed": 2,
             "longitude": "-8.6535",
             "forecastDate": "2026-11-18",
             "classPrecInt": 2,
             "latitude": "40.6413"
            },
            {
             "precipitaProb": "100.0",
             "tMin": "14.3",
             "tMax": "19.4",
             "predWindDir": "W",
             "idWeatherType": 7,
             "classWindSpeed": 2,
             "longitude": "-8.6535",
             "forecastDate": "2026-11-19",
             "classPrecInt": 1,
             "latitude": "40.6413"
            },
            {
             "precipitaProb": "100.0",
             "tMin": "13.5",
             "tMax": "18.1",
             "predWindDir": "SE",
             "idWeatherType": 9,
             "classWindSpeed": 1,
             "longitude": "-8.6535",
             "forecastDate": "2026-11-20",
             "classPrecInt": 2,
             "latitude": "40.6413"
            }
           ],
           "globalIdLocal": 1010500,
           "dataUpdate": "2026-11-18T15:31:02"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-fire-risk/latest.json": {
   "get": {
    "operationId": "get_ipma_fire_risk_latest",
    "tags": [
     "ipma-fire-risk"
    ],
    "summary": "IPMA fire risk: the latest read",
    "description": "IPMA's daily fire risk class (RCM, 1 low to 5 maximum) for each municipality by its DICO code (district and municipality), for today and the next two days.",
    "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"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "string",
              "format": "uri"
             }
            },
            "source_pattern": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "sources",
            "source_pattern"
           ]
          },
          "about": {
           "type": "string"
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "d": {
              "type": "integer"
             },
             "date": {
              "type": "string",
              "format": "date"
             },
             "run": {
              "type": "string",
              "format": "date"
             },
             "file_date": {
              "type": "string"
             },
             "source": {
              "type": "string",
              "format": "uri"
             }
            },
            "required": [
             "d",
             "date",
             "run",
             "file_date",
             "source"
            ]
           }
          },
          "counts": {
           "type": "object",
           "properties": {
            "municipalities": {
             "type": "integer"
            },
            "today_by_level": {
             "type": "object",
             "properties": {
              "low": {
               "type": "integer"
              }
             },
             "required": [
              "low"
             ]
            }
           },
           "required": [
            "municipalities",
            "today_by_level"
           ]
          },
          "municipalities": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "dico": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "days": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "date": {
                 "type": "string",
                 "format": "date"
                },
                "rcm": {
                 "type": "integer"
                },
                "level": {
                 "type": "string"
                }
               },
               "required": [
                "date",
                "rcm",
                "level"
               ]
              }
             }
            },
            "required": [
             "dico",
             "lat",
             "lon",
             "days"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "files",
          "counts",
          "municipalities"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-fire-risk",
           "title": "IPMA fire risk",
           "read_at": "2026-11-18T16:32:01Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d0.json",
            "page": "https://www.ipma.pt/en/riscoincendio/rcm.pt/",
            "read_at": "2026-11-18T16:32:01Z",
            "by": "sources/ipma-fire-risk/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source.",
            "sources": [
             "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d0.json",
             "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d1.json",
             "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d2.json"
            ],
            "source_pattern": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d{0,1,2}.json"
           },
           "about": "IPMA's daily fire risk class (RCM, 1 low to 5 maximum) for each municipality by its DICO code (district and municipality), for today and the next two days.",
           "files": [
            {
             "d": 0,
             "date": "2026-11-18",
             "run": "2026-11-17",
             "file_date": "2026-11-18 09:35:01",
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d0.json"
            },
            {
             "d": 1,
             "date": "2026-11-19",
             "run": "2026-11-17",
             "file_date": "2026-11-18 09:35:02",
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d1.json"
            },
            {
             "d": 2,
             "date": "2026-11-20",
             "run": "2026-11-17",
             "file_date": "2026-11-18 09:35:03",
             "source": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d2.json"
            }
           ],
           "counts": {
            "municipalities": 278,
            "today_by_level": {
             "low": 278
            }
           },
           "municipalities": [
            {
             "dico": "0101",
             "lat": 40.58,
             "lon": -8.44,
             "days": [
              {
               "date": "2026-11-18",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-19",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-20",
               "rcm": 1,
               "level": "low"
              }
             ]
            },
            {
             "dico": "0102",
             "lat": 40.6909,
             "lon": -8.4784,
             "days": [
              {
               "date": "2026-11-18",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-19",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-20",
               "rcm": 1,
               "level": "low"
              }
             ]
            },
            {
             "dico": "0103",
             "lat": 40.44,
             "lon": -8.44,
             "days": [
              {
               "date": "2026-11-18",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-19",
               "rcm": 1,
               "level": "low"
              },
              {
               "date": "2026-11-20",
               "rcm": 1,
               "level": "low"
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-fire-risk/raw/{file}": {
   "get": {
    "operationId": "get_ipma_fire_risk_raw",
    "tags": [
     "ipma-fire-risk"
    ],
    "summary": "IPMA fire risk: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "rcm-d0.json",
        "rcm-d1.json",
        "rcm-d2.json"
       ]
      },
      "example": "rcm-d0.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "dataPrev": {
           "type": "string",
           "format": "date"
          },
          "dataRun": {
           "type": "string",
           "format": "date"
          },
          "fileDate": {
           "type": "string"
          },
          "local": {
           "type": "object",
           "additionalProperties": true
          }
         },
         "required": [
          "dataPrev",
          "dataRun",
          "fileDate",
          "local"
         ],
         "x-inferred": true
        },
        "examples": {
         "rcm-d0.json": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "dataPrev": "2026-11-18",
           "dataRun": "2026-11-17",
           "fileDate": "2026-11-18 09:35:01",
           "local": {
            "1001": {
             "data": {
              "rcm": 1
             },
             "dico": "1001",
             "latitude": 39.55,
             "longitude": -8.97
            },
            "1002": {
             "data": {
              "rcm": 1
             },
             "dico": "1002",
             "latitude": 39.8222,
             "longitude": -8.3814
            },
            "1003": {
             "data": {
              "rcm": 1
             },
             "dico": "1003",
             "latitude": 39.9131,
             "longitude": -8.4378
            },
            "1004": {
             "data": {
              "rcm": 1
             },
             "dico": "1004",
             "latitude": 39.6605,
             "longitude": -8.8228
            },
            "1005": {
             "data": {
              "rcm": 1
             },
             "dico": "1005",
             "latitude": 39.27,
             "longitude": -9.16
            },
            "1006": {
             "data": {
              "rcm": 1
             },
             "dico": "1006",
             "latitude": 39.4067,
             "longitude": -9.1405
            },
            "1007": {
             "data": {
              "rcm": 1
             },
             "dico": "1007",
             "latitude": 40.01,
             "longitude": -8.21
            },
            "1008": {
             "data": {
              "rcm": 1
             },
             "dico": "1008",
             "latitude": 39.9,
             "longitude": -8.27
            },
            "1009": {
             "data": {
              "rcm": 1
             },
             "dico": "1009",
             "latitude": 39.7473,
             "longitude": -8.8069
            },
            "1010": {
             "data": {
              "rcm": 1
             },
             "dico": "1010",
             "latitude": 39.75,
             "longitude": -8.93
            },
            "1011": {
             "data": {
              "rcm": 1
             },
             "dico": "1011",
             "latitude": 39.6,
             "longitude": -9.07
            },
            "1012": {
             "data": {
              "rcm": 1
             },
             "dico": "1012",
             "latitude": 39.36,
             "longitude": -9.16
            },
            "1013": {
             "data": {
              "rcm": 1
             },
             "dico": "1013",
             "latitude": 39.92,
             "longitude": -8.15
            },
            "1014": {
             "data": {
              "rcm": 1
             },
             "dico": "1014",
             "latitude": 39.3617,
             "longitude": -9.3893
            },
            "1015": {
             "data": {
              "rcm": 1
             },
             "dico": "1015",
             "latitude": 39.92,
             "longitude": -8.63
            },
            "1016": {
             "data": {
              "rcm": 1
             },
             "dico": "1016",
             "latitude": 39.6001,
             "longitude": -8.8169
            },
            "1101": {
             "data": {
              "rcm": 1
             },
             "dico": "1101",
             "latitude": 39.0537,
             "longitude": -9.0095
            },
            "1102": {
             "data": {
              "rcm": 1
             },
             "dico": "1102",
             "latitude": 38.9834,
             "longitude": -9.0777
            },
            "1103": {
             "data": {
              "rcm": 1
             },
             "dico": "1103",
             "latitude": 39.0697,
             "longitude": -8.8695
            },
            "1104": {
             "data": {
              "rcm": 1
             },
             "dico": "1104",
             "latitude": 39.25,
             "longitude": -9.1
            },
            "1105": {
             "data": {
              "rcm": 1
             },
             "dico": "1105",
             "latitude": 38.6995,
             "longitude": -9.4296
            },
            "1106": {
             "data": {
              "rcm": 1
             },
             "dico": "1106",
             "latitude": 38.766,
             "longitude": -9.1286
            },
            "1107": {
             "data": {
              "rcm": 1
             },
             "dico": "1107",
             "latitude": 38.83,
             "longitude": -9.17
            },
            "1108": {
             "data": {
              "rcm": 1
             },
             "dico": "1108",
             "latitude": 39.2426,
             "longitude": -9.3126
            },
            "1109": {
             "data": {
              "rcm": 1
             },
             "dico": "1109",
             "latitude": 38.94,
             "longitude": -9.33
            },
            "1110": {
             "data": {
              "rcm": 1
             },
             "dico": "1110",
             "latitude": 38.7005,
             "longitude": -9.3059
            },
            "1111": {
             "data": {
              "rcm": 1
             },
             "dico": "1111",
             "latitude": 38.7973,
             "longitude": -9.3904
            },
            "1112": {
             "data": {
              "rcm": 1
             },
             "dico": "1112",
             "latitude": 39.02,
             "longitude": -9.15
            },
            "1113": {
             "data": {
              "rcm": 1
             },
             "dico": "1113",
             "latitude": 39.095,
             "longitude": -9.261
            },
            "1114": {
             "data": {
              "rcm": 1
             },
             "dico": "1114",
             "latitude": 38.9541,
             "longitude": -8.9899
            },
            "1115": {
             "data": {
              "rcm": 1
             },
             "dico": "1115",
             "latitude": 38.7566,
             "longitude": -9.2267
            },
            "1116": {
             "data": {
              "rcm": 1
             },
             "dico": "1116",
             "latitude": 38.79,
             "longitude": -9.19
            },
            "1201": {
             "data": {
              "rcm": 1
             },
             "dico": "1201",
             "latitude": 39.2,
             "longitude": -7.66
            },
            "1202": {
             "data": {
              "rcm": 1
             },
             "dico": "1202",
             "latitude": 39.13,
             "longitude": -7.29
            },
            "1203": {
             "data": {
              "rcm": 1
             },
             "dico": "1203",
             "latitude": 39.11,
             "longitude": -7.88
            },
            "1204": {
             "data": {
              "rcm": 1
             },
             "dico": "1204",
             "latitude": 39.01,
             "longitude": -7.07
            },
            "1205": {
             "data": {
              "rcm": 1
             },
             "dico": "1205",
             "latitude": 39.4151,
             "longitude": -7.4552
            },
            "1206": {
             "data": {
              "rcm": 1
             },
             "dico": "1206",
             "latitude": 39.29,
             "longitude": -7.64
            },
            "1207": {
             "data": {
              "rcm": 1
             },
             "dico": "1207",
             "latitude": 38.8788,
             "longitude": -7.1662
            },
            "1208": {
             "data": {
              "rcm": 1
             },
             "dico": "1208",
             "latitude": 39.06,
             "longitude": -7.65
            },
            "1209": {
             "data": {
              "rcm": 1
             },
             "dico": "1209",
             "latitude": 39.4651,
             "longitude": -7.936
            },
            "...": "238 more keys"
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-observations/latest.json": {
   "get": {
    "operationId": "get_ipma_observations_latest",
    "tags": [
     "ipma-observations"
    ],
    "summary": "IPMA station observations: the latest read",
    "description": "The latest hour IPMA published for each of its surface stations. Missing values (IPMA writes -99) are null; a station that sent nothing that hour has reading null. The hour is UTC.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "hour_utc": {
           "type": "string"
          },
          "hours_in_feed": {
           "type": "integer"
          },
          "counts": {
           "type": "object",
           "properties": {
            "stations": {
             "type": "integer"
            },
            "reporting": {
             "type": "integer"
            }
           },
           "required": [
            "stations",
            "reporting"
           ]
          },
          "stations": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "name": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "reading": {
              "type": [
               "object",
               "null"
              ],
              "properties": {
               "temp_c": {
                "type": [
                 "number",
                 "null"
                ]
               },
               "humidity_pct": {
                "type": [
                 "integer",
                 "null"
                ]
               },
               "wind_kmh": {
                "type": "number"
               },
               "wind_dir_id": {
                "type": "integer"
               },
               "rain_mm": {
                "type": [
                 "null",
                 "number"
                ]
               },
               "pressure_hpa": {
                "type": [
                 "number",
                 "null"
                ]
               },
               "radiation_kj_m2": {
                "type": [
                 "number",
                 "null"
                ]
               }
              },
              "required": [
               "temp_c",
               "humidity_pct",
               "wind_kmh",
               "wind_dir_id",
               "rain_mm",
               "pressure_hpa",
               "radiation_kj_m2"
              ]
             }
            },
            "required": [
             "id",
             "name",
             "lat",
             "lon",
             "reading"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "hour_utc",
          "hours_in_feed",
          "counts",
          "stations"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-observations",
           "title": "IPMA station observations",
           "read_at": "2026-11-18T16:32:08Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/observation/meteorology/stations/observations.json",
            "page": "https://www.ipma.pt/en/otempo/obs.superficie/",
            "read_at": "2026-11-18T16:32:08Z",
            "by": "sources/ipma-observations/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source."
           },
           "about": "The latest hour IPMA published for each of its surface stations. Missing values (IPMA writes -99) are null; a station that sent nothing that hour has reading null. The hour is UTC.",
           "hour_utc": "2026-11-18T15:00:00Z",
           "hours_in_feed": 24,
           "counts": {
            "stations": 227,
            "reporting": 168
           },
           "stations": [
            {
             "id": 1200501,
             "name": "Flores (Aeródromo)",
             "lat": 39.45819,
             "lon": -31.1301,
             "reading": {
              "temp_c": 16.9,
              "humidity_pct": 54,
              "wind_kmh": 12.2,
              "wind_dir_id": 7,
              "rain_mm": 0,
              "pressure_hpa": 1021.5,
              "radiation_kj_m2": 544.1
             }
            },
            {
             "id": 1200502,
             "name": "Corvo (Aeródromo)",
             "lat": 39.67389,
             "lon": -31.11362,
             "reading": {
              "temp_c": 16.9,
              "humidity_pct": 56,
              "wind_kmh": 32.8,
              "wind_dir_id": 8,
              "rain_mm": 0,
              "pressure_hpa": 1020.9,
              "radiation_kj_m2": 1448.9
             }
            },
            {
             "id": 1200504,
             "name": "Pico (Aeródromo)",
             "lat": 38.55219,
             "lon": -28.44137,
             "reading": {
              "temp_c": 17.3,
              "humidity_pct": 51,
              "wind_kmh": 11.5,
              "wind_dir_id": 8,
              "rain_mm": 0,
              "pressure_hpa": 1021.5,
              "radiation_kj_m2": 1581.5
             }
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-observations/raw/{file}": {
   "get": {
    "operationId": "get_ipma_observations_raw",
    "tags": [
     "ipma-observations"
    ],
    "summary": "IPMA station observations: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "observations.json",
        "stations.json"
       ]
      },
      "example": "observations.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": [
          "object",
          "array"
         ],
         "properties": {
          "2026-11-18T15:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T02:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T08:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T07:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T10:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T20:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T22:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T01:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T18:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T04:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T13:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T17:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T23:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T06:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T11:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T14:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T05:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T03:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T21:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T09:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T12:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T16:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-17T19:00": {
           "type": "object",
           "additionalProperties": true
          },
          "2026-11-18T00:00": {
           "type": "object",
           "additionalProperties": true
          }
         },
         "required": [
          "2026-11-18T15:00",
          "2026-11-18T02:00",
          "2026-11-18T08:00",
          "2026-11-18T07:00",
          "2026-11-18T10:00",
          "2026-11-17T20:00",
          "2026-11-17T22:00",
          "2026-11-18T01:00",
          "2026-11-17T18:00",
          "2026-11-18T04:00",
          "2026-11-18T13:00",
          "2026-11-17T17:00",
          "2026-11-17T23:00",
          "2026-11-18T06:00",
          "2026-11-18T11:00",
          "2026-11-18T14:00",
          "2026-11-18T05:00",
          "2026-11-18T03:00",
          "2026-11-17T21:00",
          "2026-11-18T09:00",
          "2026-11-18T12:00",
          "2026-11-17T16:00",
          "2026-11-17T19:00",
          "2026-11-18T00:00"
         ],
         "items": {
          "type": "object",
          "properties": {
           "geometry": {
            "type": "object",
            "properties": {
             "type": {
              "type": "string"
             },
             "coordinates": {
              "type": "array",
              "items": {
               "type": "number"
              }
             }
            },
            "required": [
             "type",
             "coordinates"
            ]
           },
           "type": {
            "type": "string"
           },
           "properties": {
            "type": "object",
            "properties": {
             "idEstacao": {
              "type": "integer"
             },
             "localEstacao": {
              "type": "string"
             }
            },
            "required": [
             "idEstacao",
             "localEstacao"
            ]
           }
          },
          "required": [
           "geometry",
           "type",
           "properties"
          ]
         },
         "x-inferred": true
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-sea/latest.json": {
   "get": {
    "operationId": "get_ipma_sea_latest",
    "tags": [
     "ipma-sea"
    ],
    "summary": "IPMA sea forecast: the latest read",
    "description": "IPMA's daily sea forecast for each coastal place: significant wave height, wave period and direction, total sea, and sea surface temperature, today and the next two days.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "d": {
              "type": "integer"
             },
             "date": {
              "type": "string",
              "format": "date"
             },
             "source": {
              "type": "string",
              "format": "uri"
             }
            },
            "required": [
             "d",
             "date",
             "source"
            ]
           }
          },
          "counts": {
           "type": "object",
           "properties": {
            "coasts": {
             "type": "integer"
            }
           },
           "required": [
            "coasts"
           ]
          },
          "coasts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "name": {
              "type": "string"
             },
             "area": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "days": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "date": {
                 "type": "string",
                 "format": "date"
                },
                "waves_min_m": {
                 "type": "number"
                },
                "waves_max_m": {
                 "type": "number"
                },
                "wave_period_min_s": {
                 "type": "number"
                },
                "wave_period_max_s": {
                 "type": "number"
                },
                "wave_dir": {
                 "type": "string"
                },
                "sea_min_m": {
                 "type": "number"
                },
                "sea_max_m": {
                 "type": "number"
                },
                "sea_temp_min_c": {
                 "type": "number"
                },
                "sea_temp_max_c": {
                 "type": "number"
                }
               },
               "required": [
                "date",
                "waves_min_m",
                "waves_max_m",
                "wave_period_min_s",
                "wave_period_max_s",
                "wave_dir",
                "sea_min_m",
                "sea_max_m",
                "sea_temp_min_c",
                "sea_temp_max_c"
               ]
              }
             }
            },
            "required": [
             "id",
             "name",
             "area",
             "lat",
             "lon",
             "days"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "files",
          "counts",
          "coasts"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-sea",
           "title": "IPMA sea forecast",
           "read_at": "2026-11-18T16:32:14Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/forecast/oceanography/daily/hp-daily-sea-forecast-day{0,1,2}.json",
            "page": "https://www.ipma.pt/en/maritima/costeira/",
            "read_at": "2026-11-18T16:32:14Z",
            "by": "sources/ipma-sea/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source."
           },
           "about": "IPMA's daily sea forecast for each coastal place: significant wave height, wave period and direction, total sea, and sea surface temperature, today and the next two days.",
           "files": [
            {
             "d": 0,
             "date": "2026-11-18",
             "source": "https://api.ipma.pt/open-data/forecast/oceanography/daily/hp-daily-sea-forecast-day0.json"
            },
            {
             "d": 1,
             "date": "2026-11-19",
             "source": "https://api.ipma.pt/open-data/forecast/oceanography/daily/hp-daily-sea-forecast-day1.json"
            },
            {
             "d": 2,
             "date": "2026-11-20",
             "source": "https://api.ipma.pt/open-data/forecast/oceanography/daily/hp-daily-sea-forecast-day2.json"
            }
           ],
           "counts": {
            "coasts": 12
           },
           "coasts": [
            {
             "id": 1060526,
             "name": "Figueira da Foz, Costa",
             "area": "CBR",
             "lat": 40.1417,
             "lon": -8.8783,
             "days": [
              {
               "date": "2026-11-18",
               "waves_min_m": 2.3,
               "waves_max_m": 4.6,
               "wave_period_min_s": 6.2,
               "wave_period_max_s": 9.8,
               "wave_dir": "NW",
               "sea_min_m": 2.5,
               "sea_max_m": 5,
               "sea_temp_min_c": 17.4,
               "sea_temp_max_c": 17.5
              },
              {
               "date": "2026-11-19",
               "waves_min_m": 3.9,
               "waves_max_m": 5.3,
               "wave_period_min_s": 8.8,
               "wave_period_max_s": 9.4,
               "wave_dir": "NW",
               "sea_min_m": 5,
               "sea_max_m": 5.5,
               "sea_temp_min_c": 17.2,
               "sea_temp_max_c": 17.4
              },
              {
               "date": "2026-11-20",
               "waves_min_m": 2.8,
               "waves_max_m": 4.7,
               "wave_period_min_s": 7.6,
               "wave_period_max_s": 9.4,
               "wave_dir": "NW",
               "sea_min_m": 3,
               "sea_max_m": 5,
               "sea_temp_min_c": 17.1,
               "sea_temp_max_c": 17.2
              }
             ]
            },
            {
             "id": 1080526,
             "name": "Faro, costa",
             "area": "FAR",
             "lat": 37.1933,
             "lon": -8,
             "days": [
              {
               "date": "2026-11-18",
               "waves_min_m": 0.6,
               "waves_max_m": 1,
               "wave_period_min_s": 3.6,
               "wave_period_max_s": 4.1,
               "wave_dir": "W",
               "sea_min_m": 1,
               "sea_max_m": 1.5,
               "sea_temp_min_c": 19.5,
               "sea_temp_max_c": 19.8
              },
              {
               "date": "2026-11-19",
               "waves_min_m": 0.6,
               "waves_max_m": 1.3,
               "wave_period_min_s": 4,
               "wave_period_max_s": 5.3,
               "wave_dir": "W",
               "sea_min_m": 1,
               "sea_max_m": 1.5,
               "sea_temp_min_c": 19.2,
               "sea_temp_max_c": 19.7
              },
              {
               "date": "2026-11-20",
               "waves_min_m": 0.7,
               "waves_max_m": 1,
               "wave_period_min_s": 5.6,
               "wave_period_max_s": 7.1,
               "wave_dir": "W",
               "sea_min_m": 0.5,
               "sea_max_m": 1,
               "sea_temp_min_c": 18.9,
               "sea_temp_max_c": 19.2
              }
             ]
            },
            {
             "id": 1081526,
             "name": "Sagres, costa",
             "area": "FAR",
             "lat": 37.07,
             "lon": -8.9383,
             "days": [
              {
               "date": "2026-11-18",
               "waves_min_m": 1.4,
               "waves_max_m": 3.7,
               "wave_period_min_s": 4.9,
               "wave_period_max_s": 7.8,
               "wave_dir": "NW",
               "sea_min_m": 1.5,
               "sea_max_m": 4,
               "sea_temp_min_c": 18.8,
               "sea_temp_max_c": 19
              },
              {
               "date": "2026-11-19",
               "waves_min_m": 3.4,
               "waves_max_m": 3.9,
               "wave_period_min_s": 7.9,
               "wave_period_max_s": 9.6,
               "wave_dir": "NW",
               "sea_min_m": 3.5,
               "sea_max_m": 4,
               "sea_temp_min_c": 19,
               "sea_temp_max_c": 19.1
              },
              {
               "date": "2026-11-20",
               "waves_min_m": 2.3,
               "waves_max_m": 3.5,
               "wave_period_min_s": 10,
               "wave_period_max_s": 9.9,
               "wave_dir": "NW",
               "sea_min_m": 2.5,
               "sea_max_m": 3.5,
               "sea_temp_min_c": 19.1,
               "sea_temp_max_c": 19.2
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-sea/raw/{file}": {
   "get": {
    "operationId": "get_ipma_sea_raw",
    "tags": [
     "ipma-sea"
    ],
    "summary": "IPMA sea forecast: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "sea-day0.json",
        "sea-day1.json",
        "sea-day2.json",
        "sea-locations.json"
       ]
      },
      "example": "sea-day0.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": [
          "object",
          "array"
         ],
         "properties": {
          "owner": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "forecastDate": {
           "type": "string",
           "format": "date"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "wavePeriodMin": {
              "type": "string"
             },
             "globalIdLocal": {
              "type": "integer"
             },
             "totalSeaMax": {
              "type": "number"
             },
             "waveHighMax": {
              "type": "string"
             },
             "waveHighMin": {
              "type": "string"
             },
             "longitude": {
              "type": "string"
             },
             "wavePeriodMax": {
              "type": "string"
             },
             "latitude": {
              "type": "string"
             },
             "totalSeaMin": {
              "type": "number"
             },
             "sstMax": {
              "type": "string"
             },
             "predWaveDir": {
              "type": "string"
             },
             "sstMin": {
              "type": "string"
             }
            },
            "required": [
             "wavePeriodMin",
             "globalIdLocal",
             "totalSeaMax",
             "waveHighMax",
             "waveHighMin",
             "longitude",
             "wavePeriodMax",
             "latitude",
             "totalSeaMin",
             "sstMax",
             "predWaveDir",
             "sstMin"
            ]
           }
          },
          "dataUpdate": {
           "type": "string"
          }
         },
         "required": [
          "owner",
          "country",
          "forecastDate",
          "data",
          "dataUpdate"
         ],
         "items": {
          "type": "object",
          "properties": {
           "idRegiao": {
            "type": "integer"
           },
           "idAreaAviso": {
            "type": "string"
           },
           "globalIdLocal": {
            "type": "integer"
           },
           "idLocal": {
            "type": "integer"
           },
           "latitude": {
            "type": "string"
           },
           "local": {
            "type": "string"
           },
           "longitude": {
            "type": "string"
           }
          },
          "required": [
           "idRegiao",
           "idAreaAviso",
           "globalIdLocal",
           "idLocal",
           "latitude",
           "local",
           "longitude"
          ]
         },
         "x-inferred": true
        },
        "examples": {
         "sea-day0.json": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "owner": "IPMA",
           "country": "PT",
           "forecastDate": "2026-11-18",
           "data": [
            {
             "wavePeriodMin": "10.1",
             "globalIdLocal": 2320126,
             "totalSeaMax": 1.5,
             "waveHighMax": "1.4",
             "waveHighMin": "0.7",
             "longitude": "-16.3400",
             "wavePeriodMax": "9.6",
             "latitude": "33.2500",
             "totalSeaMin": 0.5,
             "sstMax": "22.1",
             "predWaveDir": "NW",
             "sstMin": "21.8"
            },
            {
             "wavePeriodMin": "7.0",
             "globalIdLocal": 3420226,
             "totalSeaMax": 2.5,
             "waveHighMax": "2.3",
             "waveHighMin": "1.5",
             "longitude": "-25.6700",
             "wavePeriodMax": "8.3",
             "latitude": "37.9500",
             "totalSeaMin": 2,
             "sstMax": "19.9",
             "predWaveDir": "W",
             "sstMin": "19.8"
            },
            {
             "wavePeriodMin": "10.2",
             "globalIdLocal": 3470126,
             "totalSeaMax": 3.5,
             "waveHighMax": "3.3",
             "waveHighMin": "2.6",
             "longitude": "-28.4700",
             "wavePeriodMax": "9.9",
             "latitude": "38.5700",
             "totalSeaMin": 3,
             "sstMax": "19.1",
             "predWaveDir": "NW",
             "sstMin": "18.9"
            }
           ],
           "dataUpdate": "2026-11-18T15:31:02"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-uv/latest.json": {
   "get": {
    "operationId": "get_ipma_uv_latest",
    "tags": [
     "ipma-uv"
    ],
    "summary": "IPMA UV index: the latest read",
    "description": "IPMA's UV index forecast by place (globalIdLocal), by day. Names are given where the place is a district capital or island in IPMA's list; others by id only (on 18 November: 1081525, not in that list, and 0, which IPMA's file uses with several values a day and no place).",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "places": {
             "type": "integer"
            }
           },
           "required": [
            "places"
           ]
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "integer"
             },
             "name": {
              "type": [
               "null",
               "string"
              ]
             },
             "days": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "date": {
                 "type": "string",
                 "format": "date"
                },
                "index": {
                 "type": "number"
                },
                "period": {
                 "type": "integer"
                },
                "hours": {
                 "type": "null"
                }
               },
               "required": [
                "date",
                "index",
                "period",
                "hours"
               ]
              }
             }
            },
            "required": [
             "id",
             "name",
             "days"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "places"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-uv",
           "title": "IPMA UV index",
           "read_at": "2026-11-18T16:32:23Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/uv/uv.json",
            "page": "https://www.ipma.pt/en/otempo/prev.uv/",
            "read_at": "2026-11-18T16:32:23Z",
            "by": "sources/ipma-uv/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source."
           },
           "about": "IPMA's UV index forecast by place (globalIdLocal), by day. Names are given where the place is a district capital or island in IPMA's list; others by id only (on 18 November: 1081525, not in that list, and 0, which IPMA's file uses with several values a day and no place).",
           "counts": {
            "places": 28
           },
           "places": [
            {
             "id": 0,
             "name": null,
             "days": [
              {
               "date": "2026-11-18",
               "index": 0.9,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-18",
               "index": 0.8,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-18",
               "index": 1,
               "period": 10,
               "hours": null
              }
             ]
            },
            {
             "id": 1010500,
             "name": "Aveiro",
             "days": [
              {
               "date": "2026-11-18",
               "index": 1.6,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-18",
               "index": 1.6,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-19",
               "index": 1.5,
               "period": 10,
               "hours": null
              }
             ]
            },
            {
             "id": 1020500,
             "name": "Beja",
             "days": [
              {
               "date": "2026-11-18",
               "index": 1.9,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-19",
               "index": 2.7,
               "period": 10,
               "hours": null
              },
              {
               "date": "2026-11-20",
               "index": 2.8,
               "period": 10,
               "hours": null
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-uv/raw/{file}": {
   "get": {
    "operationId": "get_ipma_uv_raw",
    "tags": [
     "ipma-uv"
    ],
    "summary": "IPMA UV index: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "distrits-islands.json",
        "uv.json"
       ]
      },
      "example": "distrits-islands.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": [
          "object",
          "array"
         ],
         "properties": {
          "owner": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "data": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "idRegiao": {
              "type": "integer"
             },
             "idAreaAviso": {
              "type": "string"
             },
             "idConcelho": {
              "type": "integer"
             },
             "globalIdLocal": {
              "type": "integer"
             },
             "latitude": {
              "type": "string"
             },
             "idDistrito": {
              "type": "integer"
             },
             "local": {
              "type": "string"
             },
             "longitude": {
              "type": "string"
             }
            },
            "required": [
             "idRegiao",
             "idAreaAviso",
             "idConcelho",
             "globalIdLocal",
             "latitude",
             "idDistrito",
             "local",
             "longitude"
            ]
           }
          }
         },
         "required": [
          "owner",
          "country",
          "data"
         ],
         "items": {
          "type": "object",
          "properties": {
           "idPeriodo": {
            "type": "integer"
           },
           "intervaloHora": {
            "type": "string"
           },
           "data": {
            "type": "string",
            "format": "date"
           },
           "globalIdLocal": {
            "type": "integer"
           },
           "iUv": {
            "type": "string"
           }
          },
          "required": [
           "idPeriodo",
           "intervaloHora",
           "data",
           "globalIdLocal",
           "iUv"
          ]
         },
         "x-inferred": true
        },
        "examples": {
         "distrits-islands.json": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "owner": "IPMA",
           "country": "PT",
           "data": [
            {
             "idRegiao": 1,
             "idAreaAviso": "AVR",
             "idConcelho": 5,
             "globalIdLocal": 1010500,
             "latitude": "40.6413",
             "idDistrito": 1,
             "local": "Aveiro",
             "longitude": "-8.6535"
            },
            {
             "idRegiao": 1,
             "idAreaAviso": "BJA",
             "idConcelho": 5,
             "globalIdLocal": 1020500,
             "latitude": "38.0200",
             "idDistrito": 2,
             "local": "Beja",
             "longitude": "-7.8700"
            },
            {
             "idRegiao": 1,
             "idAreaAviso": "BRG",
             "idConcelho": 3,
             "globalIdLocal": 1030300,
             "latitude": "41.5475",
             "idDistrito": 3,
             "local": "Braga",
             "longitude": "-8.4227"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-warnings/latest.json": {
   "get": {
    "operationId": "get_ipma_warnings_latest",
    "tags": [
     "ipma-warnings"
    ],
    "summary": "IPMA weather warnings: the latest read",
    "description": "IPMA's weather warnings, every area: the active ones (yellow, orange, red) in full, and a count of the rest. Times as IPMA gives them (Portugal local time). Not a warning service: follow IPMA and ANEPC.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "active": {
             "type": "integer"
            },
            "by_level": {
             "type": "object",
             "properties": {
              "yellow": {
               "type": "integer"
              },
              "orange": {
               "type": "integer"
              }
             },
             "required": [
              "yellow",
              "orange"
             ]
            },
            "green": {
             "type": "integer"
            },
            "areas": {
             "type": "integer"
            }
           },
           "required": [
            "active",
            "by_level",
            "green",
            "areas"
           ]
          },
          "active": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "area": {
              "type": "string"
             },
             "area_name": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "type_pt": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "text": {
              "type": "string"
             }
            },
            "required": [
             "area",
             "area_name",
             "type",
             "type_pt",
             "level",
             "start",
             "end",
             "text"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "active"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "ipma-warnings",
           "title": "IPMA weather warnings",
           "read_at": "2026-11-18T16:32:26Z",
           "provenance": {
            "source": "https://api.ipma.pt/open-data/forecast/warnings/warnings_www.json",
            "page": "https://www.ipma.pt/en/otempo/prev-sam/",
            "read_at": "2026-11-18T16:32:26Z",
            "by": "sources/ipma-warnings/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "IPMA: free to copy and use for personal or public use if the use has no profit-making or offensive purpose; always name IPMA as the source."
           },
           "about": "IPMA's weather warnings, every area: the active ones (yellow, orange, red) in full, and a count of the rest. Times as IPMA gives them (Portugal local time). Not a warning service: follow IPMA and ANEPC.",
           "counts": {
            "active": 32,
            "by_level": {
             "yellow": 25,
             "orange": 7
            },
            "green": 200,
            "areas": 25
           },
           "active": [
            {
             "area": "AVR",
             "area_name": "Aveiro",
             "type": "rough sea",
             "type_pt": "Agitação Marítima",
             "level": "yellow",
             "start": "2026-11-18T13:15:00",
             "end": "2026-11-18T18:00:00",
             "text": "Ondas de noroeste com 4 a 5 metros."
            },
            {
             "area": "AVR",
             "area_name": "Aveiro",
             "type": "rough sea",
             "type_pt": "Agitação Marítima",
             "level": "orange",
             "start": "2026-11-18T18:00:00",
             "end": "2026-11-20T00:00:00",
             "text": "Ondas de noroeste com 5 a 6 metros, com altura máxima até 10 metros."
            },
            {
             "area": "AVR",
             "area_name": "Aveiro",
             "type": "rough sea",
             "type_pt": "Agitação Marítima",
             "level": "yellow",
             "start": "2026-11-20T00:00:00",
             "end": "2026-11-20T12:00:00",
             "text": "Ondas de noroeste com 4 a 5 metros."
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/ipma-warnings/raw/{file}": {
   "get": {
    "operationId": "get_ipma_warnings_raw",
    "tags": [
     "ipma-warnings"
    ],
    "summary": "IPMA weather warnings: the publisher's own file, as read",
    "description": "The bytes IPMA served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "warnings.json"
       ]
      },
      "example": "warnings.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "text": {
            "type": "string"
           },
           "awarenessTypeName": {
            "type": "string"
           },
           "idAreaAviso": {
            "type": "string"
           },
           "startTime": {
            "type": "string"
           },
           "awarenessLevelID": {
            "type": "string"
           },
           "endTime": {
            "type": "string"
           }
          },
          "required": [
           "text",
           "awarenessTypeName",
           "idAreaAviso",
           "startTime",
           "awarenessLevelID",
           "endTime"
          ]
         },
         "x-inferred": true
        },
        "examples": {
         "warnings.json": {
          "summary": "A real file, cut to a readable size",
          "value": [
           {
            "text": "",
            "awarenessTypeName": "Agitação Marítima",
            "idAreaAviso": "BGC",
            "startTime": "2026-11-18T13:15:00",
            "awarenessLevelID": "green",
            "endTime": "2026-11-21T13:00:00"
           },
           {
            "text": "",
            "awarenessTypeName": "Nevoeiro",
            "idAreaAviso": "BGC",
            "startTime": "2026-11-18T13:15:00",
            "awarenessLevelID": "green",
            "endTime": "2026-11-21T13:00:00"
           },
           {
            "text": "",
            "awarenessTypeName": "Tempo Quente",
            "idAreaAviso": "BGC",
            "startTime": "2026-11-18T13:15:00",
            "awarenessLevelID": "green",
            "endTime": "2026-11-21T13:00:00"
           }
          ]
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/meteoalarm-pt/latest.json": {
   "get": {
    "operationId": "get_meteoalarm_pt_latest",
    "tags": [
     "meteoalarm-pt"
    ],
    "summary": "MeteoAlarm CAP feed for Portugal: the latest read",
    "description": "MeteoAlarm's feed for Portugal as a compact table, one line per CAP message (English text where given, the national event name beside it). The national service is IPMA (Instituto Português do Mar e da Atmosfera); sent_utc is each message's time of issue. A dated record, not a warning service.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "attribution": {
           "type": "object",
           "properties": {
            "national_service": {
             "type": "string"
            },
            "meteoalarm": {
             "type": "string"
            },
            "disclaimer": {
             "type": "string"
            }
           },
           "required": [
            "national_service",
            "meteoalarm",
            "disclaimer"
           ]
          },
          "sha256_prefix": {
           "type": "string"
          },
          "bytes": {
           "type": "integer"
          },
          "counts": {
           "type": "object",
           "properties": {
            "messages": {
             "type": "integer"
            },
            "not_expired": {
             "type": "integer"
            }
           },
           "required": [
            "messages",
            "not_expired"
           ]
          },
          "changes": {
           "type": "object",
           "properties": {
            "since": {
             "type": "string"
            },
            "appeared": {
             "type": "array"
            },
            "left": {
             "type": "array"
            }
           },
           "required": [
            "since",
            "appeared",
            "left"
           ]
          },
          "messages": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "sent_utc": {
              "type": "string"
             },
             "msg_type": {
              "type": "string"
             },
             "replaces": {
              "type": [
               "array",
               "null"
              ],
              "items": {
               "type": "object",
               "properties": {
                "id": {
                 "type": "string"
                },
                "sent_utc": {
                 "type": "string"
                }
               },
               "required": [
                "id",
                "sent_utc"
               ]
              }
             },
             "area": {
              "type": "string"
             },
             "emma": {
              "type": "string"
             },
             "level": {
              "type": "string"
             },
             "hazard": {
              "type": "string"
             },
             "event": {
              "type": "string"
             },
             "event_national": {
              "type": "string"
             },
             "onset_utc": {
              "type": "string"
             },
             "expires_utc": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "certainty": {
              "type": "string"
             },
             "urgency": {
              "type": "string"
             },
             "text": {
              "type": "string"
             },
             "sender": {
              "type": "string"
             },
             "h": {
              "type": "string"
             }
            },
            "required": [
             "id",
             "sent_utc",
             "msg_type",
             "replaces",
             "area",
             "emma",
             "level",
             "hazard",
             "event",
             "event_national",
             "onset_utc",
             "expires_utc",
             "severity",
             "certainty",
             "urgency",
             "text",
             "sender",
             "h"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "attribution",
          "sha256_prefix",
          "bytes",
          "counts",
          "changes",
          "messages"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "meteoalarm-pt",
           "title": "MeteoAlarm CAP feed for Portugal",
           "read_at": "2026-11-18T16:32:28Z",
           "provenance": {
            "source": "https://feeds.meteoalarm.org/api/v1/warnings/feeds-portugal",
            "page": "https://www.meteoalarm.org/en/live/region/PT",
            "read_at": "2026-11-18T16:32:28Z",
            "by": "sources/meteoalarm-pt/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "MeteoAlarm: re-users must name the national service (IPMA), keep the time of issue, link www.meteoalarm.org and publish MeteoAlarm's disclaimer. latest.json carries all four."
           },
           "about": "MeteoAlarm's feed for Portugal as a compact table, one line per CAP message (English text where given, the national event name beside it). The national service is IPMA (Instituto Português do Mar e da Atmosfera); sent_utc is each message's time of issue. A dated record, not a warning service.",
           "attribution": {
            "national_service": "IPMA, Instituto Português do Mar e da Atmosfera",
            "meteoalarm": "https://www.meteoalarm.org/",
            "disclaimer": "Time delays between this website and the www.meteoalarm.org website are possible. For the most up-to-date awareness information as published by the participating National Meteorological and Hydrological Services, please refer to www.meteoalarm.org."
           },
           "sha256_prefix": "c8c4db0f3db759b1",
           "bytes": 102818,
           "counts": {
            "messages": 58,
            "not_expired": 32
           },
           "changes": {
            "since": "2026-11-18T16:13:52Z",
            "appeared": [],
            "left": []
           },
           "messages": [
            {
             "id": "2.49.0.0.620.0.PT.261113013218.PO-10-6350",
             "sent_utc": "2026-11-13T01:32:18Z",
             "msg_type": "Update",
             "replaces": [
              {
               "id": "2.49.0.0.620.0.PT.261111224328.PO-10-6344",
               "sent_utc": "2026-11-11T22:43:28Z"
              }
             ],
             "area": "Viana do Castelo",
             "emma": "PT006",
             "level": "yellow",
             "hazard": "Rain",
             "event": "Yellow Rain Warning",
             "event_national": "Aviso Amarelo Precipitação",
             "onset_utc": "2026-11-13T01:33:00Z",
             "expires_utc": "2026-11-13T12:00:00Z",
             "severity": "Moderate",
             "certainty": "Likely",
             "urgency": "Expected",
             "text": "Periods of rain, sometimes heavy.",
             "sender": "Instituto Português do Mar e da Atmosfera",
             "h": "382e484b5081dd26"
            },
            {
             "id": "2.49.0.0.620.0.PT.261113013218.PO-10-6351",
             "sent_utc": "2026-11-13T01:32:18Z",
             "msg_type": "Update",
             "replaces": [
              {
               "id": "2.49.0.0.620.0.PT.261111224328.PO-10-6345",
               "sent_utc": "2026-11-11T22:43:28Z"
              }
             ],
             "area": "Braga",
             "emma": "PT022",
             "level": "yellow",
             "hazard": "Rain",
             "event": "Yellow Rain Warning",
             "event_national": "Aviso Amarelo Precipitação",
             "onset_utc": "2026-11-13T01:33:00Z",
             "expires_utc": "2026-11-13T12:00:00Z",
             "severity": "Moderate",
             "certainty": "Likely",
             "urgency": "Expected",
             "text": "Periods of rain, sometimes heavy.",
             "sender": "Instituto Português do Mar e da Atmosfera",
             "h": "9caa7130cbddd945"
            },
            {
             "id": "2.49.0.0.620.0.PT.261113013218.PO-10-6352",
             "sent_utc": "2026-11-13T01:32:18Z",
             "msg_type": "Update",
             "replaces": [
              {
               "id": "2.49.0.0.620.0.PT.261111224328.PO-10-6346",
               "sent_utc": "2026-11-11T22:43:28Z"
              }
             ],
             "area": "Porto",
             "emma": "PT009",
             "level": "yellow",
             "hazard": "Rain",
             "event": "Yellow Rain Warning",
             "event_national": "Aviso Amarelo Precipitação",
             "onset_utc": "2026-11-13T01:33:00Z",
             "expires_utc": "2026-11-13T12:00:00Z",
             "severity": "Moderate",
             "certainty": "Likely",
             "urgency": "Expected",
             "text": "Periods of rain, sometimes heavy.",
             "sender": "Instituto Português do Mar e da Atmosfera",
             "h": "f77d883465989b5e"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/meteoalarm-pt/raw/{file}": {
   "get": {
    "operationId": "get_meteoalarm_pt_raw",
    "tags": [
     "meteoalarm-pt"
    ],
    "summary": "MeteoAlarm CAP feed for Portugal: the publisher's own file, as read",
    "description": "The bytes MeteoAlarm (EUMETNET) served at the latest read, parsed and re-serialised, unprocessed. The address each came from is in reads.json.",
    "parameters": [
     {
      "name": "file",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "feeds-portugal.json"
       ]
      },
      "example": "feeds-portugal.json"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "warnings": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "alert": {
              "type": "object",
              "properties": {
               "identifier": {
                "type": "string"
               },
               "incidents": {
                "type": "string"
               },
               "info": {
                "type": "array",
                "items": {
                 "type": "object",
                 "properties": {
                  "area": {
                   "type": "array"
                  },
                  "category": {
                   "type": "array"
                  },
                  "certainty": {
                   "type": "string"
                  },
                  "description": {
                   "type": "string"
                  },
                  "effective": {
                   "type": "string"
                  },
                  "event": {
                   "type": "string"
                  },
                  "expires": {
                   "type": "string"
                  },
                  "headline": {
                   "type": "string"
                  },
                  "language": {
                   "type": "string"
                  },
                  "onset": {
                   "type": "string"
                  },
                  "parameter": {
                   "type": "array"
                  },
                  "responseType": {
                   "type": "array"
                  },
                  "senderName": {
                   "type": "string"
                  },
                  "severity": {
                   "type": "string"
                  },
                  "urgency": {
                   "type": "string"
                  },
                  "web": {
                   "type": "string"
                  }
                 },
                 "required": [
                  "area",
                  "category",
                  "certainty",
                  "description",
                  "effective",
                  "event",
                  "expires",
                  "headline",
                  "language",
                  "onset",
                  "parameter",
                  "responseType",
                  "senderName",
                  "severity",
                  "urgency",
                  "web"
                 ]
                }
               },
               "msgType": {
                "type": "string"
               },
               "references": {
                "type": "string",
                "format": "uri"
               },
               "scope": {
                "type": "string"
               },
               "sender": {
                "type": "string",
                "format": "uri"
               },
               "sent": {
                "type": "string"
               },
               "status": {
                "type": "string"
               }
              },
              "required": [
               "identifier",
               "incidents",
               "info",
               "msgType",
               "scope",
               "sender",
               "sent",
               "status"
              ]
             },
             "uuid": {
              "type": "string"
             }
            },
            "required": [
             "alert",
             "uuid"
            ]
           }
          }
         },
         "required": [
          "warnings"
         ],
         "x-inferred": true
        },
        "examples": {
         "feeds-portugal.json": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "warnings": [
            {
             "alert": {
              "identifier": "2.49.0.0.620.0.PT.261113013218.PO-10-6350",
              "incidents": "Update",
              "info": [
               {
                "area": [
                 {
                  "areaDesc": "Viana do Castelo",
                  "geocode": [
                   {
                    "value": "PT006",
                    "valueName": "EMMA_ID"
                   }
                  ]
                 }
                ],
                "category": [
                 "Met"
                ],
                "certainty": "Likely",
                "description": "Períodos de chuva persistente e por vezes forte.",
                "effective": "2026-11-13T01:32:18+00:00",
                "event": "Aviso Amarelo Precipitação",
                "expires": "2026-11-13T12:00:00+00:00",
                "headline": "Aviso Amarelo Precipitação para Viana do Castelo",
                "language": "pt-PT",
                "onset": "2026-11-13T01:33:00+00:00",
                "parameter": [
                 {
                  "value": "2; yellow; Moderate",
                  "valueName": "awareness_level"
                 }
                ],
                "responseType": [
                 "None"
                ],
                "senderName": "Instituto Português do Mar e da Atmosfera",
                "severity": "Moderate",
                "urgency": "Expected",
                "web": "https://www.ipma.pt/pt/otempo/prev-sam/"
               }
              ],
              "msgType": "Update",
              "references": "https://www.ipma.pt,2.49.0.0.620.0.PT.261111224328.PO-10-6344,2026-11-11T22:43:28+00:00",
              "scope": "Public",
              "sender": "https://www.ipma.pt",
              "sent": "2026-11-13T01:32:18+00:00",
              "status": "Actual"
             },
             "uuid": "c5d60230-ea33-42ab-8d9e-ca95b83dfd50"
            },
            {
             "alert": {
              "identifier": "2.49.0.0.620.0.PT.261113013218.PO-10-6351",
              "incidents": "Update",
              "info": [
               {
                "area": [
                 {
                  "areaDesc": "Braga",
                  "geocode": [
                   {
                    "value": "PT022",
                    "valueName": "EMMA_ID"
                   }
                  ]
                 }
                ],
                "category": [
                 "Met"
                ],
                "certainty": "Likely",
                "description": "Períodos de chuva persistente e por vezes forte.",
                "effective": "2026-11-13T01:32:18+00:00",
                "event": "Aviso Amarelo Precipitação",
                "expires": "2026-11-13T12:00:00+00:00",
                "headline": "Aviso Amarelo Precipitação para Braga",
                "language": "pt-PT",
                "onset": "2026-11-13T01:33:00+00:00",
                "parameter": [
                 {
                  "value": "2; yellow; Moderate",
                  "valueName": "awareness_level"
                 }
                ],
                "responseType": [
                 "None"
                ],
                "senderName": "Instituto Português do Mar e da Atmosfera",
                "severity": "Moderate",
                "urgency": "Expected",
                "web": "https://www.ipma.pt/pt/otempo/prev-sam/"
               }
              ],
              "msgType": "Update",
              "references": "https://www.ipma.pt,2.49.0.0.620.0.PT.261111224328.PO-10-6345,2026-11-11T22:43:28+00:00",
              "scope": "Public",
              "sender": "https://www.ipma.pt",
              "sent": "2026-11-13T01:32:18+00:00",
              "status": "Actual"
             },
             "uuid": "1dfb3673-bf0d-4220-a4cb-e6ff103cff1d"
            },
            {
             "alert": {
              "identifier": "2.49.0.0.620.0.PT.261113013218.PO-10-6352",
              "incidents": "Update",
              "info": [
               {
                "area": [
                 {
                  "areaDesc": "Porto",
                  "geocode": [
                   {
                    "value": "PT009",
                    "valueName": "EMMA_ID"
                   }
                  ]
                 }
                ],
                "category": [
                 "Met"
                ],
                "certainty": "Likely",
                "description": "Períodos de chuva persistente e por vezes forte.",
                "effective": "2026-11-13T01:32:18+00:00",
                "event": "Aviso Amarelo Precipitação",
                "expires": "2026-11-13T12:00:00+00:00",
                "headline": "Aviso Amarelo Precipitação para Porto",
                "language": "pt-PT",
                "onset": "2026-11-13T01:33:00+00:00",
                "parameter": [
                 {
                  "value": "2; yellow; Moderate",
                  "valueName": "awareness_level"
                 }
                ],
                "responseType": [
                 "None"
                ],
                "senderName": "Instituto Português do Mar e da Atmosfera",
                "severity": "Moderate",
                "urgency": "Expected",
                "web": "https://www.ipma.pt/pt/otempo/prev-sam/"
               }
              ],
              "msgType": "Update",
              "references": "https://www.ipma.pt,2.49.0.0.620.0.PT.261111224328.PO-10-6346,2026-11-11T22:43:28+00:00",
              "scope": "Public",
              "sender": "https://www.ipma.pt",
              "sent": "2026-11-13T01:32:18+00:00",
              "status": "Actual"
             },
             "uuid": "40b42bce-dc35-47d6-8a3b-7918683e2c71"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/social/latest.json": {
   "get": {
    "operationId": "get_social_latest",
    "tags": [
     "social"
    ],
    "summary": "Social signals: organisations' public posts, by link: the latest read",
    "description": "Links to recent public posts (last 30 days) by the official accounts of organisations (câmaras, public bodies, venues, organisers, news outlets, companies) listed in register/social-accounts.json. Each record is the post's public web address plus metadata: who, when, which topics and places its text matched, language, whether it has media. The post text and media are not stored: open the link, or use the platform's own embed, to see the post. Every post stays its author's content under the platform's terms; show it by link, credited to the organisation. A signal to check, not a verified fact. Never a private person's account.",
    "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"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "platform": {
                "type": "string"
               },
               "api": {
                "type": "string"
               },
               "terms": {
                "type": "string"
               },
               "note": {
                "type": "string"
               }
              },
              "required": [
               "platform",
               "api",
               "terms",
               "note"
              ]
             }
            },
            "accounts": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "sources",
            "accounts"
           ]
          },
          "about": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "posts": {
             "type": "integer"
            },
            "accounts": {
             "type": "integer"
            },
            "by_platform": {
             "type": "object",
             "properties": {
              "bluesky": {
               "type": "integer"
              },
              "mastodon": {
               "type": "integer"
              }
             },
             "required": [
              "bluesky",
              "mastodon"
             ]
            },
            "with_topic": {
             "type": "integer"
            },
            "with_place": {
             "type": "integer"
            }
           },
           "required": [
            "posts",
            "accounts",
            "by_platform",
            "with_topic",
            "with_place"
           ]
          },
          "posts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "platform": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "account": {
              "type": "string"
             },
             "organisation": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "posted_at": {
              "type": "string"
             },
             "topics": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "places": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "lang": {
              "type": "null"
             },
             "has_media": {
              "type": "boolean"
             },
             "source": {
              "type": "string"
             },
             "license": {
              "type": "object",
              "properties": {
               "name": {
                "type": "string"
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "holder": {
                "type": "string"
               }
              },
              "required": [
               "name",
               "url",
               "holder"
              ]
             },
             "read_at": {
              "type": "string"
             }
            },
            "required": [
             "platform",
             "url",
             "account",
             "organisation",
             "kind",
             "posted_at",
             "topics",
             "places",
             "lang",
             "has_media",
             "source",
             "license",
             "read_at"
            ]
           }
          },
          "gaps": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "what": {
              "type": "string"
             },
             "why": {
              "type": "string"
             },
             "read_at": {
              "type": "string"
             }
            },
            "required": [
             "what",
             "why",
             "read_at"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "counts",
          "posts",
          "gaps"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "social",
           "title": "Social signals: organisations' public posts, by link",
           "read_at": "2026-11-18T16:32:32Z",
           "provenance": {
            "source": "https://public.api.bsky.app/xrpc/",
            "page": "https://bsky.app/",
            "read_at": "2026-11-18T16:32:32Z",
            "by": "sources/social/collect.mjs (code, no model; run by data.b@PrompTugal.dinis)",
            "terms": "Organisations only, official interfaces only, by link. Bluesky: robots.txt of the public API allows crawling it and asks for backoff on 429; the Terms of Service (14 Aug 2025) leave each post's content with its author, so we store link and metadata only and credit the organisation. Mastodon: mastodo...",
            "sources": [
             {
              "platform": "bluesky",
              "api": "https://public.api.bsky.app/xrpc",
              "terms": "https://bsky.social/about/support/tos",
              "note": "public AppView, no login"
             },
             {
              "platform": "mastodon",
              "api": "https://<instance>/api/v1/",
              "terms": "https://<instance>/terms-of-service",
              "note": "public endpoints, without credentials"
             }
            ],
            "accounts": "register/social-accounts.json"
           },
           "about": "Links to recent public posts (last 30 days) by the official accounts of organisations (câmaras, public bodies, venues, organisers, news outlets, companies) listed in register/social-accounts.json. Each record is the post's public web address plus metadata: who, when, which topics and places its text...",
           "counts": {
            "posts": 147,
            "accounts": 5,
            "by_platform": {
             "bluesky": 147,
             "mastodon": 0
            },
            "with_topic": 26,
            "with_place": 27
           },
           "posts": [
            {
             "platform": "bluesky",
             "url": "https://bsky.app/profile/portugalresident.com/post/3n2ly3ujwom2q",
             "account": "portugalresident.com",
             "organisation": "The Portugal Resident",
             "kind": "news outlet",
             "posted_at": "2026-11-18T16:29:24.714Z",
             "topics": [
              "tourism"
             ],
             "places": [
              "algarve"
             ],
             "lang": null,
             "has_media": true,
             "source": "author feed",
             "license": {
              "name": "the platform's terms",
              "url": "https://bsky.social/about/support/tos",
              "holder": "The Portugal Resident"
             },
             "read_at": "2026-11-18T16:32:32Z"
            },
            {
             "platform": "bluesky",
             "url": "https://bsky.app/profile/lusa.pt/post/3n2lxv2ao3k2k",
             "account": "lusa.pt",
             "organisation": "Agência Lusa",
             "kind": "news outlet",
             "posted_at": "2026-11-18T16:25:36.1532550+00:00",
             "topics": [],
             "places": [],
             "lang": null,
             "has_media": true,
             "source": "author feed",
             "license": {
              "name": "the platform's terms",
              "url": "https://bsky.social/about/support/tos",
              "holder": "Agência Lusa"
             },
             "read_at": "2026-11-18T16:32:32Z"
            },
            {
             "platform": "bluesky",
             "url": "https://bsky.app/profile/lusa.pt/post/3n2lxnbwcoh23",
             "account": "lusa.pt",
             "organisation": "Agência Lusa",
             "kind": "news outlet",
             "posted_at": "2026-11-18T16:21:15.9089851+00:00",
             "topics": [],
             "places": [],
             "lang": null,
             "has_media": true,
             "source": "author feed",
             "license": {
              "name": "the platform's terms",
              "url": "https://bsky.social/about/support/tos",
              "holder": "Agência Lusa"
             },
             "read_at": "2026-11-18T16:32:32Z"
            }
           ],
           "gaps": [
            {
             "what": "Bluesky keyword search \"\"Web Summit\"\"",
             "why": "not read: the public search was refused or failed (see reads.json); the author feeds above still cover the listed accounts",
             "read_at": "2026-11-18T16:32:32Z"
            },
            {
             "what": "Bluesky keyword search \"Lisboa\"",
             "why": "not read: the public search was refused or failed (see reads.json); the author feeds above still cover the listed accounts",
             "read_at": "2026-11-18T16:32:32Z"
            },
            {
             "what": "Bluesky keyword search \"Algarve\"",
             "why": "not read: the public search was refused or failed (see reads.json); the author feeds above still cover the listed accounts",
             "read_at": "2026-11-18T16:32:32Z"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/storm-charles-archive/latest.json": {
   "get": {
    "operationId": "get_storm_charles_archive_latest",
    "tags": [
     "storm-charles-archive"
    ],
    "summary": "Storm Charles archive: the latest read",
    "description": "Every data file storm-charles.promptugal.news listed in its catalogue (api/v1/index.json) on the day it was archived. verified is true when the full sha256 of the bytes we received equals the one the catalogue states; here each is shown by its first 16 hex (sha256_prefix), and the full hashes are in the vault (manifest-full.json). The bytes are in the source's vault, at <incident>/<path>. The storm site keeps its own addresses (its api/v1 contract); this is a second, hashed copy.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "catalogue": {
           "type": "object",
           "properties": {
            "version": {
             "type": "string"
            },
            "built_at": {
             "type": "string"
            },
            "sha256_prefix": {
             "type": "string"
            },
            "api": {
             "type": "string"
            },
            "contract": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "incidents": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "title": {
                "type": "string"
               },
               "status": {
                "type": "string"
               },
               "headline": {
                "type": "object",
                "properties": {
                 "text": {
                  "type": "string"
                 },
                 "source": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string"
                 },
                 "at": {
                  "type": "string"
                 },
                 "label": {
                  "type": "string"
                 }
                },
                "required": [
                 "text",
                 "source",
                 "url",
                 "at",
                 "label"
                ]
               }
              },
              "required": [
               "id",
               "title",
               "status",
               "headline"
              ]
             }
            }
           },
           "required": [
            "version",
            "built_at",
            "sha256_prefix",
            "api",
            "contract",
            "licence",
            "incidents"
           ]
          },
          "counts": {
           "type": "object",
           "properties": {
            "files": {
             "type": "integer"
            },
            "verified": {
             "type": "integer"
            },
            "bytes": {
             "type": "integer"
            },
            "datasets": {
             "type": "integer"
            }
           },
           "required": [
            "files",
            "verified",
            "bytes",
            "datasets"
           ]
          },
          "datasets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "dataset": {
              "type": "string"
             },
             "files": {
              "type": "integer"
             },
             "bytes": {
              "type": "integer"
             }
            },
            "required": [
             "dataset",
             "files",
             "bytes"
            ]
           }
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "incident": {
              "type": "string"
             },
             "path": {
              "type": "string"
             },
             "dataset": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "bytes": {
              "type": "integer"
             },
             "sha256_prefix": {
              "type": "string"
             },
             "status": {
              "type": "integer"
             },
             "verified": {
              "type": "boolean"
             },
             "about": {
              "type": "string"
             }
            },
            "required": [
             "incident",
             "path",
             "dataset",
             "url",
             "bytes",
             "sha256_prefix",
             "status",
             "verified",
             "about"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "catalogue",
          "counts",
          "datasets",
          "files"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "storm-charles-archive",
           "title": "Storm Charles archive",
           "read_at": "2026-11-17T19:27:57Z",
           "provenance": {
            "source": "https://storm-charles.promptugal.news/api/v1/index.json",
            "page": "https://storm-charles.promptugal.news/datasets.html",
            "read_at": "2026-11-17T19:27:57Z",
            "by": "sources/storm-charles-archive/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "The storm site's own data: Apache-2.0 (its repository's licence). Quoted sources keep their own terms; each item links its source."
           },
           "about": "Every data file storm-charles.promptugal.news listed in its catalogue (api/v1/index.json) on the day it was archived. verified is true when the full sha256 of the bytes we received equals the one the catalogue states; here each is shown by its first 16 hex (sha256_prefix), and the full hashes are in...",
           "catalogue": {
            "version": "v0.1.2018",
            "built_at": "2026-11-13T15:44:58.892Z",
            "sha256_prefix": "0ed65be739bf33ca",
            "api": "v1",
            "contract": "https://storm-charles.promptugal.news/api/v1/README.md",
            "licence": "Our own data: Apache-2.0 (the repository's licence). Quoted sources keep their own terms; each item links its source.",
            "incidents": [
             {
              "id": "2026-11-10-storm-charles",
              "title": "Storm Charles, Lisbon: Wednesday 11 November 2026",
              "status": "open",
              "headline": {
               "text": "Web Summit's Day 3 (Thursday) is running: \"today is officially Web Summit's biggest-ever day\", the organisers say; Wednesday was cancelled",
               "source": "Web Summit on Bluesky (@websummit.bsky.social)",
               "url": "https://bsky.app/profile/websummit.bsky.social/post/3n245iu57wk2i",
               "at": "12 Nov 2026, 09:23 UTC (first posted 09:00:19, deleted and posted again 09:23:34; read 09:46)",
               "label": "fact"
              }
             }
            ]
           },
           "counts": {
            "files": 142,
            "verified": 142,
            "bytes": 5127487,
            "datasets": 39
           },
           "datasets": [
            {
             "dataset": "decisions/addresses",
             "files": 1,
             "bytes": 9694
            },
            {
             "dataset": "decisions/entities",
             "files": 19,
             "bytes": 78139
            },
            {
             "dataset": "decisions/graph",
             "files": 1,
             "bytes": 141918
            }
           ],
           "files": [
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/addresses.json",
             "dataset": "decisions/addresses",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/addresses.json",
             "bytes": 9694,
             "sha256_prefix": "852e9cd1e12e0229",
             "status": 200,
             "verified": true,
             "about": "For each timeline row in signals.json (the new site, made_at 2026-11-11T01:53Z) that had no openable address: the exact public address(es) of its primary source, the time read, and what kind of address it is. Internal records are this team's public repository files; \"withheld\" is by policy. Kept by ..."
            },
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/entities/airport.json",
             "dataset": "decisions/entities",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/entities/airport.json",
             "bytes": 8443,
             "sha256_prefix": "8ca6a86ff4c84a50",
             "status": 200,
             "verified": true,
             "about": "Every decision in graph.json about airport: who decided, when published, when it takes effect, the exact address, the time read, fact or evidence. Generated from graph.json by incident.researcher@web-summit.dinis; graph.json is the source of truth."
            },
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/entities/bridges.json",
             "dataset": "decisions/entities",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/entities/bridges.json",
             "bytes": 6508,
             "sha256_prefix": "6b8b7f981de872fc",
             "status": 200,
             "verified": true,
             "about": "Every decision in graph.json about bridges: who decided, when published, when it takes effect, the exact address, the time read, fact or evidence. Generated from graph.json by incident.researcher@web-summit.dinis; graph.json is the source of truth."
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/storm-charles-archive/manifest.json": {
   "get": {
    "operationId": "get_storm_charles_archive_manifest",
    "tags": [
     "storm-charles-archive"
    ],
    "summary": "Storm Charles archive: the manifest",
    "description": "Every archived file with its size and sha256.",
    "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"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms"
           ]
          },
          "about": {
           "type": "string"
          },
          "catalogue": {
           "type": "object",
           "properties": {
            "version": {
             "type": "string"
            },
            "built_at": {
             "type": "string"
            },
            "sha256_prefix": {
             "type": "string"
            },
            "api": {
             "type": "string"
            },
            "contract": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            },
            "incidents": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "title": {
                "type": "string"
               },
               "status": {
                "type": "string"
               },
               "headline": {
                "type": "object",
                "properties": {
                 "text": {
                  "type": "string"
                 },
                 "source": {
                  "type": "string"
                 },
                 "url": {
                  "type": "string"
                 },
                 "at": {
                  "type": "string"
                 },
                 "label": {
                  "type": "string"
                 }
                },
                "required": [
                 "text",
                 "source",
                 "url",
                 "at",
                 "label"
                ]
               }
              },
              "required": [
               "id",
               "title",
               "status",
               "headline"
              ]
             }
            }
           },
           "required": [
            "version",
            "built_at",
            "sha256_prefix",
            "api",
            "contract",
            "licence",
            "incidents"
           ]
          },
          "counts": {
           "type": "object",
           "properties": {
            "files": {
             "type": "integer"
            },
            "verified": {
             "type": "integer"
            },
            "bytes": {
             "type": "integer"
            },
            "datasets": {
             "type": "integer"
            }
           },
           "required": [
            "files",
            "verified",
            "bytes",
            "datasets"
           ]
          },
          "datasets": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "dataset": {
              "type": "string"
             },
             "files": {
              "type": "integer"
             },
             "bytes": {
              "type": "integer"
             }
            },
            "required": [
             "dataset",
             "files",
             "bytes"
            ]
           }
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "incident": {
              "type": "string"
             },
             "path": {
              "type": "string"
             },
             "dataset": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "bytes": {
              "type": "integer"
             },
             "sha256_prefix": {
              "type": "string"
             },
             "status": {
              "type": "integer"
             },
             "verified": {
              "type": "boolean"
             },
             "about": {
              "type": "string"
             }
            },
            "required": [
             "incident",
             "path",
             "dataset",
             "url",
             "bytes",
             "sha256_prefix",
             "status",
             "verified",
             "about"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "about",
          "catalogue",
          "counts",
          "datasets",
          "files"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "storm-charles-archive",
           "title": "Storm Charles archive",
           "read_at": "2026-11-17T19:27:57Z",
           "provenance": {
            "source": "https://storm-charles.promptugal.news/api/v1/index.json",
            "page": "https://storm-charles.promptugal.news/datasets.html",
            "read_at": "2026-11-17T19:27:57Z",
            "by": "sources/storm-charles-archive/collect.mjs (code, no model; run by data@PrompTugal.dinis)",
            "terms": "The storm site's own data: Apache-2.0 (its repository's licence). Quoted sources keep their own terms; each item links its source."
           },
           "about": "Every data file storm-charles.promptugal.news listed in its catalogue (api/v1/index.json) on the day it was archived. verified is true when the full sha256 of the bytes we received equals the one the catalogue states; here each is shown by its first 16 hex (sha256_prefix), and the full hashes are in...",
           "catalogue": {
            "version": "v0.1.2018",
            "built_at": "2026-11-13T15:44:58.892Z",
            "sha256_prefix": "0ed65be739bf33ca",
            "api": "v1",
            "contract": "https://storm-charles.promptugal.news/api/v1/README.md",
            "licence": "Our own data: Apache-2.0 (the repository's licence). Quoted sources keep their own terms; each item links its source.",
            "incidents": [
             {
              "id": "2026-11-10-storm-charles",
              "title": "Storm Charles, Lisbon: Wednesday 11 November 2026",
              "status": "open",
              "headline": {
               "text": "Web Summit's Day 3 (Thursday) is running: \"today is officially Web Summit's biggest-ever day\", the organisers say; Wednesday was cancelled",
               "source": "Web Summit on Bluesky (@websummit.bsky.social)",
               "url": "https://bsky.app/profile/websummit.bsky.social/post/3n245iu57wk2i",
               "at": "12 Nov 2026, 09:23 UTC (first posted 09:00:19, deleted and posted again 09:23:34; read 09:46)",
               "label": "fact"
              }
             }
            ]
           },
           "counts": {
            "files": 142,
            "verified": 142,
            "bytes": 5127487,
            "datasets": 39
           },
           "datasets": [
            {
             "dataset": "decisions/addresses",
             "files": 1,
             "bytes": 9694
            },
            {
             "dataset": "decisions/entities",
             "files": 19,
             "bytes": 78139
            },
            {
             "dataset": "decisions/graph",
             "files": 1,
             "bytes": 141918
            }
           ],
           "files": [
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/addresses.json",
             "dataset": "decisions/addresses",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/addresses.json",
             "bytes": 9694,
             "sha256_prefix": "852e9cd1e12e0229",
             "status": 200,
             "verified": true,
             "about": "For each timeline row in signals.json (the new site, made_at 2026-11-11T01:53Z) that had no openable address: the exact public address(es) of its primary source, the time read, and what kind of address it is. Internal records are this team's public repository files; \"withheld\" is by policy. Kept by ..."
            },
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/entities/airport.json",
             "dataset": "decisions/entities",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/entities/airport.json",
             "bytes": 8443,
             "sha256_prefix": "8ca6a86ff4c84a50",
             "status": 200,
             "verified": true,
             "about": "Every decision in graph.json about airport: who decided, when published, when it takes effect, the exact address, the time read, fact or evidence. Generated from graph.json by incident.researcher@web-summit.dinis; graph.json is the source of truth."
            },
            {
             "incident": "2026-11-10-storm-charles",
             "path": "decisions/entities/bridges.json",
             "dataset": "decisions/entities",
             "url": "https://storm-charles.promptugal.news/api/v1/2026-11-10-storm-charles/decisions/entities/bridges.json",
             "bytes": 6508,
             "sha256_prefix": "6b8b7f981de872fc",
             "status": 200,
             "verified": true,
             "about": "Every decision in graph.json about bridges: who decided, when published, when it takes effect, the exact address, the time read, fact or evidence. Generated from graph.json by incident.researcher@web-summit.dinis; graph.json is the source of truth."
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/storm/charles/index.json": {
   "get": {
    "operationId": "get_storm_charles_index",
    "tags": [
     "storm"
    ],
    "summary": "Storm Charles: every file moved from the Storm site",
    "description": "The Storm Charles data (Lisbon and Madeira, 10 to 12 November 2026), moved from storm-charles.promptugal.news to the data site on 18 November 2026. The Storm site is frozen as the record. In this copy every full sha256 value is cut to its first 16 hex (this site's rule); the full values are on the Storm site and in vault j2fq58kn. Five files are held back: see held.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "from": {
           "type": "object",
           "properties": {
            "site": {
             "type": "string"
            },
            "repository": {
             "type": "string"
            },
            "commit": {
             "type": "string"
            },
            "licence": {
             "type": "string"
            }
           },
           "required": [
            "site",
            "repository",
            "commit",
            "licence"
           ]
          },
          "moved_at": {
           "type": "string"
          },
          "moved_by": {
           "type": "string"
          },
          "held": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "why": {
              "type": "string"
             }
            },
            "required": [
             "path",
             "why"
            ]
           }
          },
          "counts": {
           "type": "object",
           "properties": {
            "files": {
             "type": "integer"
            },
            "bytes": {
             "type": "integer"
            }
           },
           "required": [
            "files",
            "bytes"
           ]
          },
          "files": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "path": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "bytes": {
              "type": "integer"
             },
             "about": {
              "type": "string"
             }
            },
            "required": [
             "path",
             "url",
             "bytes",
             "about"
            ]
           }
          },
          "map": {
           "type": "string"
          }
         },
         "required": [
          "about",
          "from",
          "moved_at",
          "moved_by",
          "held",
          "counts",
          "files",
          "map"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "The Storm Charles data (Lisbon and Madeira, 10 to 12 November 2026), moved from storm-charles.promptugal.news to the data site on 18 November 2026. The Storm site is frozen as the record. In this copy every full sha256 value is cut to its first 16 hex (this site's rule); the full values are on the S...",
           "from": {
            "site": "https://storm-charles.promptugal.news/",
            "repository": "https://github.com/PrompTugal/PrompTugal__News__Storm-Charles",
            "commit": "fdac6ed",
            "licence": "Apache-2.0 (the Storm repository); quoted sources keep their own terms"
           },
           "moved_at": "2026-11-18",
           "moved_by": "data.b@PrompTugal.dinis",
           "held": [
            {
             "path": "exposure/lisbon-grid.json",
             "why": "a provenance string in it trips this site's leak scan; served by the Storm site and kept in vault j2fq58kn"
            },
            {
             "path": "exposure/lisbon-municipalities.json",
             "why": "the same"
            },
            {
             "path": "decisions/entities/madeira.json",
             "why": "its quoted text holds an em dash, which this site's wording gate refuses; the quote is not altered here, so the file is served by the Storm site and kept in vault j2fq58kn until Dinis decides"
            }
           ],
           "counts": {
            "files": 151,
            "bytes": 8594575
           },
           "files": [
            {
             "path": "broadcast/coast.json",
             "url": "https://data.promptugal.news/api/v1/storm/charles/broadcast/coast.json",
             "bytes": 45407,
             "about": "The broadcast map's inputs: the wind and pressure field (Open-Meteo, CC BY 4.0) and the coast (Natural Earth, public domain)."
            },
            {
             "path": "broadcast/field.json",
             "url": "https://data.promptugal.news/api/v1/storm/charles/broadcast/field.json",
             "bytes": 101088,
             "about": "The broadcast map's inputs: the wind and pressure field (Open-Meteo, CC BY 4.0) and the coast (Natural Earth, public domain)."
            },
            {
             "path": "decisions/addresses.json",
             "url": "https://data.promptugal.news/api/v1/storm/charles/decisions/addresses.json",
             "bytes": 9694,
             "about": "For each timeline row in signals.json (the new site, made_at 2026-11-11T01:53Z) that had no openable address: the exact public address(es) of its primary source, the time read, and what kind of address it is. Internal records are this team's public repository files; \"withheld\" is by policy. Kept by ..."
            }
           ],
           "map": "https://data.promptugal.news/storm/"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/storm/openapi.json": {
   "get": {
    "operationId": "get_storm_openapi",
    "tags": [
     "storm"
    ],
    "summary": "Storm Charles: OpenAPI for every moved file",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/{source}/reads.json": {
   "get": {
    "operationId": "get_source_reads",
    "tags": [
     "sources"
    ],
    "summary": "Every read of one source, newest first",
    "description": "Each request's address, HTTP status, size and sha256, and whether the bytes changed.",
    "parameters": [
     {
      "name": "source",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "adsb-faro",
        "base-gov-pt",
        "events-pt",
        "ipma-city-forecasts",
        "ipma-fire-risk",
        "ipma-observations",
        "ipma-sea",
        "ipma-uv",
        "ipma-warnings",
        "meteoalarm-pt",
        "social"
       ]
      },
      "example": "adsb-faro"
     }
    ],
    "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": [
                  "boolean",
                  "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/adsb-faro/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": "adsb-faro",
           "runs": [
            {
             "at": "2026-11-18T16:30:05Z",
             "finished": "2026-11-18T16:30:06Z",
             "ok": 1,
             "failed": 0,
             "reads": [
              {
               "name": "point-lpfr",
               "url": "https://api.adsb.lol/v2/point/37.0144/-7.9659/40",
               "at": "2026-11-18T16:30:05Z",
               "status": 200,
               "bytes": 3524,
               "sha256_prefix": "8b3a03427946dbd1",
               "changed": true
              }
             ]
            },
            {
             "at": "2026-11-18T16:11:23Z",
             "finished": "2026-11-18T16:11:32Z",
             "ok": 1,
             "failed": 0,
             "reads": [
              {
               "name": "point-lpfr",
               "url": "https://api.adsb.lol/v2/point/37.0144/-7.9659/40",
               "at": "2026-11-18T16:11:23Z",
               "status": 200,
               "bytes": 3570,
               "sha256_prefix": "521f6b5129224118",
               "changed": true
              }
             ]
            },
            {
             "at": "2026-11-18T16:07:40Z",
             "finished": "2026-11-18T16:07:41Z",
             "ok": 1,
             "failed": 0,
             "reads": [
              {
               "name": "point-lpfr",
               "url": "https://api.adsb.lol/v2/point/37.0144/-7.9659/40",
               "at": "2026-11-18T16:07:40Z",
               "status": 200,
               "bytes": 781,
               "sha256_prefix": "ef9ee40a145fe783",
               "changed": true
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/{source}/card.json": {
   "get": {
    "operationId": "get_source_card",
    "tags": [
     "sources"
    ],
    "summary": "One source's card",
    "description": "Publisher, reuse terms, schedule, owner, what runs by code, agents and people, cost, vault.",
    "parameters": [
     {
      "name": "source",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "adsb-faro",
        "base-gov-pt",
        "events-pt",
        "ipma-city-forecasts",
        "ipma-fire-risk",
        "ipma-observations",
        "ipma-sea",
        "ipma-uv",
        "ipma-warnings",
        "meteoalarm-pt",
        "social",
        "storm-charles-archive"
       ]
      },
      "example": "adsb-faro"
     }
    ],
    "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"
          },
          "collector": {
           "type": "string"
          },
          "source_home": {
           "type": "string",
           "format": "uri"
          },
          "reader_page": {
           "type": "string",
           "format": "uri"
          },
          "schedule": {
           "type": "object",
           "properties": {
            "cadence": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "cadence",
            "how"
           ]
          },
          "terms": {
           "type": "object",
           "properties": {
            "summary": {
             "type": "string"
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "read_at": {
             "type": "string",
             "format": "date"
            },
            "quote": {
             "type": "string"
            },
            "quote_lang": {
             "type": "string"
            },
            "republish": {
             "type": "string"
            },
            "privacy": {
             "type": "string"
            },
            "robots": {
             "type": "string"
            },
            "open_question": {
             "type": "string"
            },
            "read_by": {
             "type": "string"
            }
           },
           "required": [
            "summary",
            "page",
            "read_at",
            "republish"
           ]
          },
          "api": {
           "type": "object",
           "properties": {
            "latest": {
             "type": "string",
             "format": "uri"
            },
            "reads": {
             "type": "string",
             "format": "uri"
            },
            "card": {
             "type": "string",
             "format": "uri"
            },
            "openapi": {
             "type": "string",
             "format": "uri"
            },
            "page": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "latest",
            "reads",
            "card",
            "openapi",
            "page"
           ]
          },
          "vault": {
           "type": [
            "object",
            "null"
           ],
           "properties": {
            "id": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "endpoint": {
             "type": "string",
             "format": "uri"
            },
            "read_key": {
             "type": "string"
            },
            "clone": {
             "type": "string"
            },
            "layout": {
             "type": "string"
            },
            "note": {
             "type": "string"
            },
            "created": {
             "type": "string",
             "format": "date"
            },
            "by": {
             "type": "string"
            }
           },
           "required": [
            "id",
            "name",
            "endpoint",
            "read_key",
            "clone",
            "layout",
            "note",
            "created",
            "by"
           ]
          },
          "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",
           "format": "date"
          }
         },
         "required": [
          "id",
          "title",
          "what",
          "publisher",
          "owner",
          "collector",
          "source_home",
          "reader_page",
          "schedule",
          "terms",
          "api",
          "split",
          "cost",
          "since"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "id": "adsb-faro",
           "title": "Flights around Faro airport",
           "what": "Aircraft seen within 40 nautical miles of Faro airport: airline flights by callsign, airline and type; every other aircraft only counted.",
           "publisher": "adsb.lol (community ADS-B receivers)",
           "owner": "data@PrompTugal.dinis",
           "collector": "sources/adsb-faro/collect.mjs",
           "source_home": "https://api.adsb.lol/v2/point/37.0144/-7.9659/40",
           "reader_page": "https://globe.adsb.lol/?lat=37.014&lon=-7.966&zoom=9",
           "schedule": {
            "cadence": "hourly",
            "how": "the Pages workflow (.github/workflows/pages.yml), on a schedule at 17 minutes past each hour, and on every push to dev"
           },
           "terms": {
            "summary": "adsb.lol: its API data is licensed under the Open Database License (ODbL 1.0): share-alike, with attribution; no key needed up to 500 requests a day per address.",
            "page": "https://www.adsb.lol/docs/open-data/api/",
            "read_at": "2026-11-17",
            "quote": "license: ODbL 1.0 ... no key: 500 requests/day per IP",
            "quote_lang": "en",
            "republish": "yes, under ODbL 1.0 (attribution, share-alike for the database)",
            "privacy": "Our own rule, from the storm site: only airline callsigns are kept; other aircraft (private, military, unidentified) are counted, never listed."
           },
           "api": {
            "latest": "https://data.promptugal.news/api/v1/adsb-faro/latest.json",
            "reads": "https://data.promptugal.news/api/v1/adsb-faro/reads.json",
            "card": "https://data.promptugal.news/api/v1/adsb-faro/card.json",
            "openapi": "https://data.promptugal.news/api/v1/adsb-faro/openapi.json",
            "page": "https://data.promptugal.news/sources/adsb-faro/"
           },
           "vault": {
            "id": "sd1fblzs",
            "name": "promptugal-data-adsb-faro",
            "endpoint": "https://dev.send.sgraph.ai",
            "read_key": "sgit_public_read_dd88c305ed7763ba851800f41315e623d8e0443da1a10f80f4128ef9b1c58863",
            "clone": "sgit clone sgit_public_read_dd88c305ed7763ba851800f41315e623d8e0443da1a10f80f4128ef9b1c58863:sd1fblzs",
            "layout": "latest/<file> (the bytes as received, overwritten each run), <yyyy>/<mm>/<dd>/<hh>/<file>-<hhmmss>.json (a dated copy only when the bytes changed), latest/reads.json",
            "note": "Public read key: the source is public, so anyone may read the vault. A read key is derived one way and cannot write. The write key is never in this repository.",
            "created": "2026-11-17",
            "by": "data@PrompTugal.dinis"
           },
           "split": {
            "code": [
             "the collector reads the source and writes latest.json, reads.json and the vault copy",
             "GitHub Actions runs it every hour and deploys the site",
             "the build makes the API, the OpenAPI description and the pages"
            ],
            "agents": [
             "data@PrompTugal.dinis (Opus) wrote the collector, this card and the pages on 17 November 2026; data.dev@ and data.design@ (Sonnet) wrote parts of the site build and the design variations"
            ],
            "people": [
             "Dinis Cruz instructs; no person has checked the values yet (not reviewed)"
            ]
           },
           "cost": {
            "per_run_tokens": 0,
            "per_run_model_cost_usd": 0,
            "runner": "GitHub Actions on a public repository: no charge (GitHub's terms for public repositories); about 3 minutes a run for all sources together (measured locally, 17 November 2026)",
            "build_tokens": "not measured: accountant@'s ledger is not running on this account; to be added when it is",
            "note": "Code only: no model is called when the data is collected."
           },
           "since": "2026-11-17"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/{source}/openapi.json": {
   "get": {
    "operationId": "get_source_openapi",
    "tags": [
     "sources"
    ],
    "summary": "OpenAPI document for one source",
    "parameters": [
     {
      "name": "source",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "adsb-faro",
        "base-gov-pt",
        "events-pt",
        "ipma-city-forecasts",
        "ipma-fire-risk",
        "ipma-observations",
        "ipma-sea",
        "ipma-uv",
        "ipma-warnings",
        "meteoalarm-pt",
        "social",
        "storm-charles-archive"
       ]
      },
      "example": "adsb-faro"
     }
    ],
    "responses": {
     "200": {
      "description": "The document",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/by-place/now/index.json": {
   "get": {
    "operationId": "get_by_place_index",
    "tags": [
     "by-place"
    ],
    "summary": "The places that have a now file",
    "description": "The places that have a \"now\" file: each combines the nearest IPMA values from this site's collected sources, with the source and the time read on every value. Not a warning service: follow IPMA and ANEPC.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "read_at": {
              "type": "string"
             }
            },
            "required": [
             "id",
             "name",
             "url",
             "read_at"
            ]
           }
          }
         },
         "required": [
          "about",
          "read_at",
          "places"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "The places that have a \"now\" file: each combines the nearest IPMA values from this site's collected sources, with the source and the time read on every value. Not a warning service: follow IPMA and ANEPC.",
           "read_at": "2026-11-18T16:32:56Z",
           "places": [
            {
             "id": "albufeira",
             "name": "albufeira",
             "url": "https://data.promptugal.news/api/v1/by-place/now/albufeira.json",
             "read_at": "2026-11-18T16:32:56Z"
            },
            {
             "id": "alcoutim",
             "name": "alcoutim",
             "url": "https://data.promptugal.news/api/v1/by-place/now/alcoutim.json",
             "read_at": "2026-11-18T16:32:56Z"
            },
            {
             "id": "algarve",
             "name": "algarve",
             "url": "https://data.promptugal.news/api/v1/by-place/now/algarve.json",
             "read_at": "2026-11-18T16:32:56Z"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/by-place/now/{place}.json": {
   "get": {
    "operationId": "get_by_place_now",
    "tags": [
     "by-place"
    ],
    "summary": "Now in one place",
    "description": "Now in this place, from IPMA's open data and (for Faro) adsb.lol, as collected by data.promptugal.news: each value with its source and the time read. Not a warning service: follow IPMA (https://www.ipma.pt/) and ANEPC.",
    "parameters": [
     {
      "name": "place",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "albufeira",
        "alcoutim",
        "algarve",
        "aljezur",
        "castro-marim",
        "faro",
        "lagoa",
        "lagos",
        "loule",
        "monchique",
        "olhao",
        "portimao",
        "quarteira",
        "sao-bras-de-alportel",
        "silves",
        "tavira",
        "vila-do-bispo",
        "vila-real-de-santo-antonio"
       ]
      },
      "example": "albufeira"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "place": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "by": {
           "type": "string"
          },
          "about": {
           "type": "string"
          },
          "station": {
           "type": "object",
           "properties": {
            "name": {
             "type": "string"
            },
            "id": {
             "type": "integer"
            },
            "km": {
             "type": "integer"
            },
            "reading": {
             "type": [
              "null",
              "object"
             ],
             "properties": {
              "at": {
               "type": "string"
              },
              "temp_c": {
               "type": [
                "number",
                "null"
               ]
              },
              "humidity_pct": {
               "type": [
                "integer",
                "null"
               ]
              },
              "wind_kmh": {
               "type": [
                "number",
                "null"
               ]
              },
              "wind_dir_id": {
               "type": "integer"
              },
              "rain_mm": {
               "type": [
                "integer",
                "null"
               ]
              },
              "pressure_hpa": {
               "type": [
                "number",
                "null"
               ]
              },
              "radiation_kj_m2": {
               "type": [
                "null",
                "number"
               ]
              }
             },
             "required": [
              "at",
              "temp_c",
              "humidity_pct",
              "wind_kmh",
              "wind_dir_id",
              "rain_mm",
              "pressure_hpa",
              "radiation_kj_m2"
             ]
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "name",
            "id",
            "km",
            "reading",
            "page",
            "source"
           ]
          },
          "forecast": {
           "type": "object",
           "properties": {
            "place": {
             "type": "string"
            },
            "id": {
             "type": "integer"
            },
            "km": {
             "type": "integer"
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "days": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "date": {
                "type": "string",
                "format": "date"
               },
               "t_min_c": {
                "type": "number"
               },
               "t_max_c": {
                "type": "number"
               },
               "rain_prob_pct": {
                "type": "integer"
               },
               "weather_type": {
                "type": "integer"
               }
              },
              "required": [
               "date",
               "t_min_c",
               "t_max_c",
               "rain_prob_pct",
               "weather_type"
              ]
             }
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "place",
            "id",
            "km",
            "page",
            "days",
            "source"
           ]
          },
          "warnings": {
           "type": "object",
           "properties": {
            "area": {
             "type": "string"
            },
            "active": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "type": {
                "type": "string"
               },
               "type_pt": {
                "type": "string"
               },
               "level": {
                "type": "string"
               },
               "start": {
                "type": "string"
               },
               "end": {
                "type": "string"
               },
               "text": {
                "type": "string"
               }
              },
              "required": [
               "type",
               "type_pt",
               "level",
               "start",
               "end",
               "text"
              ]
             }
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "area",
            "active",
            "page",
            "source"
           ]
          },
          "fire_risk": {
           "type": "object",
           "properties": {
            "municipality": {
             "type": "string"
            },
            "days": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "date": {
                "type": "string",
                "format": "date"
               },
               "level": {
                "type": "string"
               }
              },
              "required": [
               "date",
               "level"
              ]
             }
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "municipality",
            "days",
            "page",
            "source"
           ]
          },
          "uv": {
           "type": "object",
           "properties": {
            "place": {
             "type": "string"
            },
            "date": {
             "type": "string",
             "format": "date"
            },
            "index": {
             "type": "number"
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "place",
            "date",
            "index",
            "page",
            "source"
           ]
          },
          "sea": {
           "type": [
            "object",
            "null"
           ],
           "properties": {
            "coast": {
             "type": "string"
            },
            "date": {
             "type": "string",
             "format": "date"
            },
            "waves_max_m": {
             "type": "number"
            },
            "sea_max_m": {
             "type": "number"
            },
            "sea_temp_max_c": {
             "type": "number"
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            }
           },
           "required": [
            "coast",
            "date",
            "waves_max_m",
            "sea_max_m",
            "sea_temp_max_c",
            "page",
            "source"
           ]
          },
          "airport": {
           "type": [
            "null",
            "object"
           ],
           "properties": {
            "icao": {
             "type": "string"
            },
            "name": {
             "type": "string"
            },
            "within_nm": {
             "type": "integer"
            },
            "at": {
             "type": "string"
            },
            "airline": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "callsign": {
                "type": "string"
               },
               "airline": {
                "type": "string"
               },
               "type": {
                "type": "string"
               },
               "alt_ft": {
                "type": "integer"
               },
               "on_ground": {
                "type": "boolean"
               },
               "ground_speed_kt": {
                "type": "number"
               }
              },
              "required": [
               "callsign",
               "airline",
               "type",
               "alt_ft",
               "on_ground",
               "ground_speed_kt"
              ]
             }
            },
            "other_aircraft": {
             "type": "integer"
            },
            "page": {
             "type": "string",
             "format": "uri"
            },
            "source": {
             "type": "string",
             "format": "uri"
            },
            "note": {
             "type": "string"
            }
           },
           "required": [
            "icao",
            "name",
            "within_nm",
            "at",
            "airline",
            "other_aircraft",
            "page",
            "source",
            "note"
           ]
          },
          "reads": {
           "type": "object",
           "properties": {
            "observations": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "warnings": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "forecasts": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "fire-risk": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "uv": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "sea": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            },
            "adsb": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string",
               "format": "uri"
              },
              "at": {
               "type": "string"
              },
              "status": {
               "type": "integer"
              }
             },
             "required": [
              "url",
              "at",
              "status"
             ]
            }
           },
           "required": [
            "observations",
            "warnings",
            "forecasts",
            "fire-risk",
            "uv",
            "sea",
            "adsb"
           ]
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "place": {
              "type": "string"
             },
             "station": {
              "type": "string"
             },
             "temp_c": {
              "type": [
               "number",
               "null"
              ]
             }
            },
            "required": [
             "place",
             "station",
             "temp_c"
            ]
           }
          }
         },
         "required": [
          "place",
          "read_at",
          "by",
          "about",
          "warnings",
          "airport",
          "reads"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "place": "albufeira",
           "read_at": "2026-11-18T16:32:56Z",
           "by": "collect/by-place-now.mjs (code, no model; data@PrompTugal.dinis), from this site's collected sources",
           "about": "Now in this place, from IPMA's open data and (for Faro) adsb.lol, as collected by data.promptugal.news: each value with its source and the time read. Not a warning service: follow IPMA (https://www.ipma.pt/) and ANEPC.",
           "station": {
            "name": "Albufeira",
            "id": 1210874,
            "km": 1,
            "reading": null,
            "page": "https://www.ipma.pt/en/otempo/obs.superficie/",
            "source": "https://api.ipma.pt/open-data/observation/meteorology/stations/observations.json"
           },
           "forecast": {
            "place": "Loulé",
            "id": 1080800,
            "km": 21,
            "page": "https://www.ipma.pt/en/otempo/prev.localidade.hora/",
            "days": [
             {
              "date": "2026-11-18",
              "t_min_c": 17.7,
              "t_max_c": 20.5,
              "rain_prob_pct": 100,
              "weather_type": 10
             },
             {
              "date": "2026-11-19",
              "t_min_c": 10.6,
              "t_max_c": 19.5,
              "rain_prob_pct": 8,
              "weather_type": 2
             },
             {
              "date": "2026-11-20",
              "t_min_c": 9.7,
              "t_max_c": 18.7,
              "rain_prob_pct": 0,
              "weather_type": 3
             }
            ],
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/cities/daily/1080800.json"
           },
           "warnings": {
            "area": "FAR (the Faro district)",
            "active": [
             {
              "type": "rough sea",
              "type_pt": "Agitação Marítima",
              "level": "yellow",
              "start": "2026-11-18T13:15:00",
              "end": "2026-11-20T09:00:00",
              "text": "Na costa Ocidental, ondas de noroeste com 4 a 5 metros."
             }
            ],
            "page": "https://www.ipma.pt/en/otempo/prev-sam/",
            "source": "https://api.ipma.pt/open-data/forecast/warnings/warnings_www.json"
           },
           "fire_risk": {
            "municipality": "0801",
            "days": [
             {
              "date": "2026-11-18",
              "level": "low"
             },
             {
              "date": "2026-11-19",
              "level": "low"
             },
             {
              "date": "2026-11-20",
              "level": "low"
             }
            ],
            "page": "https://www.ipma.pt/en/riscoincendio/rcm.pt/",
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/rcm/rcm-d0.json"
           },
           "uv": {
            "place": "Faro",
            "date": "2026-11-22",
            "index": 3,
            "page": "https://www.ipma.pt/en/otempo/prev.uv/",
            "source": "https://api.ipma.pt/open-data/forecast/meteorology/uv/uv.json"
           },
           "sea": {
            "coast": "Faro coast",
            "date": "2026-11-18",
            "waves_max_m": 1,
            "sea_max_m": 1.5,
            "sea_temp_max_c": 19.8,
            "page": "https://www.ipma.pt/en/maritima/costeira/",
            "source": "https://api.ipma.pt/open-data/forecast/oceanography/daily/hp-daily-sea-forecast-day0.json"
           },
           "airport": null,
           "reads": {
            "observations": {
             "url": "https://data.promptugal.news/api/v1/ipma-observations/latest.json",
             "at": "2026-11-18T16:32:08Z",
             "status": 200
            },
            "warnings": {
             "url": "https://data.promptugal.news/api/v1/ipma-warnings/latest.json",
             "at": "2026-11-18T16:32:26Z",
             "status": 200
            },
            "forecasts": {
             "url": "https://data.promptugal.news/api/v1/ipma-city-forecasts/latest.json",
             "at": "2026-11-18T16:30:33Z",
             "status": 200
            },
            "fire-risk": {
             "url": "https://data.promptugal.news/api/v1/ipma-fire-risk/latest.json",
             "at": "2026-11-18T16:32:01Z",
             "status": 200
            },
            "uv": {
             "url": "https://data.promptugal.news/api/v1/ipma-uv/latest.json",
             "at": "2026-11-18T16:32:23Z",
             "status": 200
            },
            "sea": {
             "url": "https://data.promptugal.news/api/v1/ipma-sea/latest.json",
             "at": "2026-11-18T16:32:14Z",
             "status": 200
            },
            "adsb": {
             "url": "https://data.promptugal.news/api/v1/adsb-faro/latest.json",
             "at": "2026-11-18T16:30:05Z",
             "status": 200
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/events/by-place/index.json": {
   "get": {
    "operationId": "get_events_by_place_index",
    "tags": [
     "events"
    ],
    "summary": "The places that have an events file",
    "description": "Events per place: each a schema.org Event with its source and the time read, from official agendas and organisers' own public feeds (see the events-pt card). Not eventbrite, lu.ma, luma.com or meetup.com.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "events": {
              "type": "integer"
             },
             "read_at": {
              "type": "string"
             }
            },
            "required": [
             "id",
             "url",
             "events",
             "read_at"
            ]
           }
          }
         },
         "required": [
          "about",
          "read_at",
          "places"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "Events per place: each a schema.org Event with its source and the time read, from official agendas and organisers' own public feeds (see the events-pt card). Not eventbrite, lu.ma, luma.com or meetup.com.",
           "read_at": "2026-11-18T16:32:56Z",
           "places": [
            {
             "id": "albufeira",
             "url": "https://data.promptugal.news/api/v1/events/by-place/albufeira.json",
             "events": 0,
             "read_at": "2026-11-18T16:32:56Z"
            },
            {
             "id": "alcoutim",
             "url": "https://data.promptugal.news/api/v1/events/by-place/alcoutim.json",
             "events": 0,
             "read_at": "2026-11-18T16:32:56Z"
            },
            {
             "id": "algarve",
             "url": "https://data.promptugal.news/api/v1/events/by-place/algarve.json",
             "events": 141,
             "read_at": "2026-11-18T16:32:56Z"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/events/by-place/{place}.json": {
   "get": {
    "operationId": "get_events_by_place",
    "tags": [
     "events"
    ],
    "summary": "Events in one place",
    "description": "Upcoming and ongoing events in the place, each a schema.org Event with source and read_at.",
    "parameters": [
     {
      "name": "place",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "albufeira",
        "alcoutim",
        "algarve",
        "aljezur",
        "castro-marim",
        "faro",
        "lagoa",
        "lagos",
        "lisboa",
        "loule",
        "monchique",
        "olhao",
        "portimao",
        "quarteira",
        "sao-bras-de-alportel",
        "silves",
        "tavira",
        "vila-do-bispo",
        "vila-real-de-santo-antonio"
       ]
      },
      "example": "algarve"
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "place": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "source_read_at": {
           "type": "string"
          },
          "by": {
           "type": "string"
          },
          "about": {
           "type": "string"
          },
          "source_note": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "events": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "@type": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "startDate": {
              "type": "string"
             },
             "endDate": {
              "type": [
               "string",
               "null"
              ],
              "format": "date"
             },
             "location": {
              "type": "object",
              "properties": {
               "@type": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "address": {
                "type": "null"
               },
               "geo": {
                "type": "null"
               }
              },
              "required": [
               "@type",
               "name",
               "address",
               "geo"
              ]
             },
             "organizer": {
              "type": "null"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "source": {
              "type": "string",
              "format": "uri"
             },
             "read_at": {
              "type": "string"
             },
             "place": {
              "type": "string"
             }
            },
            "required": [
             "@type",
             "name",
             "startDate",
             "endDate",
             "location",
             "organizer",
             "url",
             "source",
             "read_at",
             "place"
            ]
           }
          }
         },
         "required": [
          "place",
          "read_at",
          "source_read_at",
          "by",
          "about",
          "source_note",
          "count",
          "events"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "place": "algarve",
           "read_at": "2026-11-18T16:32:56Z",
           "source_read_at": "2026-11-18T16:30:08Z",
           "by": "collect/events-by-place.mjs (code, no model; data.b@PrompTugal.dinis), from data/events-pt/latest.json",
           "about": "Public events on now or starting within 60 days in this place, as schema.org Event records, each with its source URL and the time read. A dated record, not a ticketing service. An empty list means no source covers this place yet, not that nothing is happening.",
           "source_note": "Read 2026-11-18T16:30:08Z from www.agendalx.pt and www.cm-lagos.pt and teatrodasfiguras.pt and cm-tavira.pt; sources with no feed or refused are in gaps (https://data.promptugal.news/api/v1/events-pt/latest.json). Terms: Strictest of the sources: no reuse licence or terms page was found for any of t...",
           "count": 141,
           "events": [
            {
             "@type": "Event",
             "name": "EXPOSIÇÃO “O CRUZEIRO”, de Timo Dillner",
             "startDate": "2026-10-03",
             "endDate": "2026-12-30",
             "location": {
              "@type": "Place",
              "name": "Centro Cultural de Lagos – Sala de Exposições 1",
              "address": null,
              "geo": null
             },
             "organizer": null,
             "url": "https://www.cm-lagos.pt/municipio/eventos/16100-exposição-“o-cruzeiro”,-de-timo-dillner",
             "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
             "read_at": "2026-11-18T16:30:17Z",
             "place": "lagos"
            },
            {
             "@type": "Event",
             "name": "CLUBE DA CIÊNCIA",
             "startDate": "2026-10-07",
             "endDate": "2026-12-05",
             "location": {
              "@type": "Place",
              "name": "Centro Ciência Viva de Lagos",
              "address": null,
              "geo": null
             },
             "organizer": null,
             "url": "https://www.cm-lagos.pt/municipio/eventos/16162-clube-da-ciência_16162",
             "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
             "read_at": "2026-11-18T16:30:17Z",
             "place": "lagos"
            },
            {
             "@type": "Event",
             "name": "WORKSHOPS NO ESPAÇO JOVEM – ESCULTURA EM PLÁSTICO",
             "startDate": "2026-10-31",
             "endDate": "2026-11-22",
             "location": {
              "@type": "Place",
              "name": "Espaço Jovem do Município de Lagos – Ateliê de Expressão Plástica (salas 403 e 405)",
              "address": null,
              "geo": null
             },
             "organizer": null,
             "url": "https://www.cm-lagos.pt/municipio/eventos/16149-workshops-no-espaço-jovem-–-escultura-em-plástico",
             "source": "https://www.cm-lagos.pt/municipio/eventos (Camara Municipal de Lagos, events list page)",
             "read_at": "2026-11-18T16:30:17Z",
             "place": "lagos"
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  }
 },
 "tags": [
  {
   "name": "events",
   "description": "Events per place"
  },
  {
   "name": "meta",
   "description": "The catalogue, the contract and this document"
  },
  {
   "name": "sources",
   "description": "Files every source has, by source id"
  },
  {
   "name": "by-place",
   "description": "Algarve places, now"
  },
  {
   "name": "storm",
   "description": "Storm Charles (10 to 12 November 2026): the Storm site's data, moved here"
  },
  {
   "name": "adsb-faro",
   "description": "Aircraft seen within 40 nautical miles of Faro airport: airline flights by callsign, airline and type; every other aircraft only counted."
  },
  {
   "name": "base-gov-pt",
   "description": "Public contracts of the câmaras municipais of Lisboa and the Algarve's 16 municipalities, as contracting entity: object, contractors that are companies, price, dates and procedure, for the last 90 days."
  },
  {
   "name": "events-pt",
   "description": "Public events on now or in the next 60 days in Lisbon and the Algarve places, as schema.org Event records, each with its source URL and the time read."
  },
  {
   "name": "ipma-city-forecasts",
   "description": "Five-day forecasts (minimum and maximum temperature, chance of rain, weather type, wind) for each district capital and island, and Loulé, Portimão and Sagres."
  },
  {
   "name": "ipma-fire-risk",
   "description": "The daily fire risk class (RCM, low to maximum) for every municipality of mainland Portugal, today and the next two days."
  },
  {
   "name": "ipma-observations",
   "description": "The latest hourly observation of each IPMA surface station: temperature, humidity, wind, rain, pressure and radiation, with the station's name and position."
  },
  {
   "name": "ipma-sea",
   "description": "Wave height, period and direction, total sea and sea temperature for each coastal place, today and the next two days."
  },
  {
   "name": "ipma-uv",
   "description": "The UV index forecast by place and day."
  },
  {
   "name": "ipma-warnings",
   "description": "The weather warnings for every warning area of Portugal (the 18 mainland districts, Madeira and the Azores): yellow, orange and red in full, green counted."
  },
  {
   "name": "meteoalarm-pt",
   "description": "Every CAP warning message in MeteoAlarm's Portugal feed, one line each: area, hazard, level, onset, expiry, time of issue and text, with what appeared or left since the read before."
  },
  {
   "name": "social",
   "description": "Links to recent public posts by the official accounts of organisations (câmaras, public bodies, venues, organisers, news outlets, companies) on Bluesky and Mastodon, with metadata only: account, time, matched topics and places, language, media or not. No post text or media is stored."
  },
  {
   "name": "storm-charles-archive",
   "description": "The data files behind storm-charles.promptugal.news (Lisbon and Madeira, 10 to 12 November 2026): decisions, exposure, flights, transport, weather and the signal timeline, every file with its size and sha256, checked against the bytes served."
  }
 ],
 "x-generated": {
  "by": "scripts/build/api.mjs (data.dev@PrompTugal.dinis)",
  "built_at": "2026-11-18T16:32:56.422Z"
 }
}
