Skip to content

realtyapi/Airbnb-Scraper-API-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airbnb Scraper API - Python

A powerful Python scraper for extracting vacation rental data from Airbnb. Search homes, experiences, and services worldwide. Get listing details, reviews, availability, and more using the Airbnb Scraper API by RealtyAPI.

Features

  • Home Search - Search by destination, coordinates, Google Place ID, or category with 25+ filters
  • Experience Search - Find Airbnb experiences by destination or place ID
  • Service Search - Photography, catering, spa, chefs, and more
  • Home Details - Full listing data with pricing for specific dates
  • Home Reviews - Guest reviews with sorting (most recent, highest/lowest rated)
  • Home Availability - Calendar availability data
  • Experience Details - Full experience listing data
  • Experience Reviews - Experience guest reviews
  • Experience Availability - Date availability for experiences
  • Service Details & Reviews - Full service data and reviews
  • Autocomplete - Location search suggestions
  • Categories - Beachfront, Countryside, Trending, Mansions, etc.
  • Filter Lists - Amenities, property types, accessibility, host languages
  • Flexible Dates - Weekend, week, month stays and date flexibility
  • Bulk Mode - Process hundreds of searches from input.json with progress tracking
  • Export to JSON or CSV - Save results in your preferred format

Quick Start

1. Get Your API Key

Sign up at realtyapi.io to get your API key.

2. Install

git clone https://github.com/realtyapi/airbnb-scraper-python.git
cd airbnb-scraper-python
pip install -r requirements.txt

3. Run the Interactive Scraper

python scraper.py

4. Or Use the API Directly in Your Code

import requests

url = "https://airbnb.realtyapi.io/search/homes/bydestination"

params = {
    "searchDestinations": "toronto, canada",
    "checkIn": "2025-06-01",
    "checkOut": "2025-06-07",
    "adults": 2,
    "bedrooms": 2,
    "typeOfPlace": "Entire_home"
}

headers = {
    "x-realtyapi-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

Usage Examples

Search Homes by Destination

from airbnb_api import AirbnbAPI

api = AirbnbAPI("YOUR_API_KEY")

data = api.search_homes_by_destination(
    destination="toronto, canada",
    check_in="2025-06-01",
    check_out="2025-06-07",
    adults=2,
    bedrooms=2,
    type_of_place="Entire_home",
    price_max=300,
)
print(data)

Search Homes by Coordinates

data = api.search_homes_by_coordinates(
    ne_lat="44.029433", ne_lng="-79.317392",
    sw_lat="43.824096", sw_lng="-79.498301",
    check_in="2025-06-01",
    check_out="2025-06-07",
    adults=2,
)
print(data)

Search Homes by Place ID

data = api.search_homes_by_place_id("ChIJpTvG15DL1IkRd8S0KlBVNTI")
print(data)

Search Homes by Category

# Use /categories endpoint to get available tags
data = api.search_homes_by_category(
    category_tag="Tag:4104",  # Countryside
    adults=2,
    price_max=200,
)
print(data)

Search with Superhost & Guest Favorite Filters

data = api.search_homes_by_destination(
    destination="bali, indonesia",
    superhost=True,
    guest_favorite=True,
    type_of_place="Entire_home",
    price_max=150,
)
print(data)

Search Experiences

data = api.search_experiences_by_destination(
    destination="tokyo, japan",
    experience_type="cooking, cultural",
    price_max=100,
)
print(data)

Search Services

data = api.search_services_by_destination(
    destination="new york, usa",
    check_in="2025-06-01",
    check_out="2025-06-03",
    type_of_service="Photography",
)
print(data)

Get Home Details

data = api.get_home_details(
    stay_listing_id="RGVtYW5kU3RheUxpc3Rpbmc6MTI1NTc2NzAzNTg2MDMzMTgxOQ==",
    check_in="2025-06-01",
    check_out="2025-06-07",
)
print(data)

Get Home Reviews

data = api.get_home_reviews(
    stay_listing_id="U3RheUxpc3Rpbmc6MTExNjA4Mjc3OTc0NDI3OTM4Nw==",
    review_limit="10",
    sorting_preference="most_recent",
)
print(data)

Get Home Availability

data = api.get_home_availability("868126372367701281")
print(data)

Get Experience Details & Reviews

data = api.get_experience_details("QWN0aXZpdHlMaXN0aW5nOjMxMDk1ODQ=")
print(data)

reviews = api.get_experience_reviews(
    "U3RheUxpc3Rpbmc6OTQxOTg1NTQyMTc4NDcxMjA0",
    review_limit="10",
)
print(reviews)

Get Service Details & Reviews

data = api.get_service_details("QWN0aXZpdHlMaXN0aW5nOjYwNjcyNzE=")
print(data)

Autocomplete

data = api.autocomplete("paris")
print(data)

Get Categories & Filters

categories = api.get_categories()
amenities = api.get_amenities_filter()
property_types = api.get_property_types_filter()
languages = api.get_host_language_filter()

Scraper Modes

Test Mode (Single Input)

Enter one input manually. Shows a preview (first 1000 characters), then asks to save as JSON or CSV.

Bulk Mode (from input.json)

Process hundreds of inputs from input.json. Shows a progress bar, saves all results at the end.

Bulk Mode - input.json Format

Copy input_sample.json to input.json and fill in your data.

{
  "search_homes_destinations": [
    {
      "destination": "toronto, canada",
      "check_in": "2025-06-01",
      "check_out": "2025-06-07",
      "adults": 2,
      "bedrooms": 2,
      "type_of_place": "Entire_home",
      "price_max": 300
    },
    "paris, france"
  ],

  "search_homes_coordinates": [
    {"ne_lat": "44.02", "ne_lng": "-79.31", "sw_lat": "43.82", "sw_lng": "-79.49"}
  ],

  "search_homes_place_ids": ["ChIJpTvG15DL1IkRd8S0KlBVNTI"],

  "search_homes_categories": ["Tag:4104"],

  "search_exp_destinations": [
    {"destination": "toronto", "experience_type": "art, cooking"}
  ],

  "search_services": [
    {"destination": "toronto", "check_in": "2025-06-01", "check_out": "2025-06-07", "type_of_service": "Photography"}
  ],

  "home_listing_ids": [
    {"stay_listing_id": "...", "check_in": "2025-06-01", "check_out": "2025-06-07"}
  ],

  "home_product_ids": ["868126372367701281"],

  "experience_listing_ids": ["QWN0aXZpdHlMaXN0aW5nOjMxMDk1ODQ="],

  "service_listing_ids": ["QWN0aXZpdHlMaXN0aW5nOjYwNjcyNzE="],

  "autocomplete_queries": ["paris", "tokyo"]
}

Output Formats

Option Format Best for
1 JSON (.json) Full nested data, programmatic access
2 CSV (.csv) Spreadsheets, Excel, data analysis
3 Both Keep JSON for detail + CSV for quick review

API Configuration

Option 1: Environment Variable

export REALTYAPI_KEY=rt_your_key_here
python scraper.py

Option 2: Config File

{ "api_key": "rt_your_key_here" }

Option 3: Direct in Code

from airbnb_api import AirbnbAPI
api = AirbnbAPI("rt_your_key_here")

Search Filter Reference

Type of Place

Any_type, Room, Entire_home

Property Type

House, Flat, Guest house, Hotel

Booking Options

instant book, self checkin, allow pets, free cancellation

Flexible Date Filters

Exact_dates, plusminus_1day, plusminus_2days, plusminus_3days, plusminus_7days, plusminus_14days

Flexible Stay Period

Weekend, Week, Month

Results Type

search_results, map_results, map_plus_search_results

Review Sorting

most_relevant, highest_rated, lowest_rated, most_recent

Experience Types

architecture, art, beauty, cooking, cultural, dining, flying, food, galleries, landmarks, museum, outdoor, performance, shopping, tasting, water, wellness, wildlife, workout

Service Types

Photography, Prepared_Meals, Training, Makeup, Hair, Spa_Treatment, Catering, Nails, Chefs

Traveler Types

Kids, Big Groups, Solo Travellers, Date Night

Time of Day

morning (before 12 PM), afternoon (after 12 PM), evening (after 5 PM)

Duration (minutes)

Min: 30, 45, 60, 90, 120, 180 | Max: 45, 60, 90, 120, 180

All Available Endpoints

Category Endpoint Description
Search /search/homes/bydestination Homes by destination (25+ filters)
Search /search/homes/bycoordinates Homes by bounding box
Search /search/homes/byplaceid Homes by Google Place ID
Search /search/homes/bycategory Homes by category tag
Search /search/exp/bydestination Experiences by destination
Search /search/exp/byplaceid Experiences by Place ID
Search /search/services/bydestination Services by destination
Search /autocomplete Location autocomplete
Details /home/details Full home listing details
Details /home/reviews Home guest reviews
Details /home/availability Home calendar availability
Details /experience/details Experience details
Details /experience/reviews Experience reviews
Details /experience/availability Experience date availability
Details /service/details Service details
Details /service/reviews Service reviews
Filters /categories Airbnb categories
Filters /filter/amenities Amenity IDs
Filters /filter/property_types Property types
Filters /filter/accessibility Accessibility features
Filters /filter/host_language Host languages
Tools /currencies Available currencies
Tools /language_codes Available languages

File Structure

airbnb-scraper-python/
├── scraper.py          # Interactive CLI (test one or bulk run)
├── airbnb_api.py       # Airbnb API client library (24 endpoints)
├── config.py           # API key management
├── examples.py         # Code examples for every endpoint
├── input_sample.json   # Template for bulk input (copy to input.json)
├── input.json          # Your bulk input data (gitignored)
├── requirements.txt    # Python dependencies
├── config.json         # Your API key (auto-created, gitignored)
├── output/             # Saved JSON/CSV outputs (auto-created)
└── README.md           # This file

Requirements

  • Python 3.7+
  • requests library

Get Your API Key

Sign up at realtyapi.io to get your Airbnb Scraper API key.

Related APIs

RealtyAPI also offers scraper APIs for:

License

MIT


Keywords: airbnb scraper, airbnb api, airbnb data scraper, airbnb property data, airbnb scraper python, airbnb listing scraper, airbnb api python, scrape airbnb, airbnb scraping tool, airbnb price scraper, airbnb review scraper, airbnb availability scraper, airbnb search api, airbnb experience api, airbnb rental data, airbnb vacation rental scraper, airbnb home data, airbnb listing data api, airbnb calendar scraper, airbnb host data, airbnb superhost, airbnb guest favorite, airbnb category search, airbnb beachfront, airbnb countryside, airbnb automation, airbnb data mining, airbnb web scraper, airbnb crawler, airbnb property lookup, vacation rental api, short term rental data, airbnb service scraper, airbnb photography, airbnb experience scraper, realtyapi, realty api

About

Airbnb Scraper API in Python. Use this to get Airbnb data saved to Json/Csv/Excel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages