bookachoo

Query Locations

Find locations matching a query string.

Request
Query parameters
NameTypeDescription
q required string

Query string to match by.
Either matches by IATA code or tries to perform trigram matching on a normalized version of the location’s name (i.e. with diacritics removed).

Example: q=Ams
Responses
  • Successful response with list of, max 10, matching locations ordered from best to worst.

    Body
    Property pathTypeDescription
    [].country optional string

    UK English name of the country the location is in

    Example: "The United Kingdom"
    [].iataCode optional string

    Optional IATA city code

    Example: "LON"
    [].id optional string

    Geohash of the location

    Example: "gcpvj0u6yj"
    [].name optional string

    Common name of the location in English

    Example: "London"
    Example
    [
      {
        "country": "Netherlands",
        "iataCode": "AMS",
        "id": "u173zq2sf4",
        "name": "Amsterdam"
      },
      {
        "country": "United States of America",
        "iataCode": null,
        "id": "drehrb9zcz",
        "name": "Amsterdam"
      },
      {
        "country": "Austria",
        "iataCode": null,
        "id": "u2d9f2t80n",
        "name": "Amstetten"
      },
      {
        "country": "Germany",
        "iataCode": null,
        "id": "u0xh2emzy1",
        "name": "Amstetten"
      },
      {
        "country": "Netherlands",
        "iataCode": null,
        "id": "u173w9jf2v",
        "name": "Amstelveen"
      },
      {
        "country": "Netherlands",
        "iataCode": null,
        "id": "u1h1yc1qnj",
        "name": "Amstenrade"
      },
      {
        "country": "Netherlands",
        "iataCode": null,
        "id": "u17994k9m0",
        "name": "Amsterdam-Zuidoost"
      }
    ]
  • Bad request due to invalid query parameters

    Body
    Property pathTypeDescription
    error object  
    error.description optional string

    Optional longer explanation describing the error.

    error.message string

    Concise error message.

    error.reason optional string

    Optional underlying reason that caused the error to happen.