# AI Travel Agent (`scrapeai/ai-travel-agent`) Actor

List Booking.com hotels and other properties for a destination through Google Images results, without opening booking.com. Returns property ID, page URL, name and city as Google shows them. No prices, availability, ratings, Airbnb listings or preference matching.

- **URL**: https://apify.com/scrapeai/ai-travel-agent.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### AI Travel Agent

**Status (2026-11-14): works in the default Google Images mode; the optional Google web mode stays limited.** Images mode returns Booking.com hotels and other properties with property path, URL, name and city, but **no rating, review count or price**: Google's image results do not show them. **It does not open booking.com, and it needs no Gemini or other API key.**

#### Result sources (`resultSource`)

| | `images` (default) | `web` (opt-in) |
| --- | --- | --- |
| Google page read | Google Images results of `site:booking.com/hotel "<destination>"` | Google web results of the same query |
| How the property URL is found | Google writes it in plain text next to every image result, so rows come back reliably | Google often writes it as an opaque redirect link (`/goto?url=<token>`), which this Actor never opens, so those results are skipped and a run can return few rows or none |
| Fields per row | property path (`country/slug`), URL, name, city | property path, URL, name and, only when Google's result shows them: city, area, rating, review count, snippet |
| Rows per Google request | a full page lists 60 to 80 different properties (fewer for narrow queries) | 10 results, many of them skipped |
| `dataOrigin` of the row | `google-serp-images` | `google-serp` |

#### Where the data comes from

- Each row is one landing page that Google lists for a query such as `site:booking.com/hotel "Rome"`.
- The Google pages are fetched through the Apify Proxy group `GOOGLE_SERP`, which serves Google Search results only. The only URL requested is `http://www.google.com/search?...` with default headers; no other Google path and no other website is ever requested.
- Images mode reads two things from each image result: the landing page URL (Google's plain `data-lpage` attribute) and the image title (`alt` text, for example `Six Senses Rome, Rome (updated prices 2027)`). The property path and URL come from the page URL; the name and city come from the title (`<name>, <city> (updated prices <year>)`, split at the last comma). The Google click-through links in the same markup are never read or followed.
- The property URL is stored without any query string.
- Every row says where it came from: `dataOrigin` is `google-serp-images` or `google-serp`.

#### Measured results

Measured on 2026-11-14 through `GOOGLE_SERP` (hl=en, gl=us), one request per page:

| Query and page | Result |
| --- | --- |
| `site:booking.com/hotel "Rome"`, first page | 100 image results, 76 different Booking.com property pages (every one a `/hotel/<country>/<slug>.html` page with a `<name>, <city> (updated prices 2027)` title) |
| the same query with `start=10` | 50 results, 44 pages (20 not listed on the first page) |

Platform test runs on 2026-11-14 with the default input (builds 0.1.9 and 0.1.10 have the same first-page behavior), each with one Google request. In every run all property paths were different, no name was empty and every row has a city:

| Destination | Rows | Google's page |
| --- | --- | --- |
| `Vienna` (build 0.1.9) | 50 | 66 different properties (11 of the 50 rows are Chinese hotels with "Vienna" in their name, which match the exact phrase searched) |
| `Paris` | 50 | 100 image results, 77 different properties (43 of the 50 rows are in Paris; the others are pages that mention Paris, for example in Las Vegas) |
| `Barcelona` | 50 | 100 image results, 59 different properties |
| `Lisbon` | 50 | 100 image results, 69 different properties |

For Argos the same kind of Google Images request returned about 3 usable pages (`start=` 0, 10, 20) and nothing after that, so `start=` does return further images but the pages overlap irregularly. A page with fewer than 100 image results is the last one (the 50-result page above). Images mode therefore asks for the next page (`start=10`, then `20`, ...) only while fewer than `maxItems` rows were found, the previous page was full (100 image results) and it still brought pages that had not been listed; it never repeats a request and never requests further pages after a short one. A run with `maxItems` up to 50 normally needs one Google request.

The web mode result on 2026-11-13 (three destinations): one returned 10 rows and two failed. On 2026-11-14 (build 0.1.10, `Rome`, one page) it returned 10 rows. Images mode replaced it as the default because web results fail for many destinations.

#### Why not Booking.com itself?

Booking.com answers clients that are not full browsers with an AWS WAF JavaScript challenge. On 2026-11-13 the search results page was tried with plain, honest requests (default `User-Agent`, no browser or TLS impersonation), one request per configuration:

| Route | Result |
| --- | --- |
| Apify datacenter proxy (US) | `HTTP 202` with the AWS WAF JavaScript challenge page |
| Apify residential proxy (NL) | `HTTP 202` with the AWS WAF JavaScript challenge page |

The Actor stops there. It does not solve the challenge, run a stealth browser, rotate proxies or try to get past it.

#### Input

| Field | Meaning |
| --- | --- |
| `query` | Destination (city, area or property name). It is searched as an exact phrase: `site:booking.com/hotel "<destination>"`. Default `Amsterdam`. |
| `startUrls` | Optional Booking.com search URLs (the `ss=` destination is used) or property URLs. They are not requested; they only become Google queries and replace `query`. |
| `resultSource` | `images` (default) or `web`, see the table above. |
| `maxItems` | 1 to 50 properties. |
| `maxSearchPages` | Most Google pages to read per query (every page is one billed `GOOGLE_SERP` request). Images mode reads a further page only while fewer than `maxItems` rows were found. |
| `country`, `language` | Google `gl` and `hl` values. Default `us` and `en`. |
| `proxyConfiguration` | Must use the Apify Proxy group `GOOGLE_SERP` (the default). |

#### Output

One dataset item per property. Top level: `dataOrigin`, `sourceUrl`, `itemUrl`, `id` (property path such as `nl/botel`), `title` (as Google shows it: the result title, or the image title in images mode), `searchQuery`, `searchRank` (position in the Google results), `statusCode` (status of the Google page), `scrapedAt`; web mode adds `description` (the snippet).

Inside `data`:

- Images mode: `propertyId`, `name`, `countryCode`, `slug`, `url` and `city` (when the image title has the form `<name>, <city> (updated prices <year>)`).
- Web mode: `propertyId`, `name`, `countryCode`, `slug`, `url` and, **only when Google's result shows them**: `city`, `area` (from a breadcrumb such as "Hotels in Toronto"), `rating`, `ratingScale` (Google shows Booking.com scores out of 5), `reviewCount` and `snippet`.

A value that Google does not show is absent, never estimated.

#### Limits

- Only property pages that Google has indexed and chooses to list are returned. Google's image results change between searches, so two runs can return different properties.
- Not available in images mode: rating and review count. Not available in either mode: prices, availability for dates, room types, photos, amenities lists, host details, Airbnb listings and AI filtering by preferences (the former Gemini step is gone). The Store listing for this Actor describes a travel agent over Booking.com and Airbnb; this version returns only the Google-based Booking.com subset described here.
- Google may list fewer properties than requested for a destination; the run then returns what it found and fails only when nothing usable came back.
- In web mode, results whose link is an opaque redirect are skipped, so the number of rows changes from run to run and can be zero. The Actor never requests a Google results page again to get a different link format: the only repeat is one retry after a timeout or connection error, and an HTTP error status or a verification page ends the run.
- Google sometimes mixes other sites' pages into a `site:` query, and Booking.com list pages (not single properties) can appear. Those results are skipped (counted in `RUN_SUMMARY`).
- Each Google page is billed by Apify Proxy, in addition to the per-result price.

#### Run locally

```powershell
npm start
```

`npm start` reads this folder's `input.json` and needs `APIFY_PROXY_PASSWORD` for the `GOOGLE_SERP` group. Unit tests (parsing of saved Google pages, request rules, schema checks): `npm test`.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapeai/ai-travel-agent/changelog.md

# Actor input Schema

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

City, area or property name, searched on Google as site:booking.com/hotel "<destination>" (an exact phrase), for example Amsterdam or Lisbon.

## `startUrls` (type: `array`):

Booking.com search URLs (the ss= destination is used) or property URLs. They are never requested: only the destination or the property path in them is turned into a Google query. When set, they replace the destination.

## `resultSource` (type: `string`):

images (default): reads Google Images results, which give the property page URL in plain text for most queries, so a run reliably returns rows with property path, URL, name and city (no rating, review count or price). web: reads Google web results, which add rating and review count when Google shows them, but Google often writes those result links in an opaque form that this Actor skips, so a run can return few rows or none.

## `maxItems` (type: `integer`):

Maximum number of properties to return (1 to 50).

## `maxSearchPages` (type: `integer`):

Google result pages to read per query (every page is one billed GOOGLE_SERP request). Images mode: a full first page lists 60 to 80 different properties; a further page is requested only while fewer than Max Items rows were found, the previous page was full (100 image results) and it still brought new pages. Web mode: 10 results per page.

## `country` (type: `string`):

Two-letter country code sent to Google (gl).

## `language` (type: `string`):

Two-letter language code sent to Google (hl).

## `requestTimeoutSecs` (type: `integer`):

Maximum time to wait for one Google results page.

## `proxyConfiguration` (type: `object`):

Google Search pages are fetched through the Apify Proxy group GOOGLE_SERP, which serves Google Search only. Keep it selected; other groups cannot fetch Google results.

## Actor input object example

```json
{
  "query": "Amsterdam",
  "resultSource": "images",
  "maxItems": 50,
  "maxSearchPages": 5,
  "country": "us",
  "language": "en",
  "requestTimeoutSecs": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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": "Amsterdam",
    "resultSource": "images",
    "maxItems": 50,
    "maxSearchPages": 5,
    "country": "us",
    "language": "en",
    "requestTimeoutSecs": 40,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "GOOGLE_SERP"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/ai-travel-agent").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": "Amsterdam",
    "resultSource": "images",
    "maxItems": 50,
    "maxSearchPages": 5,
    "country": "us",
    "language": "en",
    "requestTimeoutSecs": 40,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["GOOGLE_SERP"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/ai-travel-agent").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": "Amsterdam",
  "resultSource": "images",
  "maxItems": 50,
  "maxSearchPages": 5,
  "country": "us",
  "language": "en",
  "requestTimeoutSecs": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}' |
apify call scrapeai/ai-travel-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeai/ai-travel-agent"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fT0XgL1ePxglPw98Q/builds/UOLTTtlHqyBlpeyzD/openapi.json
