v1

latestOpenAPI 3.0.12026-07-24178873.1 KB
Location

Search Nearby Locations

Finds Locations within a geographic area, ordered by proximity or rating.

<p>The search area is defined either by a center point and radius or by a bounding box, supplied via the <code>search</code> parameters. Results are restricted to Locations you are licensed to access and return the full Location representation, optionally with a single representative photo.
get/locations/nearby

Query parameters

location_idstring

The ID of the Location to use as a reference for the radius-based search.

<p> Required if `lat` or `lon` is not given.
latnumber

The latitude of the center point for the radius-based search.

<p> Required if `location_id` not given.
lonnumber

The longitude of the center point for the radius-based search.

<p> Required if `location_id` not given.
radiusnumber double

The radius for the radius-based search.

<p> Required if "Bounding Box" criteria is not given (`sw_lat`, `sw_lon`, `ne_lat`, `ne_lon`).
unitstring
Example:KM

Unit of length for distance. If none specified defaults to miles.

sw_latstring

Bounding Box southwest latitude coordinate.

<p> Required if `radius` is not given.
sw_lonstring

Bounding Box southwest longitude coordinate.

<p> Required if `radius` is not given.
ne_latstring

Bounding Box northeast latitude coordinate.

<p> Required if `radius` is not given.
ne_lonstring

Bounding Box northeast longitude coordinate.

<p> Required if `radius` is not given.
category'RESTAURANT' | 'ATTRACTION' | 'HOTEL'

Filter based on Tripadvisor’s top-level categories (eat & drink, accommodations, attractions).

min_ratingstring

Filter by ratings with at least N bubbles (1.0-5.0).

include_photoboolean

when <code>true</code>, include a single representative photo for each Location

localestring[]

preferred locales for localized fields (e.g. names, descriptions), in priority order; falls back to the default locale when omitted

pageinteger

Page index (1-based).

sizeinteger

Page size.

sortstring[]

Sorting criteria in the format: property,(asc|desc). Multiple sort criteria are supported. Available sorting: distance (for radius-based search only), rating

Response

a page of Locations within the requested area, each annotated with its distance and bearing from the search center

Example response

{
  "data": [
    {
      "location": {
        "opening_hours": {
          "periods": [
            {
              "closes": "20:00:00",
              "opens": "08:00:00"
            }
          ]
        }
      }
    }
  ]
}