GithubHelp home page GithubHelp logo

oxylabs / airbnb-scraper Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 19 KB

Extract Airbnb data like listings, search results, reviews, and host pages with ease using Airbnb Scraper.

Home Page: https://oxylabs.io/products/scraper-api/web/airbnb

Python 10.48% Shell 6.81% PHP 12.96% C# 20.87% Go 13.07% Java 25.15% JavaScript 10.67%
airbnb airbnb-api airbnb-data airbnb-scraper scraper scraper-api scraper-python booking-api email-crawler

airbnb-scraper's Introduction

Airbnb Scraper

Oxylabs promo code

Airbnb Scraper enables you to extract public Airbnb data without writing extensive scripts and without any blocks or CAPTCHAs. This quick guide will show you how to scrape Airbnb with Oxylabs’ Scraper API.

How it works

All you have to do is form a payload and send a request to the API. After a few seconds, you’ll receive the HTML of any public Airbnb page you submit for scraping.

Python code example

The following code sends a request and retrieves HTML content, including Airbnb search results localized for the United States region:

import requests
from pprint import pprint

# Structure payload.
payload = {
   'source': 'universal',
   'url': 'https://www.airbnb.com/?tab_id=home_tab&refinement_paths%5B%5D=/homes&search_mode=flex_destinations_search&flexible_trip_lengths%5B%5D=one_week&location_search=MIN_MAP_BOUNDS&monthly_start_date=2023-07-01&monthly_length=3&price_filter_input_type=0&price_filter_num_nights=5&channel=EXPLORE&search_type=category_change&category_tag=Tag:8522',
   'geo_location': 'United States',
   'render': 'html'
}

# Get a response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'), #Your credentials go here
    json=payload,
)

# Instead of response with job status and results URL, this will return the
# JSON response with results.
pprint(response.json())

Visit the documentation to see more details, such as payload parameters.

Output sample

{
    "results": [
        {
            "content":"<!doctype html>\n<html lang=\"en\">\n<head>
            ...
            </script></body>\n</html>\n",
            "created_at": "2023-06-12 14:45:51",
            "updated_at": "2023-06-12 14:45:54",
            "page": 1,
            "url": "https://www.airbnb.com/?tab_id=home_tab&refinement_paths%5B%5D=/homes&search_mode=flex_destinations_search&flexible_trip_lengths%5B%5D=one_week&location_search=MIN_MAP_BOUNDS&monthly_start_date=2023-07-01&monthly_length=3&price_filter_input_type=0&price_filter_num_nights=5&channel=EXPLORE&search_type=category_change&category_tag=Tag:8522",
            "job_id": "7074034071101255681",
            "status_code": 200
        }
    ]
}

With Oxylabs’ Airbnb Scraper API, you can easily scrape Airbnb on a large scale without blocks and collect public Airbnb data like listings, search results, reviews, and host pages. If you have any questions, feel free to contact us through live chat or email.

airbnb-scraper's People

Contributors

augustoxy avatar oxylabsorg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.