Skip to content
Navigation

Search places

GET
https://api.nicer.travel/search/places

Search hotels, cities, airports and places by text. Hotels come from the Smith and shared catalogs first, then Google; cities and airports from the travel reference. Anonymous calls share one budget across the search routes, 600 per hour per IP; a valid bearer token lifts it. Accept: text/event-stream streams ranked snapshots as sources finish.

Authorization

  • bearerAuth
    optional
    HTTP Bearer (JWT)

    Authorization: Bearer <token>

Query parameters

  • q
    string
    required

    Free text: a hotel, city, airport or venue name.

    maxLength: 100 · minLength: 2
  • kinds
    optional
    string

    Comma-separated kinds to return: hotel, city, airport, place. All kinds when omitted.

    pattern: ^(?:hotel|city|airport|place)(?:,(?:hotel|city|airport|place))*$
  • type
    optional
    string

    Google place type filter for place results, for example restaurant or tourist_attraction.

    maxLength: 40 · minLength: 1 · pattern: ^[a-z_]+$
  • limit
    optional
    integer

    Maximum items after ranking.

    maximum: 50 · minimum: 1 · default: 10
  • photos
    optional
    integer

    Photos per item in the list. The place details resource carries the full album.

    maximum: 3 · minimum: 0 · default: 0

Header parameters

  • Accept
    optional
    application/json
    or
    text/event-stream

    application/json (default) for one document, text/event-stream for ordered snapshots as sources finish.

Returns

200

JSON, or SSE frames when the request accepts text/event-stream (the event schema describes each frame's JSON data).

JSON
  • items
    array of
    object
    required
    • id
      string
      required
    • kind
      hotel
      or
      city
      or
      airport
      or
      place
      required
    • source
      string
      required
    • name
      string
      required
    • photos
      array of
      object
      required
      • url
        string
        required
      • name
        optional
        string
      • key
        optional
        string
    • address
      optional
      string
    • fullAddress
      optional
      string
    • city
      optional
      string
    • state
      optional
      string
    • country
      optional
      string
    • countryCode
      optional
      string
    • zipCode
      optional
      string
    • latitude
      optional
      number
    • longitude
      optional
      number
    • iataCode
      optional
      string
    • hotelReference
      optional
      string
    • placeId
      optional
      string
text/event-stream

Type:string

string

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

429

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close