API reference · Lookups

Find places (GeoNames) for the places filter

GEThttps://trawle.com/v1/places

Cities, metro areas, states, countries and multi-country regions ("EMEA", "Europe", "Anywhere") whose name starts with q. Use items[].id in JobQuery.places; context tells homonyms apart.

Query

  • qstringrequired

    Place name.

    Limits
    1 to 100 characters
    Example
    copenhagen
  • limitintegeroptional
    Default
    8
    Limits
    1 to 20
200Best matches first.
  • itemsarray<object> · PlaceMatchrequired
    5 propertiesper item
    • idintegerrequired

      GeoNames id (regions are negative).

    • namestringrequired
      Example
      Copenhagen
    • countrystring | nullrequired

      ISO 3166-1 alpha-2 country code; null for multi-country regions.

      Example
      DK
    • kindstringrequired
      One of
      citymetroadmin1countryregion
    • contextstring | nullrequired

      Where it is, for telling homonyms apart ("Washington, United States").

400Invalid request: see error.issues and error.hint.Error
  • errorobjectrequired
    4 properties
    • codestringrequired

      Machine-readable: invalid_request, not_found, forbidden, rate_limited, internal.

      Example
      invalid_request
    • messagestringrequired
      Example
      places: expected an array of GeoNames ids
    • hintstringoptional

      What to do next, e.g. which lookup to call first.

      Example
      Resolve place names to ids with GET /v1/places?q=
    • issuesarray<object>optional

      Validation problems, one per invalid field.

      2 propertiesper item
      • pathstringrequired
      • messagestringrequired