# nearstay: where to stay, near where you need to be (`nextgensda/nearstay`) Actor

Trip research MCP server for AI agents: stays from Airbnb and Google Hotels in one list, ranked by transit, walking or driving time to the places you must reach, with the real total including taxes, what's within a walk, and flights.

- **URL**: https://apify.com/nextgensda/nearstay.md
- **Developed by:** [Tauqeer Abbas](https://apify.com/nextgensda) (community)
- **Categories:** Travel, AI, MCP servers
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

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

## nearstay: where to stay, near where you need to be (MCP server)

![nearstay: homes and hotels in one list, ranked by real travel time to where you need to be, with the true total](https://api.apify.com/v2/key-value-stores/9dCXmAgO4t9PNmkYd/records/banner-2026-11-18.png?signature=RMTC4cPzanzVmXhMNDA8)

**nearstay** is an MCP server that lets an AI agent plan a stay the way a careful person would. It puts Airbnb homes and hotels in one list, ranks them by **real travel time** (transit, walking, driving or cycling) to the places you actually need to reach, and shows **what it really costs**: Airbnb's checkout total with taxes and fees, and every booking site's price for hotels. It also covers what's within walking distance, and flights.

Ask your assistant things like:

- *"I have a conference at Moscone Center from Dec 18 to 22, flying from Boston, about $2k all in. What's the best flight and a stay within 20 minutes by transit?"*
- *"A month near my new office in Lisbon, with a supermarket within a 5-minute walk. Compare monthly Airbnb rates and hotels."*
- *"Airbnb or hotel for this trip? Show the real totals and how long each takes to get to the venue."*
- *"8 of us, a 4-bedroom place near the wedding venue: which weekend in June is cheapest to fly to?"*

It's for research only: nothing is booked. Every result links to where it can be booked.

### Tools

| Tool | What it does |
|---|---|
| `place_search` | Pin a venue, office, address or landmark (Google Maps). |
| `find_stays` | Airbnb + Google Hotels (and vacation rentals) for your dates, in a city or around a place. The same hotel on both sources is one row with both prices. |
| `rank_stays` | Travel time from each stay to up to 4 places, in all four modes, ranked by the mode you choose. |
| `stay_details` | For an Airbnb: description, beds and baths, amenities, house rules, ratings by category, host stats, the **checkout total with taxes and fees**, the cancellation deadline and recent reviews. For a hotel: address, phone, price on each booking site, rating categories. |
| `neighborhood` | Groceries, cafés, restaurants, transit, pharmacy, gym (or your own categories) within a walk, with the closest and the best rated. |
| `flights` | Google Flights results: best picks first, then by price, with times, stops, airlines and a link. |
| `cheapest_dates` | The cheapest departure dates over a window (one way, or round trips of N days). Slower: about 15–60 seconds. |

### Connect

The server lives at `https://nextgensda--nearstay.apify.actor/mcp` (MCP over streamable HTTP). Authenticate with your [Apify API token](https://console.apify.com/settings/integrations).

**Claude Code**

```bash
claude mcp add --transport http nearstay https://nextgensda--nearstay.apify.actor/mcp \
  --header "Authorization: Bearer <YOUR_APIFY_TOKEN>"
```

**Claude Desktop, Cursor and other clients with a JSON config**

```json
{
  "mcpServers": {
    "nearstay": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://nextgensda--nearstay.apify.actor/mcp",
               "--header", "Authorization: Bearer <YOUR_APIFY_TOKEN>"]
    }
  }
}
```

Clients that speak streamable HTTP natively can use the URL and header directly.

### What you get back (example)

`find_stays` near Moscone Center, then `rank_stays` to Moscone Center and the Ferry Building by transit:

| Stay | Price | Moscone Center | Ferry Building | Location |
|---|---|---|---|---|
| Hyatt Regency SOMA (hotel) | $724 / 4 nights | 6 min walk | 15 min transit | exact |
| W San Francisco (hotel) | $770 / 4 nights | 2 min walk | 17 min transit | exact |
| Studio near SFMOMA (Airbnb) | $971 incl. taxes | 5–14 min walk | 17–24 min transit | hidden by the host: a range |

Every row carries ids for the next tool, the price basis, coordinates and links.

### Pricing

Pay per successful tool call; a call that fails costs nothing.

| Tool call | Price |
|---|---|
| `place_search` | $0.005 |
| `find_stays` | $0.03 |
| `rank_stays` | $0.03 |
| `stay_details` | $0.01 |
| `neighborhood` | $0.01 |
| `flights` | $0.02 |
| `cheapest_dates` | $0.05 |

A typical trip question (pin a place, find stays, rank them, details on two, the neighbourhood, flights) comes to about **$0.12**.

### Good to know

- **Prices say what they are.** Airbnb search prices are the stay's total before taxes; `stay_details` gives Airbnb's real checkout total. Hotel prices are Google's lowest offer per night times the nights, usually before taxes, and often for the cheapest room type.
- **Hidden locations.** Airbnb hosts can hide their exact address (the map pin is moved up to ~0.5 km). nearstay doesn't try to uncover it: travel times for those stays come as ranges, and rankings use the slow end.
- **No transit time for short hops.** When walking is as quick, Google gives no transit time; rankings count the walk.
- **Prices in US dollars**, for any destination. Dates are YYYY-MM-DD.
- **Running it as a normal Actor run** (a task, or the API) finds stays near a place for your dates, ranks them by travel time and writes one row per stay to the dataset.

### FAQ

**Does it book anything?** No. It researches and links to the booking pages.

**Do I need an Airbnb or Google account?** No.

**Is it affiliated with Airbnb or Google?** No. nearstay is an independent tool that reads publicly available listings, places, routes and fares.

# Actor input Schema

## `near` (type: `string`):

The place to stay close to: a venue, office or address.

## `where` (type: `string`):

Instead of `near`: a city or area, cheapest stays first.

## `checkin` (type: `string`):

Absolute (2026-12-18) or relative (30 days).

## `checkout` (type: `string`):

Absolute (2026-12-22) or relative (34 days).

## `adults` (type: `integer`):

Guests aged 13 or over.

## `radiusKm` (type: `number`):

Around `near`.

## `budgetMax` (type: `number`):

In USD; the source's price basis.

## `anchors` (type: `array`):

Up to 4 places to rank stays by travel time to (default: `near`).

## `mode` (type: `string`):

The travel mode stays are ranked by (every mode's time is in each row).

## `rankTop` (type: `integer`):

How many stays (closest first) to rank by travel time.

## `maxStays` (type: `integer`):

How many stays to return.

## Actor input object example

```json
{
  "near": "Moscone Center, San Francisco",
  "checkin": "30 days",
  "checkout": "34 days",
  "adults": 2,
  "radiusKm": 1.5,
  "anchors": [
    "Moscone Center, San Francisco",
    "Ferry Building, San Francisco"
  ],
  "mode": "transit",
  "rankTop": 10,
  "maxStays": 20
}
```

# Actor output Schema

## `stays` (type: `string`):

One row per stay: name, kind, price and basis, distance, travel time and location precision.

## `allFields` (type: `string`):

Every field, including travel times in every mode to each place and booking links.

# 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 = {
    "near": "Moscone Center, San Francisco",
    "checkin": "30 days",
    "checkout": "34 days",
    "anchors": [
        "Moscone Center, San Francisco",
        "Ferry Building, San Francisco"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nextgensda/nearstay").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 = {
    "near": "Moscone Center, San Francisco",
    "checkin": "30 days",
    "checkout": "34 days",
    "anchors": [
        "Moscone Center, San Francisco",
        "Ferry Building, San Francisco",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("nextgensda/nearstay").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 '{
  "near": "Moscone Center, San Francisco",
  "checkin": "30 days",
  "checkout": "34 days",
  "anchors": [
    "Moscone Center, San Francisco",
    "Ferry Building, San Francisco"
  ]
}' |
apify call nextgensda/nearstay --silent --output-dataset

```

## MCP server setup

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

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/y9r51RIMCBehvJjDt/builds/DkixQDd3UisqPHFvq/openapi.json
