{
 "openapi": "3.1.0",
 "info": {
  "title": "London road disruptions (TfL): data.promptugal.news",
  "version": "v0.1.151",
  "description": "Works, incidents and closures on London's roads as TfL lists them: severity, category, place, TfL's description and the period.\n\nPublisher: Transport for London (TfL), Unified API. Reuse terms: TfL's Transport Data Service terms (based on the Open Government Licence v2.0 with TfL amendments): free to copy, publish, distribute, transmit and adapt the information and to exploit it commercially and non-commercially; credit \"Powered by TfL Open Data\"; at most 500 calls a minute per feed; no implied endorsement. Not a warning service: follow IPMA and ANEPC.\n\nCode: Apache-2.0. Text: CC BY 4.0. The data keeps the terms of its own source (see each source card); nothing here relaxes them.",
  "license": {
   "name": "Apache-2.0 for code; each source keeps its own data terms",
   "identifier": "Apache-2.0"
  },
  "contact": {
   "name": "PrompTugal.news data",
   "url": "https://github.com/PrompTugal/PrompTugal__News__Data"
  }
 },
 "servers": [
  {
   "url": "https://data.promptugal.news",
   "description": "Production"
  }
 ],
 "externalDocs": {
  "description": "How to use the API",
  "url": "https://data.promptugal.news/api/"
 },
 "paths": {
  "/api/v1/tfl-road-disruptions/latest.json": {
   "get": {
    "operationId": "get_tfl_road_disruptions_latest",
    "tags": [
     "tfl-road-disruptions"
    ],
    "summary": "London road disruptions (TfL): the latest read",
    "description": "Works, incidents and closures on London's roads as Transport for London listed them at the read: severity, category, place, TfL's description and the period. Collected once a day as the archive; the page shows the live list read in your browser from TfL.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "source": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "read_at": {
           "type": "string"
          },
          "provenance": {
           "type": "object",
           "properties": {
            "source": {
             "type": "string"
            },
            "page": {
             "type": "string"
            },
            "read_at": {
             "type": "string"
            },
            "by": {
             "type": "string"
            },
            "terms": {
             "type": "string"
            },
            "api": {
             "type": "string"
            }
           },
           "required": [
            "source",
            "page",
            "read_at",
            "by",
            "terms",
            "api"
           ]
          },
          "country": {
           "type": "string"
          },
          "place": {
           "type": "string"
          },
          "about": {
           "type": "string"
          },
          "live": {
           "type": "object",
           "properties": {
            "url": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "url",
            "how"
           ]
          },
          "attribution": {
           "type": "string"
          },
          "counts": {
           "type": "object",
           "properties": {
            "disruptions": {
             "type": "integer"
            },
            "with_closures": {
             "type": "integer"
            },
            "by_severity": {
             "type": "object",
             "properties": {
              "Minimal": {
               "type": "integer"
              },
              "Moderate": {
               "type": "integer"
              },
              "No impact": {
               "type": "integer"
              }
             },
             "required": [
              "Minimal",
              "Moderate",
              "No impact"
             ]
            },
            "by_category": {
             "type": "object",
             "properties": {
              "Works": {
               "type": "integer"
              },
              "Emergency service incidents": {
               "type": "integer"
              },
              "Asset issues": {
               "type": "integer"
              },
              "Collisions": {
               "type": "integer"
              },
              "Weather": {
               "type": "integer"
              }
             },
             "required": [
              "Works",
              "Emergency service incidents",
              "Asset issues",
              "Collisions",
              "Weather"
             ]
            },
            "fields_dropped_wording": {
             "type": "integer"
            }
           },
           "required": [
            "disruptions",
            "with_closures",
            "by_severity",
            "by_category",
            "fields_dropped_wording"
           ]
          },
          "disruptions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "severity": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "sub_category": {
              "type": "string"
             },
             "status": {
              "type": "string"
             },
             "level_of_interest": {
              "type": "string"
             },
             "closures": {
              "type": "boolean"
             },
             "location": {
              "type": "string"
             },
             "description": {
              "type": "string"
             },
             "current_update": {
              "type": "string"
             },
             "updated": {
              "type": "string"
             },
             "start": {
              "type": "string"
             },
             "end": {
              "type": "string"
             },
             "lon": {
              "type": "number"
             },
             "lat": {
              "type": "number"
             },
             "corridors": {
              "type": "array",
              "items": {
               "type": "string"
              }
             }
            },
            "required": [
             "id",
             "severity",
             "category",
             "sub_category",
             "status",
             "level_of_interest",
             "closures",
             "location",
             "description",
             "current_update",
             "updated",
             "start",
             "end",
             "lon",
             "lat",
             "corridors"
            ]
           }
          }
         },
         "required": [
          "source",
          "title",
          "read_at",
          "provenance",
          "country",
          "place",
          "about",
          "live",
          "attribution",
          "counts",
          "disruptions"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "source": "tfl-road-disruptions",
           "title": "London road disruptions (TfL)",
           "read_at": "2026-11-21T09:20:35Z",
           "provenance": {
            "source": "https://api.tfl.gov.uk/",
            "page": "https://api-portal.tfl.gov.uk/",
            "read_at": "2026-11-21T09:20:35Z",
            "by": "sources/tfl-road-disruptions/collect.mjs (code, no model; run by data.b@PrompTugal.dinis)",
            "terms": "TfL's Transport Data Service terms (based on the Open Government Licence v2.0 with TfL amendments): free to copy, publish, distribute, transmit and adapt the information and to exploit it commercially and non-commercially; credit \"Powered by TfL Open Data\"; at most 500 calls a minute per feed; no im...",
            "api": "https://api.tfl.gov.uk/Road/all/Disruption"
           },
           "country": "GB",
           "place": "london",
           "about": "Works, incidents and closures on London's roads as Transport for London listed them at the read: severity, category, place, TfL's description and the period. Collected once a day as the archive; the page shows the live list read in your browser from TfL.",
           "live": {
            "url": "https://api.tfl.gov.uk/Road/all/Disruption",
            "how": "the page asks TfL for this address when it opens; TfL allows browser reads (CORS *)"
           },
           "attribution": "Powered by TfL Open Data",
           "counts": {
            "disruptions": 112,
            "with_closures": 0,
            "by_severity": {
             "Minimal": 101,
             "Moderate": 8,
             "No impact": 3
            },
            "by_category": {
             "Works": 107,
             "Emergency service incidents": 1,
             "Asset issues": 2,
             "Collisions": 1,
             "Weather": 1
            },
            "fields_dropped_wording": 0
           },
           "disruptions": [
            {
             "id": "TIMS-224034",
             "severity": "Minimal",
             "category": "Works",
             "sub_category": "Borough works",
             "status": "Active",
             "level_of_interest": "Medium",
             "closures": false,
             "location": "[A3031] ALBERT BRIDGE ROAD (SW11 ,SW3 ) (Kensington & Chelsea,Wandsworth)",
             "description": "[A3031] Albert Bridge Road (Both directions) at the junction of [A3212] Chelsea Embankment - The bridge is closed to facilitate local borough works.",
             "current_update": "Use an alternative route. There are no reported delays on diversion.",
             "updated": "2026-11-21T08:47:31Z",
             "start": "2026-09-23T04:45:00Z",
             "end": "2027-02-28T23:59:00Z",
             "lon": -0.16722,
             "lat": 51.48322,
             "corridors": []
            },
            {
             "id": "TIMS-238466",
             "severity": "Minimal",
             "category": "Emergency service incidents",
             "sub_category": "Police activity",
             "status": "Active",
             "level_of_interest": "Medium",
             "closures": false,
             "location": "[A13] NEWHAM WAY (E6 ,IG11 ) (Newham)",
             "description": "[A13] Newham Way (Eastbound) between Beckton Alps and Newham Way. - Lane one (of four) blocked due to an emergency's services incident.",
             "current_update": "Approach with caution. Traffic is flowing well.",
             "updated": "2026-11-21T08:46:54Z",
             "start": "2026-11-21T08:46:53Z",
             "end": "2026-11-21T23:59:59Z",
             "lon": 0.06547,
             "lat": 51.52273,
             "corridors": [
              "a13",
              "a406"
             ]
            },
            {
             "id": "TIMS-238465",
             "severity": "Moderate",
             "category": "Works",
             "sub_category": "Construction activity",
             "status": "Active",
             "level_of_interest": "High",
             "closures": false,
             "location": "[A300] SOUTHWARK BRIDGE (EC4R ,SE1 ) (City of London,Southwark)",
             "description": "[A300] Southwark Bridge (Both directions) between [A300] Southwark Bridge Road and [A300] Queen Street Place - The bridge is closed due to crane operation.",
             "current_update": "Use other route. No reported delays on diversion.",
             "updated": "2026-11-21T08:45:44Z",
             "start": "2026-11-21T08:44:00Z",
             "end": "2026-11-22T18:00:00Z",
             "lon": -0.09426,
             "lat": 51.50892,
             "corridors": []
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/tfl-road-disruptions/reads.json": {
   "get": {
    "operationId": "get_tfl_road_disruptions_reads",
    "tags": [
     "tfl-road-disruptions"
    ],
    "summary": "London road disruptions (TfL): every read, newest first",
    "description": "Every run of sources/tfl-road-disruptions/collect.mjs, newest first: each request's address, HTTP status, size, the first 16 hex of its sha256, and whether the bytes changed since the run before. The bytes and the full sha256 go to the source's vault (see card.json: latest/reads-full.json), never to git.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "about": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "runs": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "at": {
              "type": "string"
             },
             "finished": {
              "type": "string"
             },
             "ok": {
              "type": "integer"
             },
             "failed": {
              "type": "integer"
             },
             "reads": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "name": {
                 "type": "string"
                },
                "url": {
                 "type": "string"
                },
                "at": {
                 "type": "string"
                },
                "status": {
                 "type": "integer"
                },
                "bytes": {
                 "type": "integer"
                },
                "sha256_prefix": {
                 "type": "string"
                },
                "changed": {
                 "type": "string"
                }
               },
               "required": [
                "name",
                "url",
                "at",
                "status",
                "bytes",
                "sha256_prefix",
                "changed"
               ]
              }
             }
            },
            "required": [
             "at",
             "finished",
             "ok",
             "failed",
             "reads"
            ]
           }
          }
         },
         "required": [
          "about",
          "source",
          "runs"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "about": "Every run of sources/tfl-road-disruptions/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...",
           "source": "tfl-road-disruptions",
           "runs": [
            {
             "at": "2026-11-21T09:20:35Z",
             "finished": "2026-11-21T09:20:37Z",
             "ok": 1,
             "failed": 0,
             "reads": [
              {
               "name": "disruptions",
               "url": "https://api.tfl.gov.uk/Road/all/Disruption",
               "at": "2026-11-21T09:20:37Z",
               "status": 200,
               "bytes": 254809,
               "sha256_prefix": "0237c437e3fc36ae",
               "changed": "first read"
              }
             ]
            }
           ]
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/tfl-road-disruptions/card.json": {
   "get": {
    "operationId": "get_tfl_road_disruptions_card",
    "tags": [
     "tfl-road-disruptions"
    ],
    "summary": "London road disruptions (TfL): the card",
    "description": "Who publishes the source, its reuse terms, the schedule, who owns it, what runs by code, by agents and by people, and the vault.",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "what": {
           "type": "string"
          },
          "publisher": {
           "type": "string"
          },
          "owner": {
           "type": "string"
          },
          "region": {
           "type": "string"
          },
          "collector": {
           "type": "string"
          },
          "source_home": {
           "type": "string"
          },
          "reader_page": {
           "type": "string"
          },
          "schedule": {
           "type": "object",
           "properties": {
            "cadence": {
             "type": "string"
            },
            "how": {
             "type": "string"
            }
           },
           "required": [
            "cadence",
            "how"
           ]
          },
          "terms": {
           "type": "object",
           "properties": {
            "summary": {
             "type": "string"
            },
            "page": {
             "type": "string"
            },
            "read_at": {
             "type": "string"
            },
            "quote": {
             "type": "string"
            },
            "quote_lang": {
             "type": "string"
            },
            "republish": {
             "type": "string"
            },
            "commercial_use": {
             "type": "string"
            },
            "read_by": {
             "type": "string"
            }
           },
           "required": [
            "summary",
            "page",
            "read_at",
            "quote",
            "quote_lang",
            "republish",
            "commercial_use",
            "read_by"
           ]
          },
          "api": {
           "type": "object",
           "properties": {
            "latest": {
             "type": "string"
            },
            "reads": {
             "type": "string"
            },
            "card": {
             "type": "string"
            },
            "openapi": {
             "type": "string"
            },
            "page": {
             "type": "string"
            }
           },
           "required": [
            "latest",
            "reads",
            "card",
            "openapi",
            "page"
           ]
          },
          "vault": {
           "type": "null"
          },
          "split": {
           "type": "object",
           "properties": {
            "code": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "agents": {
             "type": "array",
             "items": {
              "type": "string"
             }
            },
            "people": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           },
           "required": [
            "code",
            "agents",
            "people"
           ]
          },
          "cost": {
           "type": "object",
           "properties": {
            "per_run_tokens": {
             "type": "integer"
            },
            "per_run_model_cost_usd": {
             "type": "integer"
            },
            "runner": {
             "type": "string"
            },
            "build_tokens": {
             "type": "string"
            },
            "note": {
             "type": "string"
            }
           },
           "required": [
            "per_run_tokens",
            "per_run_model_cost_usd",
            "runner",
            "build_tokens",
            "note"
           ]
          },
          "since": {
           "type": "string"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "country": {
           "type": "string"
          }
         },
         "required": [
          "id",
          "title",
          "what",
          "publisher",
          "owner",
          "region",
          "collector",
          "source_home",
          "reader_page",
          "schedule",
          "terms",
          "api",
          "vault",
          "split",
          "cost",
          "since",
          "places",
          "country"
         ],
         "x-inferred": true
        },
        "examples": {
         "example": {
          "summary": "A real file, cut to a readable size",
          "value": {
           "id": "tfl-road-disruptions",
           "title": "London road disruptions (TfL)",
           "what": "Works, incidents and closures on London's roads as TfL lists them: severity, category, place, TfL's description and the period.",
           "publisher": "Transport for London (TfL), Unified API",
           "owner": "data.b@PrompTugal.dinis",
           "region": "london",
           "collector": "sources/tfl-road-disruptions/collect.mjs",
           "source_home": "https://api.tfl.gov.uk/",
           "reader_page": "https://api-portal.tfl.gov.uk/",
           "schedule": {
            "cadence": "daily",
            "how": "once a day at data.b@'s morning wake: one GET of api.tfl.gov.uk/Road/all/Disruption, no key; the page reads it live in the browser"
           },
           "terms": {
            "summary": "TfL's Transport Data Service terms (based on the Open Government Licence v2.0 with TfL amendments): free to copy, publish, distribute, transmit and adapt the information and to exploit it commercially and non-commercially; credit \"Powered by TfL Open Data\"; at most 500 calls a minute per feed; no im...",
            "page": "https://tfl.gov.uk/corporate/terms-and-conditions/transport-data-service",
            "read_at": "2026-11-18",
            "quote": "You are free to: Copy, publish, distribute and transmit the Information; Adapt the Information and Exploit the Information commercially and non-commercially",
            "quote_lang": "en",
            "republish": "yes, with the credit \"Powered by TfL Open Data\"; commercial use allowed",
            "commercial_use": "allowed",
            "read_by": "Dinis Cruz (pasted into data.b@'s session; board/team/data/briefs/2026-11-18-dinis-commercial-line-ine-tfl.md)"
           },
           "api": {
            "latest": "https://data.promptugal.news/api/v1/tfl-road-disruptions/latest.json",
            "reads": "https://data.promptugal.news/api/v1/tfl-road-disruptions/reads.json",
            "card": "https://data.promptugal.news/api/v1/tfl-road-disruptions/card.json",
            "openapi": "https://data.promptugal.news/api/v1/tfl-road-disruptions/openapi.json",
            "page": "https://data.promptugal.news/sources/tfl-road-disruptions/"
           },
           "vault": null,
           "split": {
            "code": [
             "the collector reads the source once a day and keeps the archive; the page reads the live figures in the visitor's browser"
            ],
            "agents": [
             "data.b@PrompTugal.dinis wrote the collector and card on 21 November 2026, for Dinis's London demos (tier 1 of board/team/data/london-feeds.md)"
            ],
            "people": [
             "Dinis Cruz chose tier 1 on 21 November 2026, about 09:16 UTC; no person has checked the values (not reviewed)"
            ]
           },
           "cost": {
            "per_run_tokens": 0,
            "per_run_model_cost_usd": 0,
            "runner": "data.b@'s session",
            "build_tokens": "not measured",
            "note": "Code only: no model is called when the data is collected."
           },
           "since": "2026-11-21",
           "places": [
            "london"
           ],
           "country": "GB"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file"
     }
    }
   }
  },
  "/api/v1/tfl-road-disruptions/openapi.json": {
   "get": {
    "operationId": "get_tfl_road_disruptions_openapi",
    "tags": [
     "tfl-road-disruptions"
    ],
    "summary": "London road disruptions (TfL): this document",
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "application/json": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 },
 "tags": [
  {
   "name": "tfl-road-disruptions",
   "description": "Works, incidents and closures on London's roads as TfL lists them: severity, category, place, TfL's description and the period."
  }
 ],
 "x-source": {
  "id": "tfl-road-disruptions",
  "card": "https://data.promptugal.news/api/v1/tfl-road-disruptions/card.json",
  "page": "https://data.promptugal.news/sources/tfl-road-disruptions/"
 }
}
