# Tripadvisor Auto-Complete (`burbn/tripadvisor-auto-complete`) Actor

Instant Tripadvisor location & search suggestions! Extract Location IDs, coordinates (lat/lng), parent geos, timezones, high-res photos, and default options. Build perfect search bars or maps with clean, structured travel data. Super-fast, reliable, and cost-efficient!

- **URL**: https://apify.com/burbn/tripadvisor-auto-complete.md
- **Developed by:** [Kevin](https://apify.com/burbn) (community)
- **Categories:** Travel, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Tripadvisor Auto Complete | Location Suggestion API

Get instant auto-complete suggestions for locations, hotels, restaurants, and attractions from Tripadvisor. Type a query and receive rich, structured location data including geo pages, coordinates, photos, and hierarchical location info.

### ❓ What is Tripadvisor Auto Complete?

**Tripadvisor Auto Complete** is a powerful Apify actor that provides instant auto-complete suggestions from Tripadvisor for any search term. Whether you are looking for cities, regions, hotels, restaurants, or tourist attractions, this actor retrieves matching location suggestions with detailed geographic data, photos, and location hierarchy.

With this Tripadvisor Auto Complete actor, you can:

- 🔍 **Instant Suggestions** — Get auto-complete results for any location name, city, or place keyword.
- 🌐 **Geographic Data** — Retrieve coordinates, timezones, geo types, and location hierarchy.
- 📄 **Geo Pages** — Discover associated pages like Hotels, Restaurants, Things to Do, and Vacation Rentals.
- 🖼️ **Rich Photos** — Get photo URLs in multiple sizes (thumbnail, small, medium, large, original).
- 🗂️ **Location Hierarchy** — View ancestors chain showing country, state, and city relationships.
- 📊 **Export Structured Data** — Download your results in JSON, CSV, Excel, XML, and RSS formats.

### 🎯 What Data Can You Extract?

This Tripadvisor Auto Complete actor extracts a wide range of fields for each result:

| Field | Description | Example |
|-------|-------------|---------|
| `query` | The original search query | `California` |
| `result_type` | Type of result (`geos`, `geo_pages`, `things_to_do`) | `geos` |
| `location_id` | Unique Tripadvisor location identifier | `28926` |
| `name` | Name of the location or attraction | `California` |
| `location_string` | Full location description with hierarchy | `California, United States` |
| `latitude` | Geographic latitude | `37.511375` |
| `longitude` | Geographic longitude | `-121.07013` |
| `timezone` | Local timezone of the location | `America/Los_Angeles` |
| `geo_type` | Geographic scope (`broad`, `narrow`) | `broad` |
| `geo_page_type` | Associated page type (e.g., `lodging`) | `lodging` |
| `geo_page_name` | Associated page name | `Hotels in California` |
| `address` | Physical address (when available) | `55 Music Concourse Dr` |
| `is_closed` | Whether the location is permanently closed | `false` |
| `has_restaurant_coverpage` | Whether restaurant listings are available | `true` |
| `has_attraction_coverpage` | Whether attraction listings are available | `true` |
| `default_options` | Available sections (overview, restaurants, hotels, etc.) | `[{"key": "overview", ...}]` |
| `ancestors` | Location hierarchy (country, state, city) | `[{"name": "United States", ...}]` |
| `parent_display_name` | Parent location display name | `United States` |
| `photoUrl` | Direct URL to the location photo | `https://media-cdn.tripadvisor.com/...` |
| `photo_caption` | Photo caption text | `Indian Wells Golf Resort` |
| `scope` | Result scope | `local` |

### 🚀 How to Use Tripadvisor Auto Complete

#### Step 1: Enter a Search Query

Provide a location name, city, region, or landmark. E.g., `California`, `Paris`, `Eiffel Tower`.

#### Step 2: Configure Parameters

| Input | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `query` | String | ✅ Yes | `California` | Name of cities, districts, places, etc. to search. |
| `lang` | String | ❌ No | `en_US` | The language code for responses (e.g., `en_US`, `fr_FR`). |
| `units` | String | ❌ No | `km` | Distance measurement units: `km` or `mi`. |

#### Step 3: Run and Download Results

Click **Start** to run the Tripadvisor Auto Complete scraper. Once completed, download your data in JSON, CSV, Excel, XML, or RSS formats.

### 📋 Example Input

```json
{
  "query": "California",
  "lang": "en_US",
  "units": "km"
}
````

### 📋 Example Output

```json
{
  "query": "California",
  "result_type": "geos",
  "location_id": "28926",
  "name": "California",
  "location_string": "California, United States",
  "latitude": "37.511375",
  "longitude": "-121.07013",
  "timezone": "America/Los_Angeles",
  "geo_type": "broad",
  "show_address": true,
  "has_attraction_coverpage": true,
  "default_options": [
    {
      "key": "overview",
      "name": "California Overview"
    }
  ],
  "ancestors": [
    {
      "name": "United States",
      "location_id": "191",
      "level": "Country"
    }
  ],
  "parent_display_name": "United States",
  "photoUrl": "https://media-cdn.tripadvisor.com/media/photo-o/15/33/fa/ec/california.jpg",
  "scope": "local"
}
```

### 🎨 Dataset Views

The Tripadvisor Auto Complete actor provides **3 organized dataset views** to help you inspect and analyze your data seamlessly:

| View | Description |
|------|-------------|
| 🌍 **Results Overview** | Quick scan showing Name, Type, Location, Location ID, Parent, and Scope. |
| 📋 **Geo & Details** | Geographic deep dive including Name, Coordinates, Timezone, Geo Type, Address, and Closed status. |
| 🖼️ **Visuals & Pages** | Visual data showing Name, Photo, Caption, Page Type, Page Name, and Coverpage availability. |

### 💡 Use Cases for Tripadvisor Auto Complete

- 🔍 **Search Autocomplete UIs** — Build auto-suggest search bars for travel websites and apps.
- 🗺️ **Location Discovery** — Quickly discover location IDs, coordinates, and hierarchy for Tripadvisor places.
- 📈 **Travel Research** — Explore what geographic areas, pages, and options are available for any destination.
- 📍 **GIS & Mapping** — Obtain clean geocoordinates, timezone data, and precise location hierarchies.
- 🔗 **Data Enrichment** — Enrich your travel database with structured Tripadvisor location suggestions.

### 🔧 Tips for Best Results

1. **Be Specific** — Use specific location names like `California Desert` instead of just `California` if you want targeted results.
2. **Try Different Languages** — Change the `lang` parameter to get localized location names and descriptions.
3. **Utilize Dataset Views** — Use the preconfigured Apify views (like **Results Overview** or **Geo & Details**) for clean, ready-to-use CSV or Excel files.

### 🏷️ Tags

`tripadvisor scraper` `tripadvisor auto complete` `tripadvisor autocomplete` `tripadvisor search` `location autocomplete` `travel data api` `travel advisor scraper` `location finder` `places scraper` `tourism scraper` `tripadvisor suggestions` `geo search` `location search` `tripadvisor api` `destination finder`

### 🎁 Get $5 Free Apify Credits

New to Apify? [Sign up using this link](https://apify.com?fpr=free-credits) and get **$5 free credits** to start using Tripadvisor Auto Complete right away! No credit card required.

### 📞 Support

For questions, feedback, or custom requests regarding the Tripadvisor Auto Complete actor, please contact us through Apify or open a support issue.

***

**Happy searching! 🌍✨**

# Actor input Schema

## `query` (type: `string`):

Enter a location name to auto-complete (e.g., 'California', 'Paris', 'Tokyo').

## `lang` (type: `string`):

The language code for responses (e.g., en\_US, fr\_FR, de\_DE).

## `units` (type: `string`):

Distance measurement units.

## Actor input object example

```json
{
  "query": "Tokyo",
  "lang": "en_US",
  "units": "km"
}
```

# Actor output Schema

## `overview` (type: `string`):

View a list of auto-complete suggestions with location details.

## `geoDetails` (type: `string`):

View geographic details, coordinates, and ancestor hierarchy.

## `visualsAndPages` (type: `string`):

View photos, geo pages, and default options.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "Tokyo"
};

// Run the Actor and wait for it to finish
const run = await client.actor("burbn/tripadvisor-auto-complete").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "Tokyo" }

# Run the Actor and wait for it to finish
run = client.actor("burbn/tripadvisor-auto-complete").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "Tokyo"
}' |
apify call burbn/tripadvisor-auto-complete --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=burbn/tripadvisor-auto-complete",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tripadvisor Auto-Complete",
        "description": "Instant Tripadvisor location & search suggestions! Extract Location IDs, coordinates (lat/lng), parent geos, timezones, high-res photos, and default options. Build perfect search bars or maps with clean, structured travel data. Super-fast, reliable, and cost-efficient!",
        "version": "1.0",
        "x-build-id": "IIG9kUXiZBekSECdF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/burbn~tripadvisor-auto-complete/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-burbn-tripadvisor-auto-complete",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/burbn~tripadvisor-auto-complete/runs": {
            "post": {
                "operationId": "runs-sync-burbn-tripadvisor-auto-complete",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/burbn~tripadvisor-auto-complete/run-sync": {
            "post": {
                "operationId": "run-sync-burbn-tripadvisor-auto-complete",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "🔍 Search Query",
                        "type": "string",
                        "description": "Enter a location name to auto-complete (e.g., 'California', 'Paris', 'Tokyo').",
                        "default": "Tokyo"
                    },
                    "lang": {
                        "title": "🗣️ Language",
                        "type": "string",
                        "description": "The language code for responses (e.g., en_US, fr_FR, de_DE).",
                        "default": "en_US"
                    },
                    "units": {
                        "title": "📏 Units",
                        "enum": [
                            "km",
                            "mi"
                        ],
                        "type": "string",
                        "description": "Distance measurement units.",
                        "default": "km"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
