GET

TripAdvisor Geo Search API

Map city or location names to TripAdvisor geo IDs for use with the Search endpoint.

Overview

Geo ID Lookup

Use this endpoint to resolve location names (e.g., "Paris", "Bangkok") into TripAdvisor geo IDs, which are required by the Search endpoint.

The Geo Search endpoint accepts a location name and returns matching geographic locations with their geo IDs. Pass the returned geo_id directly to /v1/tripadvisor/search to find hotels in that location.

Endpoint URL

GET https://api.stayapi.com/v1/tripadvisor/geo-search

Query Parameters

Parameter Type Required Description
query string Required Location name to search for (e.g., "Paris", "Bangkok", "New York")

Example Geo IDs

Use with Search

Pass the geo_id from this endpoint directly to /v1/tripadvisor/search?geo_id=... to search for hotels in that location.

Location Geo ID Type
Paris, Ile-de-France, France 187147 CITY
Bangkok, Thailand 293916 CITY
New York City, New York, US 60763 CITY
Phuket, Thailand 293920 ISLAND
London, England, UK 186338 CITY

Response Data

Result Fields

  • geo_id — TripAdvisor geographic ID (use with Search endpoint)
  • name — Location name
  • secondary_text — Parent region or country
  • geo_type — Location type (CITY, ISLAND, MUNICIPALITY, etc.)
Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/geo-search?query=Paris" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "query": "Paris",
  "results": [
    {
      "geo_id": 187147,
      "name": "Paris",
      "secondary_text": "Ile-de-France, France",
      "geo_type": "CITY"
    }
  ],
  "result_count": 1
}