{
  "openapi": "3.1.0",
  "info": {
    "title": "Trip Topology API",
    "version": "1.0.0",
    "description": "Read-only airport and public transport topology, recurring schedules and dated journey options. Send an API key as a bearer token. Successful resource responses use {data, meta}; the network ID identifies the snapshot used for the request. Empty arrays are valid results, not evidence that no service exists. Dated timestamps use RFC 3339 with local offsets. Date-free clocks use the stated IANA zone, not a fixed UTC offset. Trip Topology offers best-effort routing from known schedules. Verify schedule and availability before booking. Use the same path and filters with an opaque cursor; page size may change. Restart without the cursor if the network changes. Unknown and repeated query parameters are rejected. The API supports GET and HEAD; other methods return 405 method_not_allowed. Errors use RFC 9457 problem details. Each admitted authenticated /v1 request counts as one call, including conditional requests. The hosted API is free with no usage cap today. RateLimit-* and Quota-* headers are sent only when quota enforcement is on. See https://triptopology.com/docs/limits/ for usage and retry guidance."
  },
  "servers": [
    {
      "url": "https://api.triptopology.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v1/places": {
      "get": {
        "operationId": "getPlaces",
        "summary": "Search stations and airports",
        "description": "Search by exact ID or by name. Name matching ignores case, normalizes punctuation and folds common Latin accents. Order by match rank, descending service count, then ID. Filters combine with AND.",
        "parameters": [
          {
            "name": "q",
            "description": "Search term, up to 100 characters after trimming. Match an ID or search by name.",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "required": false
          },
          {
            "name": "kind",
            "description": "Filter by transport place kind.",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PlaceKind"
            },
            "required": false
          },
          {
            "name": "country",
            "description": "Filter by two uppercase country letters, such as CH. For operators this means a country served.",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "required": false
          },
          {
            "name": "bbox",
            "description": "Inclusive bounds as west,south,east,north in decimal degrees. Longitude is within -180 to 180, latitude within -90 to 90. South must not exceed north. West greater than east crosses the antimeridian.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Matching stations and airports.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceListResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "$ref": "#/components/responses/CursorExpired"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/places/{id}": {
      "get": {
        "operationId": "getPlace",
        "summary": "One station or airport and its stops",
        "description": "Look up a station or airport by canonical place ID. This path does not resolve names.",
        "parameters": [
          {
            "name": "id",
            "description": "Canonical place ID, such as BSL or ch:1:sloid:10.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested transport place and its stored stops.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaceResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cities": {
      "get": {
        "operationId": "getCities",
        "summary": "Search supported journey cities",
        "description": "Search supported cities by exact ID or by name. Name matching ignores case, normalizes punctuation and folds common Latin accents. Order by match rank, descending GeoNames population, then ID. Filters combine with AND.",
        "parameters": [
          {
            "name": "q",
            "description": "Search term, up to 100 characters after trimming. Match an ID or search by name.",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "required": false
          },
          {
            "name": "country",
            "description": "Filter by two uppercase country letters, such as CH. For operators this means a country served.",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "required": false
          },
          {
            "name": "min_population",
            "description": "Minimum GeoNames city population, inclusive.",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "required": false
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Matching cities in the routing network.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityListResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "$ref": "#/components/responses/CursorExpired"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cities/{id}": {
      "get": {
        "operationId": "getCity",
        "summary": "One city and its places",
        "description": "Look up a network city by its GeoNames ID. The associated places are not transfers or guaranteed access routes.",
        "parameters": [
          {
            "name": "id",
            "description": "Canonical GeoNames city ID, such as geonames:2661604.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested city and its associated places.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operators": {
      "get": {
        "operationId": "getOperators",
        "summary": "Search service operators",
        "description": "Search airlines and reviewed ground operators and networks. Ordered by ID. Filter by country served, not by operator domicile.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Match an exact ID or airline code, or search by full or short operator name.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "country",
            "description": "Filter by two uppercase country letters, such as CH. For operators this means a country served.",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "required": false
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Matching operators in the catalogue.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperatorListResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "$ref": "#/components/responses/CursorExpired"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operators/{id}": {
      "get": {
        "operationId": "getOperator",
        "summary": "One operator with modes and countries served",
        "description": "Look up a catalogue entry using the ID returned in an operator search or operator reference. A name-only reference has no detail resource.",
        "parameters": [
          {
            "name": "id",
            "description": "Canonical operator ID, such as air:W4 or ground:ch:sbb.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested operator.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperatorResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections": {
      "get": {
        "operationId": "getConnections",
        "summary": "Direct recurring services between two endpoints",
        "description": "Each city resolves to its ordered main places, with shared airports and local member queries using the other listed places where available. Returns directed, date-free service patterns, not dated departures. Identical patterns collapse; differing times, periods or other public fields remain separate. Ground services include every allowed downstream alighting place on the same ride, even with intermediate stops. Ordered by origin place ID, destination place ID, then pattern content.",
        "parameters": [
          {
            "name": "from",
            "description": "Origin city ID, place ID or unambiguous exact name. For a name, city matches take precedence over place matches.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "to",
            "description": "Destination city ID, place ID or unambiguous exact name. For a name, city matches take precedence over place matches.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Matching direct recurring service patterns.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionListResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/destinations": {
      "get": {
        "operationId": "getDestinations",
        "summary": "Places directly reachable from an endpoint",
        "description": "A city resolves to its ordered main places. Returns one entry per directly reachable place, not per city. Each entry summarizes the modes, operators and distinct service patterns to that place. No date filter. Ordered by destination place ID.",
        "parameters": [
          {
            "name": "from",
            "description": "Origin city ID, place ID or unambiguous exact name. For a name, city matches take precedence over place matches.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Places directly reachable from the resolved origin.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationListResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/journeys": {
      "get": {
        "operationId": "getJourneys",
        "summary": "Journey options on a date",
        "description": "Search recurring schedules on an origin-local date. The window bounds the required journey start, including initial allowances, not necessarily the first ride departure. Options trade off later starts against earlier finishes. The search compares absolute times across zones. A city resolves to its ordered main places. Preferred places break otherwise equal routing ties. Verify schedule and availability before booking. Paging preserves the same window.",
        "parameters": [
          {
            "name": "from",
            "description": "Origin city ID, place ID or unambiguous exact name. For a name, city matches take precedence over place matches.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "to",
            "description": "Destination city ID, place ID or unambiguous exact name. For a name, city matches take precedence over place matches.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "date",
            "description": "Origin-local date in YYYY-MM-DD. The router applies each ride's recurrence and known validity at boarding.",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          },
          {
            "name": "depart_after",
            "description": "Earliest required journey start in origin-local HH:MM. This includes any initial walk or airport allowance.",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{2}:[0-9]{2}$",
              "default": "00:00"
            }
          },
          {
            "name": "depart_before",
            "description": "Latest required journey start in origin-local HH:MM. Use 24:00 for the next midnight. Must not precede depart_after.",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{2}:[0-9]{2}$",
              "default": "24:00"
            }
          },
          {
            "name": "max_hours",
            "description": "Maximum elapsed time from journey start to end, in whole hours, including transfers and access allowances.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 72,
              "default": 30
            }
          },
          {
            "name": "modes",
            "description": "Use all to include flights, or ground to exclude them. This is not a per-mode filter.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "ground"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "description": "Maximum number of entries to return on this page.",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8
            },
            "required": false
          },
          {
            "name": "cursor",
            "description": "Opaque next_cursor from the previous page of the same query. Keep the path and filters unchanged.",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Page of dated journey options, in start-time order.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Quota-Limit": {
                "$ref": "#/components/headers/Quota-Limit"
              },
              "Quota-Remaining": {
                "$ref": "#/components/headers/Quota-Remaining"
              },
              "Quota-Reset": {
                "$ref": "#/components/headers/Quota-Reset"
              },
              "ETag": {
                "description": "Validator for this network and request. Send it with If-None-Match on the same request.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Private with a 60-second max-age on the keyed API; varies on Authorization.",
                "schema": {
                  "type": "string"
                }
              },
              "Link": {
                "description": "Next-page URL with rel=\"next\" when more entries exist. Resolve relative to the request URL.",
                "schema": {
                  "type": "string"
                }
              },
              "Server-Timing": {
                "description": "Server search timings in milliseconds.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JourneyResponse"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/UsageLimitExceeded"
          },
          "500": {
            "$ref": "#/components/responses/JourneyFailure"
          },
          "503": {
            "$ref": "#/components/responses/JourneyUnavailable"
          },
          "default": {
            "description": "RFC 9457 problem details",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from the console or the portal's agent registration endpoint. A missing key is 401 unauthorized; a malformed, unknown, expired or revoked one is 401 invalid_api_key. 503 auth_unavailable means keys cannot be checked right now. A private deployment may run without authentication."
      }
    },
    "headers": {
      "RateLimit-Limit": {
        "description": "The plan's request limit per UTC minute for this key.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "RateLimit-Remaining": {
        "description": "Calls left for this key in the current UTC minute. Subject to the account's monthly quota.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "RateLimit-Reset": {
        "description": "Whole seconds until the next UTC minute.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "Quota-Limit": {
        "description": "The plan's request quota per UTC calendar month for the whole account.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "Quota-Remaining": {
        "description": "Calls left for all keys and console requests on the account in this UTC calendar month.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "Quota-Reset": {
        "description": "Whole seconds until the next UTC calendar month.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "responses": {
      "NotModified": {
        "description": "ETag matched If-None-Match. No response body. An admitted request still counts toward usage.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          },
          "Quota-Limit": {
            "$ref": "#/components/headers/Quota-Limit"
          },
          "Quota-Remaining": {
            "$ref": "#/components/headers/Quota-Remaining"
          },
          "Quota-Reset": {
            "$ref": "#/components/headers/Quota-Reset"
          }
        }
      },
      "UsageLimitExceeded": {
        "description": "Only when quota enforcement is on. The per-key minute limit (rate_limit_exceeded) or the account monthly quota (monthly_quota_exceeded) is exhausted.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          },
          "Quota-Limit": {
            "$ref": "#/components/headers/Quota-Limit"
          },
          "Quota-Remaining": {
            "$ref": "#/components/headers/Quota-Remaining"
          },
          "Quota-Reset": {
            "$ref": "#/components/headers/Quota-Reset"
          },
          "Retry-After": {
            "description": "Whole seconds until the exhausted limit resets",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadRequest": {
        "description": "invalid_parameter. Read detail and correct the missing, malformed, unknown, repeated or out-of-range input.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "not_found. The resource or requested endpoint was not found. No nearby place is substituted.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "unauthorized if the bearer header is missing or unusable; invalid_api_key if the key is malformed, unknown, expired or revoked. Correct the credentials before retrying.",
        "headers": {
          "WWW-Authenticate": {
            "description": "Bearer authentication challenge.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "CursorExpired": {
        "description": "cursor_expired. The cursor belongs to a different network. Restart the same query without a cursor.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "cursor_expired if the network changed; restart without a cursor. For ambiguous_endpoint pick an ID from candidates and retry.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "JourneyFailure": {
        "description": "internal_error. Journey search could not complete. Retry once; if it persists, report the query.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The network is not loaded (network_unavailable), keys cannot be checked (auth_unavailable), or the meter cannot check usage with quota enforcement on (usage_unavailable). Honor Retry-After and use bounded backoff.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "JourneyUnavailable": {
        "description": "The network is not loaded (network_unavailable), keys cannot be checked (auth_unavailable), the meter cannot check usage with quota enforcement on (usage_unavailable), or all journey search slots are occupied (journey_search_busy). Honor Retry-After and use bounded backoff.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Mode": {
        "description": "Mode of scheduled transport. Walking is not a scheduled mode.",
        "type": "string",
        "enum": [
          "rail",
          "bus",
          "coach",
          "tram",
          "metro",
          "air"
        ]
      },
      "OperatorKind": {
        "description": "Airline, ground operator, or ground network marketed under its own name.",
        "type": "string",
        "enum": [
          "operator",
          "network",
          "airline"
        ]
      },
      "PlaceKind": {
        "description": "Station or airport. An airport can have ground stops.",
        "type": "string",
        "enum": [
          "station",
          "airport"
        ]
      },
      "EndpointKind": {
        "description": "Whether the resolved query names a city or an individual place.",
        "type": "string",
        "enum": [
          "place",
          "city"
        ]
      },
      "Weekday": {
        "description": "Three-letter weekday on the local boarding calendar.",
        "type": "string",
        "enum": [
          "mon",
          "tue",
          "wed",
          "thu",
          "fri",
          "sat",
          "sun"
        ]
      },
      "CityRef": {
        "description": "City associated with a transport place.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Namespaced GeoNames city ID.",
            "type": "string",
            "example": "geonames:2661604"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "Place": {
        "description": "An airport or station in the routing network.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable place id: an airport's IATA code, or a station's source id",
            "example": "ch:1:sloid:10"
          },
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/PlaceKind"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "country": {
            "description": "Two-letter country code for this location.",
            "type": "string"
          },
          "latitude": {
            "description": "Latitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "description": "Longitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone, absent when unknown"
          },
          "modes": {
            "type": "array",
            "description": "Modes of the services that call at this place",
            "items": {
              "$ref": "#/components/schemas/Mode"
            }
          },
          "service_count": {
            "type": "integer",
            "description": "Count of stored recurring ground trips and flights touching the place, not departures on a date."
          },
          "stop_count": {
            "description": "Number of stored stops attached to this place.",
            "type": "integer"
          },
          "cities": {
            "type": "array",
            "description": "Cities of the network this place belongs to (empty for many airports and stations)",
            "items": {
              "$ref": "#/components/schemas/CityRef"
            }
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "country",
          "latitude",
          "longitude",
          "modes",
          "service_count",
          "stop_count",
          "cities"
        ]
      },
      "Stop": {
        "description": "A boarding location grouped under a station or airport.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Stop ID. Pass the parent place ID, not this stop ID, to route requests.",
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "latitude": {
            "description": "Latitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "description": "Longitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "modes": {
            "description": "Modes associated with this stop.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mode"
            }
          },
          "walk_minutes": {
            "type": "integer",
            "description": "Walk between the stop and the place's centre (the station or the airport terminal)"
          },
          "walk_estimated": {
            "description": "False if the walking time comes directly from a declared timetable transfer or a reviewed document or website. True for calculated or policy times, even if a source gives the distance.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "latitude",
          "longitude",
          "modes",
          "walk_minutes",
          "walk_estimated"
        ]
      },
      "City": {
        "description": "A GeoNames city represented in the routing network.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Namespaced GeoNames id, e.g. geonames:2659994"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "country": {
            "description": "Two-letter country code for this location.",
            "type": "string"
          },
          "population": {
            "description": "Population recorded by GeoNames, not a metropolitan estimate.",
            "type": "integer",
            "format": "int64"
          },
          "latitude": {
            "description": "Latitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "description": "Longitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone, absent when unknown"
          },
          "place_count": {
            "description": "Number of places associated with this city.",
            "type": "integer"
          },
          "principal_place": {
            "type": "string",
            "description": "The first place ID in the city's search list."
          },
          "main_place_ids": {
            "type": "array",
            "description": "Places used in city searches, ordered by preference. Other mapped places can still be queried by ID.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "country",
          "population",
          "latitude",
          "longitude",
          "place_count",
          "principal_place",
          "main_place_ids"
        ]
      },
      "JourneyPlace": {
        "type": "object",
        "description": "Boarding or alighting place, with a stop when applicable",
        "properties": {
          "stop_id": {
            "description": "Stop ID when a ground boarding or alighting stop is known.",
            "type": "string"
          },
          "stop_name": {
            "description": "Stop display name, if available. An air leg can show the airport name without a stop ID.",
            "type": "string"
          },
          "country": {
            "description": "Two-letter country code for this location.",
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "format": "double",
            "description": "Latitude in decimal degrees of the stop, or of the place when no stop applies."
          },
          "longitude": {
            "description": "Longitude in decimal degrees of the stop, or of the place when no stop applies.",
            "type": "number",
            "format": "double"
          },
          "place_id": {
            "description": "Stable ID of the transport place.",
            "type": "string"
          },
          "place_name": {
            "description": "Display name of the transport place.",
            "type": "string"
          },
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/PlaceKind"
          }
        },
        "required": [
          "place_id",
          "place_name",
          "kind",
          "country",
          "latitude",
          "longitude"
        ]
      },
      "JourneyCall": {
        "type": "object",
        "description": "A stored call of a ground service between boarding and alighting, both included",
        "properties": {
          "stop_id": {
            "description": "ID of the stop within its parent place.",
            "type": "string"
          },
          "stop_name": {
            "description": "Display name of the stop.",
            "type": "string"
          },
          "latitude": {
            "description": "Latitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "description": "Longitude in decimal degrees.",
            "type": "number",
            "format": "double"
          },
          "arrival": {
            "type": "string",
            "format": "date-time",
            "description": "Arrival instant with local UTC offset. Absent at the boarding stop."
          },
          "departure": {
            "type": "string",
            "format": "date-time",
            "description": "Departure instant with local UTC offset. Absent at the alighting stop."
          },
          "place_id": {
            "description": "Stable ID of the transport place.",
            "type": "string"
          },
          "timezone": {
            "description": "IANA zone used for the timestamps at this call.",
            "type": "string"
          }
        },
        "required": [
          "stop_id",
          "stop_name",
          "place_id",
          "latitude",
          "longitude",
          "timezone"
        ]
      },
      "JourneyChange": {
        "description": "Transfer between consecutive rides at one place.",
        "type": "object",
        "properties": {
          "from_stop_name": {
            "type": "string",
            "description": "Display name of the arriving stop, or the airport name at airside"
          },
          "to_stop_name": {
            "type": "string",
            "description": "Display name of the departing stop, or the airport name at airside"
          },
          "available_minutes": {
            "description": "Scheduled minutes between the incoming arrival and onward departure.",
            "type": "integer"
          },
          "place_id": {
            "description": "Stable ID of the transport place.",
            "type": "string"
          },
          "place_name": {
            "description": "Display name of the transport place.",
            "type": "string"
          }
        },
        "required": [
          "place_id",
          "place_name",
          "from_stop_name",
          "to_stop_name",
          "available_minutes"
        ]
      },
      "Journey": {
        "description": "One dated option ordered from origin to destination.",
        "type": "object",
        "properties": {
          "departure": {
            "description": "First scheduled ride departure with local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "arrival": {
            "description": "Last scheduled ride arrival with local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "duration_minutes": {
            "type": "integer",
            "description": "First departure to last arrival"
          },
          "change_count": {
            "description": "Number of transfers between rides.",
            "type": "integer"
          },
          "legs": {
            "description": "Scheduled rides in travel order.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JourneyLeg"
            }
          },
          "changes": {
            "description": "Transfers in travel order, empty for a direct ride.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JourneyChange"
            }
          }
        },
        "required": [
          "departure",
          "arrival",
          "duration_minutes",
          "change_count",
          "legs",
          "changes"
        ]
      },
      "JourneyLeg": {
        "description": "One scheduled ride in a dated journey.",
        "type": "object",
        "properties": {
          "mode": {
            "description": "Mode of transport for this ride.",
            "$ref": "#/components/schemas/Mode"
          },
          "label": {
            "type": "string",
            "description": "Line label, or the flight number for a flight"
          },
          "flight_number": {
            "description": "Operating flight designator, when known for an air service.",
            "type": "string"
          },
          "operator_unknown": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "True for an unattributed air service. Operators is empty and flight_number is absent."
          },
          "marketing_flight_numbers": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "Marketed flight designators for the same air service, present when operator_unknown is true. None identifies the operator.",
            "items": {
              "type": "string"
            }
          },
          "schedule": {
            "description": "Recurring pattern for this ride, expressed on its boarding calendar.",
            "$ref": "#/components/schemas/LegSchedule"
          },
          "from": {
            "description": "Where the passenger boards.",
            "$ref": "#/components/schemas/JourneyPlace"
          },
          "to": {
            "description": "Where the passenger alights.",
            "$ref": "#/components/schemas/JourneyPlace"
          },
          "departure_timezone": {
            "description": "IANA zone of the departure timestamp.",
            "type": "string"
          },
          "arrival_timezone": {
            "description": "IANA zone of the arrival timestamp.",
            "type": "string"
          },
          "departure": {
            "description": "Scheduled boarding instant with local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "arrival": {
            "description": "Scheduled alighting instant with local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "duration_minutes": {
            "description": "Elapsed minutes between the scheduled departure and arrival.",
            "type": "integer"
          },
          "calls": {
            "type": "array",
            "description": "Stored calls from boarding to alighting, for drawing; empty for a flight. Only the network's stops are stored.",
            "items": {
              "$ref": "#/components/schemas/JourneyCall"
            }
          },
          "operators": {
            "description": "Operators for this ride or its sections, in travel order. Empty when unknown.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperatorRef"
            }
          }
        },
        "required": [
          "mode",
          "schedule",
          "from",
          "to",
          "departure_timezone",
          "arrival_timezone",
          "departure",
          "arrival",
          "duration_minutes",
          "calls",
          "operators"
        ]
      },
      "Endpoint": {
        "description": "Resolved origin or destination.",
        "type": "object",
        "properties": {
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/EndpointKind"
          },
          "id": {
            "description": "Canonical city or place ID.",
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "country": {
            "description": "Two-letter country code for this location.",
            "type": "string"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone, absent when unknown"
          },
          "place_ids": {
            "type": "array",
            "description": "Place IDs used for this query. For a city, these are the main places in preference order, excluding any local overlap that is not searched.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "kind",
          "id",
          "name",
          "country",
          "place_ids"
        ]
      },
      "EndpointCandidate": {
        "description": "One match for an ambiguous endpoint name.",
        "type": "object",
        "properties": {
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/EndpointKind"
          },
          "id": {
            "description": "Canonical ID to pass as from or to.",
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "type": "string"
          },
          "country": {
            "description": "Two-letter country code for this location.",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "name",
          "country"
        ]
      },
      "ListMeta": {
        "description": "Paging information for places, cities and operators.",
        "type": "object",
        "properties": {
          "network": {
            "description": "Identifier of the immutable network used to answer this request.",
            "type": "string"
          },
          "limit": {
            "description": "Effective maximum number of entries on this page.",
            "type": "integer"
          },
          "total": {
            "description": "Exact number of matching entries across all pages.",
            "type": "integer"
          },
          "next_cursor": {
            "description": "Opaque token for the next page of the same query. Absent on the last page.",
            "type": "string"
          }
        },
        "required": [
          "network",
          "limit"
        ]
      },
      "ConnectionListMeta": {
        "description": "Resolved endpoints and paging information for recurring connections.",
        "type": "object",
        "properties": {
          "network": {
            "description": "Identifier of the immutable network used to answer this request.",
            "type": "string"
          },
          "from": {
            "description": "Resolved origin.",
            "$ref": "#/components/schemas/Endpoint"
          },
          "to": {
            "description": "Resolved destination.",
            "$ref": "#/components/schemas/Endpoint"
          },
          "limit": {
            "description": "Effective maximum number of entries on this page.",
            "type": "integer"
          },
          "total": {
            "description": "Exact number of matching entries across all pages.",
            "type": "integer"
          },
          "next_cursor": {
            "description": "Opaque token for the next page of the same query. Absent on the last page.",
            "type": "string"
          }
        },
        "required": [
          "network",
          "from",
          "to",
          "limit"
        ]
      },
      "DestinationListMeta": {
        "description": "Resolved origin and paging information for direct destinations.",
        "type": "object",
        "properties": {
          "network": {
            "description": "Identifier of the immutable network used to answer this request.",
            "type": "string"
          },
          "from": {
            "description": "Resolved origin.",
            "$ref": "#/components/schemas/Endpoint"
          },
          "limit": {
            "description": "Effective maximum number of entries on this page.",
            "type": "integer"
          },
          "total": {
            "description": "Exact number of matching entries across all pages.",
            "type": "integer"
          },
          "next_cursor": {
            "description": "Opaque token for the next page of the same query. Absent on the last page.",
            "type": "string"
          }
        },
        "required": [
          "network",
          "from",
          "limit"
        ]
      },
      "Meta": {
        "description": "Metadata for a single resource.",
        "type": "object",
        "properties": {
          "network": {
            "description": "Identifier of the immutable network used to answer this request.",
            "type": "string"
          }
        },
        "required": [
          "network"
        ]
      },
      "Error": {
        "description": "RFC 9457 problem details with an API-specific code.",
        "type": "object",
        "properties": {
          "type": {
            "description": "Stable documentation URI for this problem code.",
            "type": "string",
            "format": "uri"
          },
          "title": {
            "description": "Short HTTP status label.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code repeated in the body.",
            "type": "integer"
          },
          "detail": {
            "description": "Explanation of this occurrence. Do not parse it as a machine-readable code.",
            "type": "string"
          },
          "code": {
            "description": "Machine-readable problem code. See the response descriptions and https://triptopology.com/docs/problems/.",
            "type": "string"
          },
          "invalid_params": {
            "description": "Reserved optional structured parameter diagnostics. Current handlers explain invalid parameters in detail instead.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "description": "Parameter name.",
                  "type": "string"
                },
                "reason": {
                  "description": "What was invalid about the parameter.",
                  "type": "string"
                },
                "value": {
                  "description": "Offending value, if supplied.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "reason"
              ]
            }
          },
          "candidates": {
            "type": "array",
            "description": "Matching endpoints when code is ambiguous_endpoint",
            "items": {
              "$ref": "#/components/schemas/EndpointCandidate"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ]
      },
      "OperatorRef": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Reviewed operator ID, or air:<code> for an airline. Absent for an unreviewed ground name.",
            "type": "string"
          },
          "name": {
            "description": "Display name when known. May be omitted for a code-only airline.",
            "type": "string"
          },
          "code": {
            "description": "Airline designator, when available.",
            "type": "string"
          },
          "short_name": {
            "description": "Short display name when available.",
            "type": "string"
          },
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/OperatorKind"
          },
          "country": {
            "description": "Home country code when known, not a list of countries served.",
            "type": "string"
          }
        },
        "description": "A reviewed operator has an id. An unreviewed ground name has only name. An airline without a display name retains id and code."
      },
      "Operator": {
        "description": "Catalogue entry for an airline, reviewed ground operator or network.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Reviewed operator ID, or air:<code> for an airline. Absent for an unreviewed ground name.",
            "type": "string"
          },
          "name": {
            "description": "Display name when known. May be omitted for a code-only airline.",
            "type": "string"
          },
          "code": {
            "description": "Airline designator, when available.",
            "type": "string"
          },
          "short_name": {
            "description": "Short display name when available.",
            "type": "string"
          },
          "kind": {
            "description": "Classification of this resource.",
            "$ref": "#/components/schemas/OperatorKind"
          },
          "country": {
            "description": "Home country code when known.",
            "type": "string"
          },
          "modes": {
            "description": "Modes attributed to this operator in the network.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mode"
            }
          },
          "countries": {
            "description": "Country codes for places served in this network, not necessarily the home country.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "modes",
          "countries"
        ]
      },
      "LegSchedule": {
        "type": "object",
        "description": "Weekdays refer to the local boarding day, including calls after midnight on trips that began the previous day.",
        "properties": {
          "runs_on": {
            "description": "Recurring weekdays, ordered Monday first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Weekday"
            }
          },
          "summary": {
            "description": "Human-readable boarding weekdays.",
            "type": "string",
            "example": "Runs Mon to Fri"
          }
        },
        "required": [
          "runs_on",
          "summary"
        ]
      },
      "ConnectionSchedule": {
        "description": "Boarding weekdays and any known validity bounds for a direct connection.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LegSchedule"
          },
          {
            "type": "object",
            "properties": {
              "valid_from": {
                "description": "First valid local boarding date, inclusive, when bounded.",
                "type": "string",
                "format": "date"
              },
              "valid_to": {
                "description": "Last valid local boarding date, inclusive, when bounded.",
                "type": "string",
                "format": "date"
              }
            }
          }
        ]
      },
      "JourneyMeta": {
        "description": "Resolved endpoints, search window and paging information. No total is reported.",
        "type": "object",
        "properties": {
          "network": {
            "description": "Identifier of the immutable network used to answer this request.",
            "type": "string"
          },
          "from": {
            "description": "Resolved origin.",
            "$ref": "#/components/schemas/Endpoint"
          },
          "to": {
            "description": "Resolved destination.",
            "$ref": "#/components/schemas/Endpoint"
          },
          "date": {
            "description": "Requested calendar date in the origin zone.",
            "type": "string",
            "format": "date"
          },
          "window_start": {
            "description": "Earliest allowed journey start, with origin-local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "window_end": {
            "description": "Latest allowed journey start, with origin-local UTC offset.",
            "type": "string",
            "format": "date-time"
          },
          "limit": {
            "description": "Effective maximum number of entries on this page.",
            "type": "integer"
          },
          "next_cursor": {
            "description": "Opaque token for the next page of the same query. Absent on the last page.",
            "type": "string"
          }
        },
        "required": [
          "network",
          "from",
          "to",
          "date",
          "window_start",
          "window_end",
          "limit"
        ]
      },
      "PlaceDetail": {
        "description": "Place with its stored stops.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Place"
          },
          {
            "type": "object",
            "properties": {
              "stops": {
                "description": "Stored boarding and alighting locations attached to this place.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Stop"
                }
              }
            },
            "required": [
              "stops"
            ]
          }
        ]
      },
      "CityDetail": {
        "description": "City with its member places.",
        "allOf": [
          {
            "$ref": "#/components/schemas/City"
          },
          {
            "type": "object",
            "properties": {
              "places": {
                "description": "Associated places, principal place first, then by descending service count and ID.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Place"
                }
              }
            },
            "required": [
              "places"
            ]
          }
        ]
      },
      "Connection": {
        "description": "One date-free, directed service pattern. No change of vehicle is required.",
        "type": "object",
        "properties": {
          "from": {
            "description": "Boarding place and stop, if available.",
            "$ref": "#/components/schemas/JourneyPlace"
          },
          "to": {
            "description": "Alighting place and stop, if available.",
            "$ref": "#/components/schemas/JourneyPlace"
          },
          "mode": {
            "description": "Mode of transport for this ride.",
            "$ref": "#/components/schemas/Mode"
          },
          "operators": {
            "description": "Operators for this ride or its sections, in travel order. Empty when unknown.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperatorRef"
            }
          },
          "label": {
            "type": "string",
            "description": "Line label, or the flight number for a flight"
          },
          "flight_number": {
            "description": "Operating flight designator, when known for an air service.",
            "type": "string"
          },
          "operator_unknown": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "True for an unattributed air service. Operators is empty and flight_number is absent."
          },
          "marketing_flight_numbers": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "description": "Marketed flight designators for the same air service, present when operator_unknown is true. None identifies the operator.",
            "items": {
              "type": "string"
            }
          },
          "departure_time": {
            "type": "string",
            "description": "Usual local clock HH:MM"
          },
          "arrival_time": {
            "type": "string",
            "description": "Usual local clock HH:MM"
          },
          "arrival_day_offset": {
            "description": "Arrival calendar day relative to the boarding day in the stated zones. Zero means same day, one means next day, and a negative value means an earlier local date.",
            "type": "integer"
          },
          "departure_timezone": {
            "description": "IANA zone for departure_time when known. Ground patterns use the service timetable zone.",
            "type": "string"
          },
          "arrival_timezone": {
            "description": "IANA zone for arrival_time when known. Ground patterns use the service timetable zone.",
            "type": "string"
          },
          "schedule": {
            "description": "Weekdays and validity of this recurring pattern.",
            "$ref": "#/components/schemas/ConnectionSchedule"
          }
        },
        "required": [
          "from",
          "to",
          "mode",
          "operators",
          "departure_time",
          "arrival_time",
          "arrival_day_offset",
          "schedule"
        ]
      },
      "ReachablePlace": {
        "description": "One place directly reachable from the requested origin.",
        "type": "object",
        "properties": {
          "place": {
            "description": "Destination place. Its nested modes and service count describe the whole place.",
            "$ref": "#/components/schemas/Place"
          },
          "modes": {
            "description": "Modes on direct services to this place from the requested origin.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mode"
            }
          },
          "operators": {
            "description": "Union of operators on those direct services. Empty when unknown.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperatorRef"
            }
          },
          "service_count": {
            "description": "Count of distinct direct patterns across the originating places. Not a count of daily departures.",
            "type": "integer"
          }
        },
        "required": [
          "place",
          "modes",
          "operators",
          "service_count"
        ]
      },
      "PlaceListResponse": {
        "description": "Page of matching places.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of places. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Place"
            }
          },
          "meta": {
            "description": "Paging information.",
            "$ref": "#/components/schemas/ListMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "PlaceResponse": {
        "description": "Place detail.",
        "type": "object",
        "properties": {
          "data": {
            "description": "The requested place with its stops.",
            "$ref": "#/components/schemas/PlaceDetail"
          },
          "meta": {
            "description": "Network identifier.",
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "CityListResponse": {
        "description": "Page of matching cities.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of cities. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/City"
            }
          },
          "meta": {
            "description": "Paging information.",
            "$ref": "#/components/schemas/ListMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "CityResponse": {
        "description": "City detail.",
        "type": "object",
        "properties": {
          "data": {
            "description": "The requested city with its places.",
            "$ref": "#/components/schemas/CityDetail"
          },
          "meta": {
            "description": "Network identifier.",
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "JourneyResponse": {
        "description": "Page of time-optimal journey options.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of dated journey options. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Journey"
            }
          },
          "meta": {
            "description": "Search window, resolved endpoints and paging information.",
            "$ref": "#/components/schemas/JourneyMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "OperatorListResponse": {
        "description": "Page of matching operators.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of operators. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operator"
            }
          },
          "meta": {
            "description": "Paging information.",
            "$ref": "#/components/schemas/ListMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "OperatorResponse": {
        "description": "Operator detail.",
        "type": "object",
        "properties": {
          "data": {
            "description": "The requested operator.",
            "$ref": "#/components/schemas/Operator"
          },
          "meta": {
            "description": "Network identifier.",
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ConnectionListResponse": {
        "description": "Page of direct service patterns.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of recurring patterns. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "meta": {
            "description": "Resolved endpoints and paging information.",
            "$ref": "#/components/schemas/ConnectionListMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "DestinationListResponse": {
        "description": "Page of direct destinations.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Requested page of directly reachable places. An empty array means no entries on this page.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReachablePlace"
            }
          },
          "meta": {
            "description": "Resolved origin and paging information.",
            "$ref": "#/components/schemas/DestinationListMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      }
    }
  }
}
