{
  "components": {
    "schemas": {
      "Accuracy": {
        "description": "How precisely the coordinates locate the result, most precise first.\n\n- `rooftop`: the address or POI itself.\n- `interpolated`: a house number placed between known neighbours.\n- `street`: a point on the street.\n- `centroid`: the centre of a mapped area.\n- `approximate`: a point standing for something larger, such as a town\n  or postcode.",
        "enum": [
          "rooftop",
          "interpolated",
          "street",
          "centroid",
          "approximate"
        ],
        "type": "string"
      },
      "Address": {
        "description": "Address parts stated by the source record. Parts the record omits are\nabsent, not filled in from `context`.",
        "properties": {
          "areas": {
            "description": "Areas below the locality, outermost first (OSM `addr:suburb`,\n`addr:quarter`, `addr:neighbourhood`).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "country": {
            "type": "string"
          },
          "housenumber": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          },
          "place": {
            "description": "Named place the house number belongs to where there is no street\n(OSM `addr:place`).",
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Attribution": {
        "description": "Attribution required by the data licence.",
        "enum": [
          "© OpenStreetMap contributors, ODbL"
        ],
        "type": "string"
      },
      "Common": {
        "description": "Properties shared by forward and reverse results.",
        "properties": {
          "accuracy": {
            "$ref": "#/components/schemas/Accuracy"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "Address parts stated by the source record."
          },
          "category": {
            "description": "POI category, such as `amenity:cafe`. Present only on POIs.",
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/Context",
            "description": "Administrative areas containing the result."
          },
          "id": {
            "description": "Stable ID from the source data, such as `osm:node:123`.",
            "type": "string"
          },
          "label": {
            "description": "One-line display label: `name` followed by its location.",
            "type": "string"
          },
          "layer": {
            "$ref": "#/components/schemas/Layer"
          },
          "name": {
            "description": "House number and street for an address (`12 King Street West`), or\nthe name of a street, area or POI.",
            "type": "string"
          },
          "record_id": {
            "$ref": "#/components/schemas/u64",
            "description": "Row of the record in this Pack. Changes between Pack builds."
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          }
        },
        "required": [
          "id",
          "record_id",
          "layer",
          "accuracy",
          "name",
          "label",
          "source"
        ],
        "type": "object"
      },
      "Context": {
        "description": "Areas containing the result, one per tier, most specific first. A tier\nthe country does not map is absent.",
        "properties": {
          "country": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "district": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "locality": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "neighbourhood": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "place": {
            "$ref": "#/components/schemas/ContextArea",
            "description": "Named area outside the administrative levels, usually an island."
          },
          "region": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "subdistrict": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "sublocality": {
            "$ref": "#/components/schemas/ContextArea"
          },
          "subregion": {
            "$ref": "#/components/schemas/ContextArea"
          }
        },
        "type": "object"
      },
      "ContextArea": {
        "properties": {
          "id": {
            "description": "Stable ID from the source data, as in a result's `id`.",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "ErrorCode": {
        "description": "Stable error code.",
        "enum": [
          "invalid_query",
          "invalid_coordinate",
          "limit_too_large",
          "malformed_parameter",
          "not_found",
          "method_not_allowed",
          "internal_error"
        ],
        "type": "string"
      },
      "FeatureCollectionType": {
        "enum": [
          "FeatureCollection"
        ],
        "type": "string"
      },
      "FeatureType": {
        "enum": [
          "Feature"
        ],
        "type": "string"
      },
      "ForwardCollection": {
        "description": "A GeoJSON FeatureCollection answering `/search`, `/autocomplete` or\n`/geocode`.",
        "properties": {
          "features": {
            "items": {
              "$ref": "#/components/schemas/ForwardFeature"
            },
            "type": "array"
          },
          "geocoding": {
            "$ref": "#/components/schemas/ForwardGeocoding",
            "description": "The query, API version and data attribution."
          },
          "type": {
            "$ref": "#/components/schemas/FeatureCollectionType"
          }
        },
        "required": [
          "type",
          "geocoding",
          "features"
        ],
        "type": "object"
      },
      "ForwardFeature": {
        "description": "One forward geocoding result.",
        "properties": {
          "geometry": {
            "$ref": "#/components/schemas/Point"
          },
          "properties": {
            "$ref": "#/components/schemas/ForwardProperties"
          },
          "type": {
            "$ref": "#/components/schemas/FeatureType"
          }
        },
        "required": [
          "type",
          "geometry",
          "properties"
        ],
        "type": "object"
      },
      "ForwardGeocoding": {
        "properties": {
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "query": {
            "description": "Query as received, trimmed, with each run of whitespace collapsed to\none space.",
            "type": "string"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          }
        },
        "required": [
          "version",
          "query",
          "attribution"
        ],
        "type": "object"
      },
      "ForwardProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Common"
          },
          {
            "properties": {
              "confidence": {
                "description": "Probability, from 0 to 1, that this is the address the query asks\nfor. Of results at 0.8, about 8 in 10 are correct. Present only when\nthe Pack is calibrated. `0` on a `fallback` result.",
                "format": "float",
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              "fallback": {
                "description": "`true` when no match was found and the result is the most precise\narea the query names instead: its postcode, a town or other area,\nits region or its country. `layer` says which. Absent otherwise.",
                "type": "boolean"
              },
              "score": {
                "description": "Text relevance. Higher is better. Comparable only within one\nresponse: use `confidence` to judge a single result.",
                "format": "float",
                "type": "number"
              }
            },
            "required": [
              "score"
            ],
            "type": "object"
          }
        ],
        "description": "Properties of a forward geocoding result."
      },
      "InvalidParam": {
        "description": "A rejected parameter.",
        "properties": {
          "name": {
            "description": "Parameter name.",
            "example": "limit",
            "type": "string"
          },
          "reason": {
            "description": "Why it was rejected.",
            "example": "must be at most 50",
            "type": "string"
          }
        },
        "required": [
          "name",
          "reason"
        ],
        "type": "object"
      },
      "Layer": {
        "description": "Kind of result: an address, a street, a POI, or an area such as a\nlocality or region.",
        "enum": [
          "address",
          "country",
          "district",
          "interpolation",
          "locality",
          "neighbourhood",
          "place",
          "poi",
          "postcode",
          "region",
          "street"
        ],
        "type": "string"
      },
      "LonLat": {
        "properties": {
          "lat": {
            "format": "double",
            "type": "number"
          },
          "lon": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "lon",
          "lat"
        ],
        "type": "object"
      },
      "ObjectType": {
        "description": "Source object type: an OSM `node`, `way` or `relation`, or a `row` of an\naddress dataset such as OpenAddresses.",
        "enum": [
          "node",
          "way",
          "relation",
          "row"
        ],
        "type": "string"
      },
      "Point": {
        "description": "GeoJSON Point. `coordinates` is `[lon, lat]`.",
        "properties": {
          "coordinates": {
            "items": {
              "format": "double",
              "type": "number"
            },
            "type": "array"
          },
          "type": {
            "$ref": "#/components/schemas/PointType"
          }
        },
        "required": [
          "type",
          "coordinates"
        ],
        "type": "object"
      },
      "PointType": {
        "enum": [
          "Point"
        ],
        "type": "string"
      },
      "Problem": {
        "description": "Error response, an RFC 9457 problem document.",
        "properties": {
          "detail": {
            "description": "Human-readable explanation. Absent on `500` errors.",
            "example": "q must not be empty",
            "type": "string"
          },
          "error_code": {
            "$ref": "#/components/schemas/ErrorCode",
            "description": "Stable error code. Branch on this."
          },
          "invalid_params": {
            "description": "Rejected parameters. Present only when the error is about\nparameters.",
            "items": {
              "$ref": "#/components/schemas/InvalidParam"
            },
            "type": "array"
          },
          "request_id": {
            "description": "ID the request is logged under. Include it in bug reports.",
            "example": "01JA7Q2K3M4N5P6Q7R8S9T0V1W",
            "type": "string"
          },
          "status": {
            "example": 400,
            "format": "int32",
            "maximum": 599,
            "minimum": 400,
            "type": "integer"
          },
          "title": {
            "description": "Name of the HTTP status. Do not branch on it.",
            "example": "Bad Request",
            "type": "string"
          },
          "type": {
            "description": "URI identifying the problem type. Currently always `about:blank`.",
            "example": "about:blank",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "error_code"
        ],
        "title": "Problem",
        "type": "object"
      },
      "ReverseCollection": {
        "description": "A GeoJSON FeatureCollection answering `/reverse`.",
        "properties": {
          "features": {
            "items": {
              "$ref": "#/components/schemas/ReverseFeature"
            },
            "type": "array"
          },
          "geocoding": {
            "$ref": "#/components/schemas/ReverseGeocoding",
            "description": "The queried point, API version and data attribution."
          },
          "type": {
            "$ref": "#/components/schemas/FeatureCollectionType"
          }
        },
        "required": [
          "type",
          "geocoding",
          "features"
        ],
        "type": "object"
      },
      "ReverseFeature": {
        "description": "One reverse geocoding result: the address or street at the point, or an\narea containing it.",
        "properties": {
          "geometry": {
            "$ref": "#/components/schemas/Point"
          },
          "properties": {
            "$ref": "#/components/schemas/ReverseProperties"
          },
          "type": {
            "$ref": "#/components/schemas/FeatureType"
          }
        },
        "required": [
          "type",
          "geometry",
          "properties"
        ],
        "type": "object"
      },
      "ReverseGeocoding": {
        "properties": {
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "point": {
            "$ref": "#/components/schemas/LonLat",
            "description": "Queried point."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          }
        },
        "required": [
          "version",
          "point",
          "attribution"
        ],
        "type": "object"
      },
      "ReverseProperties": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Common"
          },
          {
            "properties": {
              "distance_m": {
                "description": "Distance from the queried point in meters. Present only on the\naddress or street result, not on areas.",
                "format": "double",
                "type": "number"
              }
            },
            "type": "object"
          }
        ],
        "description": "Properties of a reverse geocoding result."
      },
      "Source": {
        "description": "Source data the result comes from.",
        "properties": {
          "dataset": {
            "type": "string"
          },
          "derived_from": {
            "type": "string"
          },
          "object_id": {
            "format": "int64",
            "type": "integer"
          },
          "object_type": {
            "$ref": "#/components/schemas/ObjectType"
          },
          "record_count": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "dataset"
        ],
        "type": "object"
      },
      "Version": {
        "description": "API version. Changes only when a field is removed or changes meaning.\nNew optional fields keep the version.",
        "enum": [
          "1"
        ],
        "type": "string"
      },
      "u64": {
        "format": "int64",
        "minimum": 0,
        "type": "integer"
      }
    }
  },
  "info": {
    "description": "Forward, autocomplete and reverse geocoding of addresses, served from a Pack built from OpenStreetMap and OpenAddresses.\n\nEvery response is a GeoJSON FeatureCollection. Forward results carry a `score`, and a `confidence` when the Pack is calibrated. Reverse results carry a `distance_m`.\n\nErrors are RFC 9457 problem documents (`application/problem+json`). Branch on `error_code`. `title` and `detail` are prose and may change.",
    "license": {
      "identifier": "MIT",
      "name": "MIT"
    },
    "title": "open-geocode",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/autocomplete": {
      "get": {
        "description": "Suggests addresses for partial text, as a user types. An empty or very\nshort `q` returns no results.",
        "operationId": "autocomplete",
        "parameters": [
          {
            "description": "Text typed so far.",
            "example": "10 King St",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "description": "Maximum number of results. `0`, the default, lets the server choose.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 20,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return only results of this layer. An unknown layer returns `400`.",
            "in": "query",
            "name": "layer",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Layer"
            }
          },
          {
            "description": "Return only results in these countries, as comma-separated ISO 3166-1 alpha-2 codes. A code that is not two letters returns `400`. A code the Pack does not cover returns no results.",
            "example": "NZ,AU",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Point to prefer results near, as `lon,lat`. Breaks ties between equally good matches only.",
            "example": "-79.38,43.65",
            "in": "query",
            "name": "focus",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Return only results inside this box, as `min_lon,min_lat,max_lon,max_lat`. The box cannot cross the antimeridian.",
            "example": "-79.64,43.58,-79.12,43.86",
            "in": "query",
            "name": "bbox",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForwardCollection"
                }
              }
            },
            "description": "Suggested results, highest `score` first.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "`q` is too long, `limit` is too large, `focus` or `bbox` is out of range, or a parameter is malformed.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Autocomplete addresses",
        "tags": [
          "geocoding"
        ]
      }
    },
    "/geocode": {
      "get": {
        "description": "Geocodes an address given as separate fields, and returns the best match\nor no result. `address` is matched on its own, then checked against\n`locality`, `region` and `postcode`.\n\n- A house number missing from the data is interpolated between its\n  neighbours (`accuracy: interpolated`), or answered with its street\n  (`accuracy: street`).\n- A street matches `postcode` only when postcode data confirms it.\n- A different house is never returned: `10/1367` matches as written or\n  as 1367, never as house 10.\n- `geocoding.query` is the form of the address that matched, which can\n  differ from `address`.",
        "operationId": "geocode",
        "parameters": [
          {
            "description": "House number and street, without town or postcode.",
            "example": "10 King Street",
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "City or town.",
            "example": "Toronto",
            "in": "query",
            "name": "locality",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "description": "State, province or region.",
            "example": "Ontario",
            "in": "query",
            "name": "region",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "description": "Postal code.",
            "example": "M5V 1A1",
            "in": "query",
            "name": "postcode",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "description": "Number of candidates to consider. `0`, the default, lets the server choose. At most one result is returned.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 50,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Consider only candidates of this layer. An unknown layer returns `400`.",
            "in": "query",
            "name": "layer",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Layer"
            }
          },
          {
            "description": "Return only results in these countries, as comma-separated ISO 3166-1 alpha-2 codes. A code that is not two letters returns `400`. A code the Pack does not cover returns no results.",
            "example": "NZ,AU",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForwardCollection"
                }
              }
            },
            "description": "The best match, or no features when nothing matches.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "`address` is empty or too long, another field is too long, `limit` is too large, or a parameter is malformed.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Geocode a structured address",
        "tags": [
          "geocoding"
        ]
      }
    },
    "/healthz": {
      "get": {
        "description": "Returns `200` while the server is running, even before the Pack is loaded.\nUse `/readyz` to check that it can geocode. The body is empty.",
        "operationId": "healthz",
        "responses": {
          "200": {
            "description": "The server is running.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Check liveness",
        "tags": [
          "operations"
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "description": "Returns the OpenAPI 3.1 document describing this server's API.",
        "operationId": "openapi_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {}
            },
            "description": "The OpenAPI document.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Get the OpenAPI document",
        "tags": [
          "operations"
        ]
      }
    },
    "/readyz": {
      "get": {
        "description": "Returns `200` once the Pack is loaded, and `503` before that. The body is\nempty.",
        "operationId": "readyz",
        "responses": {
          "200": {
            "description": "The Pack is loaded.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "The Pack is not loaded yet.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Check readiness",
        "tags": [
          "operations"
        ]
      }
    },
    "/reverse": {
      "get": {
        "description": "Returns the nearest address or street to a point, followed by the areas\nthat contain the point, most precise first. Only the first result carries\n`distance_m`.",
        "operationId": "reverse",
        "parameters": [
          {
            "description": "Longitude in degrees.",
            "example": -79.3832,
            "in": "query",
            "name": "lon",
            "required": true,
            "schema": {
              "format": "double",
              "maximum": 180,
              "minimum": -180,
              "type": "number"
            }
          },
          {
            "description": "Latitude in degrees.",
            "example": 43.6532,
            "in": "query",
            "name": "lat",
            "required": true,
            "schema": {
              "format": "double",
              "maximum": 90,
              "minimum": -90,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReverseCollection"
                }
              }
            },
            "description": "Results at the point, most precise first. `features` is empty when nothing is near.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "`lon` or `lat` is missing or out of range.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Reverse geocode a point",
        "tags": [
          "geocoding"
        ]
      }
    },
    "/search": {
      "get": {
        "description": "Geocodes free-form text, such as a full address, to coordinates. Results\nare sorted by `score`, highest first.",
        "operationId": "search",
        "parameters": [
          {
            "description": "Text to geocode, such as a full address.",
            "example": "10 King Street, Toronto",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Maximum number of results. `0`, the default, lets the server choose.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 50,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Return only results of this layer. An unknown layer returns `400`.",
            "in": "query",
            "name": "layer",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Layer"
            }
          },
          {
            "description": "Return only results in these countries, as comma-separated ISO 3166-1 alpha-2 codes. A code that is not two letters returns `400`. A code the Pack does not cover returns no results.",
            "example": "NZ,AU",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Point to prefer results near, as `lon,lat`. Breaks ties between equally good matches only.",
            "example": "-79.38,43.65",
            "in": "query",
            "name": "focus",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Return only results inside this box, as `min_lon,min_lat,max_lon,max_lat`. The box cannot cross the antimeridian.",
            "example": "-79.64,43.58,-79.12,43.86",
            "in": "query",
            "name": "bbox",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForwardCollection"
                }
              }
            },
            "description": "Matching results, highest `score` first.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "`q` is empty or too long, `limit` is too large, `focus` or `bbox` is out of range, or a parameter is malformed.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Method not allowed. The route accepts `GET` only.",
            "headers": {
              "Allow": {
                "description": "Methods the route accepts.",
                "schema": {
                  "example": "GET",
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error.",
            "headers": {
              "X-Request-Id": {
                "description": "ID the request is logged under: the request's own `X-Request-Id` when it sent one. Include it in bug reports.",
                "schema": {
                  "maxLength": 128,
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "Search addresses",
        "tags": [
          "geocoding"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Local server on the default address.",
      "url": "http://127.0.0.1:8080"
    }
  ],
  "tags": [
    {
      "description": "Geocode addresses and points.",
      "name": "geocoding"
    },
    {
      "description": "Health checks and the OpenAPI document.",
      "name": "operations"
    }
  ]
}
