# Airbnb Listings Scraper (`bgfc97/airbnb-listings-scraper`) Actor

Scrape Airbnb listings by location. Returns price per night, rating, review count, room type, host, amenities, coordinates, photos and listing URL. No login required.

- **URL**: https://apify.com/bgfc97/airbnb-listings-scraper.md
- **Developed by:** [Bruno](https://apify.com/bgfc97) (community)
- **Categories:** Travel, Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.20 / 1,000 listing scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Airbnb Listings Scraper

Scrape **Airbnb search-result listings** for any location — with optional check-in/check-out dates and guest count — without a headless browser. The actor sends a browser-grade HTTP request (via `got-scraping`, routed through Apify Proxy residential IPs) to Airbnb's own search page, then parses the **JSON data Airbnb embeds in the page itself** to pull out structured listing data.

### Why it's useful

Airbnb doesn't have a public listings-search API. This actor gets the same data a browser sees — title, room type, price, rating, review count, coordinates and badges — directly from Airbnb's search results, for any city or region.

### Input

```json
{
  "location": "Barcelona, Spain",
  "checkIn": "2026-06-01",
  "checkOut": "2026-06-07",
  "adults": 2,
  "maxItems": 30,
  "currency": "USD"
}
```

- `location` — required. A place name, exactly as you'd type it into Airbnb's search box.
- `checkIn` / `checkOut` — optional, `YYYY-MM-DD`. Omit for a dates-agnostic search.
- `adults` — number of guests (default 2).
- `maxItems` — how many listings to return (default 30). The actor follows Airbnb's own pagination cursors (found inside the page data) across a few pages if needed to reach this count; if Airbnb doesn't expose a further cursor it stops and returns what it found.
- `currency` — 3-letter code Airbnb should display prices in (default USD).
- `proxyConfiguration` — Apify Proxy config; **residential** is strongly recommended.

### Output (per listing)

```json
{
  "query_location": "Barcelona, Spain",
  "checkIn": "2026-06-01",
  "checkOut": "2026-06-07",
  "adults": 2,
  "currency": "USD",
  "id": "12345678",
  "name": "Charming loft in Gràcia",
  "roomType": "entire_home",
  "price_per_night_display": "$95",
  "price_per_night": 95,
  "price_total_display": "$665 total",
  "price_total": 665,
  "rating": 4.87,
  "reviewsCount": 213,
  "latitude": 41.4036,
  "longitude": 2.1589,
  "badges": ["Guest favorite"],
  "url": "https://www.airbnb.com/rooms/12345678"
}
```

### How it works

Airbnb's server-rendered search page embeds the full search response as JSON in a `<script>` tag (historically `id="data-deferred-state-0"`). The actor:

1. Fetches the search page with browser-like TLS fingerprint/headers through a rotating residential proxy session, retrying with a **fresh session up to 5 times** if the response looks blocked (captcha page, small body, 403/429/503).
2. Locates and `JSON.parse`s the embedded state.
3. **Walks the parsed object generically** looking for the search-results array (first by the known key name, then — if Airbnb has renamed or re-nested it — by scanning for arrays of objects shaped like `{ listing: { id, ... } }`), so small upstream changes don't break extraction outright.
4. If Airbnb's own pagination cursors are present in the same JSON, follows them for a few pages to reach `maxItems`; otherwise returns the first page and stops.

If every retry still looks blocked, the actor honestly reports `{ location, error: "blocked (needs residential proxy)" }` instead of fabricating data. If the page loads but the JSON shape has changed enough that no listings array can be found, it reports that specific diagnosis instead.

### Notes

- No headless browser — faster and cheaper than a browser-based scraper.
- Unofficial: this reads Airbnb's own search-page HTML/JSON, not a published API, so results depend on Airbnb not having changed its page structure.
- Charges per listing returned (`listing` event).

### ⭐ Enjoying this Actor?

A quick **rating/review** helps others find it. Want neighborhood/amenity filters or listing-detail enrichment added? Open a ticket on the **Issues** tab.

# Actor input Schema

## `location` (type: `string`):

Place to search on Airbnb, exactly as you'd type it into the Airbnb search box, e.g. "Barcelona, Spain" or "New York, NY". Required.

## `checkIn` (type: `string`):

Check-in date, format YYYY-MM-DD. Leave empty to search with no dates (Airbnb then shows base prices without date-specific availability).

## `checkOut` (type: `string`):

Check-out date, format YYYY-MM-DD. Leave empty to search with no dates.

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

Number of adult guests to search for (1-16).

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

Maximum number of listings to return. The actor reads one Airbnb search-results page at a time (up to a few pages if Airbnb's own pagination cursors are present in the page data) until this many listings are collected or no further page is available.

## `currency` (type: `string`):

3-letter currency code Airbnb should display prices in, e.g. USD, EUR, GBP.

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

Apify Proxy settings used for every request, with a fresh session per retry attempt. Residential proxies are strongly recommended — Airbnb blocks most datacenter IPs.

## `timeoutSecs` (type: `integer`):

Timeout per HTTP request to Airbnb, in seconds (5-90).

## Actor input object example

```json
{
  "location": "Barcelona, Spain",
  "adults": 2,
  "maxItems": 30,
  "currency": "USD",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "timeoutSecs": 40
}
```

# Actor output Schema

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

Scrape Airbnb search-result listings for a location, with optional dates and guest count. Returns title, room type, per-night/total price, rating, review count, coordinates, badges and a direct listing URL. Uses Apify Proxy residential IPs and browser-grade TLS/headers, parsing Airbnb's own embedded JSON search state (no headless browser).

# 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 = {
    "location": "Barcelona, Spain",
    "currency": "USD"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bgfc97/airbnb-listings-scraper").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 = {
    "location": "Barcelona, Spain",
    "currency": "USD",
}

# Run the Actor and wait for it to finish
run = client.actor("bgfc97/airbnb-listings-scraper").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 '{
  "location": "Barcelona, Spain",
  "currency": "USD"
}' |
apify call bgfc97/airbnb-listings-scraper --silent --output-dataset

```

## MCP server setup

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

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/LodK5kOCm9Xg67rZ4/builds/uuvHXYBp9GidnGWxJ/openapi.json
