Airbnb

פרמיום
על ידי 3B Data / @CRAWLER2API | מְעוּדכָּן 15 दिन पहले | Travel
פּוֹפּוּלָרִיוּת

9.7 / 10

חֶבִיוֹן

2,673ms

רמת שירות

100%

Health Check

N/A

חזרה לכל ההדרכות (2)

How to use Airbnb API

1. Introduction

Our Airbnb API is a RESTful service based on JSON format that provides you with Airbnb vacancies with prices. In order to receive the data your system asks the API with specific place location or GEO coordinates of an area along with other relevant information. The results contain a page of available accomodations.

2. Endpoints

2.1. Location autocomplete

Search for a location by a string query

2.1.1 Input parameters

  • query - string query to search by

2.1.2 Response

Autocomplete returns an array of results. Returned query values can be used for search by location.

  • Success Response:
    Code: 200
    Content:
[{
  "query": "Paris 8, Paris",
  "country": "FR"
}, {
  "query": "Paris",
  "country": "FR"
}, {
  "query": "Paris 7, Paris",
  "country": "FR"
}, {
  "query": "Paris 2, Paris",
  "country": "FR"
}, {
  "query": "Paris 10, Paris",
  "country": "FR"
}]
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "source currently unavailable"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR

2.2. Search by location

Search for vacancies by location string (e.g. Paris).

2.2.1 Input parameters

Maximum total number of adult and children passengers is 16.
Required:

  • adults - number of adult (13 and over) passengers
  • location - location string - it can be obtained via autocomplete
  • checkin - checkin date, format YYYY-MM-DD
  • checkout - checkout date, format YYYY-MM-DD
    Optional:
  • children - number of children (ages 2-12) passengers
  • infants - number of infant (ages 0-2) passengers (0-5)
  • page - number of returned page, default: 1

2.2.2 Response

Search returns an object with error status, headers and an array of results (accomodations).

  • Success Response:
    Code: 200
    Content:
{
  "error": false,
  "headers": {
    "response_time": 1192,
    "response_timestamp": "2022-03-04T13:58:40.846Z",
    "response_id": 18260003
  },
  "results": [{
    "id": 43449093,
    "url": "https://www.airbnb.com/rooms/43449093",
    "deeplink": "https://www.airbnb.com/rooms/43449093?check_in=2022-05-16&check_out=2022-05-17&adults=1",
    "position": 1,
    "name": "Room in the heart of Paris",
    "bathrooms": 1,
    "bedrooms": 1,
    "beds": 1,
    "city": "Paris",
    "neighborhood": "Châtelet - Les Halles - Beaubourg",
    "images": ["https://a0.muscache.com/im/pictures/miso/Hosting-43449093/original/49a62f19-7135-45ae-9811-441891d5279d.jpeg?im_w=720", "https://a0.muscache.com/im/pictures/4a07fe2a-8c53-47ff-9093-7e1732972f4d.jpg?im_w=720", "https://a0.muscache.com/im/pictures/e8e77ec9-966c-407e-9ff6-f75231b9fbb5.jpg?im_w=720", "https://a0.muscache.com/im/pictures/f37c0947-9f4e-409a-b98e-8db0f37d3e8f.jpg?im_w=720", "https://a0.muscache.com/im/pictures/daa9323f-e8be-4c3d-9068-f6331ad5316a.jpg?im_w=720", "https://a0.muscache.com/im/pictures/c3b8456c-4979-458e-a739-1528ac6672cc.jpg?im_w=720"],
    "hostThumbnail": "https://a0.muscache.com/im/pictures/user/72562b57-bfe3-43ac-a4cf-8fbad0cefbf7.jpg?aki_policy=profile_x_medium",
    "isSuperhost": false,
    "rareFind": false,
    "lat": 48.86339,
    "lng": 2.35232,
    "persons": 1,
    "reviewsCount": 82,
    "rating": 4.71,
    "type": "Entire rental unit",
    "userId": 271527319,
    "address": "Paris, Île-de-France, France",
    "amenityIds": [35, 611, 4, 103, 40, 104, 42, 11, 44, 45, 77, 46, 85, 86, 663, 30],
    "previewAmenities": ["Wifi", "Heating"],
    "cancelPolicy": "CANCEL_MODERATE",
    "price": {
      "rate": 75,
      "currency": "USD",
      "total": 75,
      "priceItems": [{
        "title": "$61 x 1 night",
        "amount": 61
      }, {
        "title": "Service fee",
        "amount": 10
      }, {
        "title": "Occupancy taxes and fees",
        "amount": 4
      }]
    }, ...
  }]
}
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "Couldn't fetch results at the moment"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR

2.3. Search by GEO coordinates

Search for vacancies in an area providing the norhteastern and southwestern corners latitude and longitude.

2.3.1 Input parameters

Maximum total number of adult and children passengers is 16.
Required:

  • adults - number of adult (13 and over) passengers
  • ne_lat - latitude of the northeastern corner of the search area
  • ne_lng - longitude of the northeastern corner of the search area
  • sw_lat - latitude of the southwestern corner of the search area
  • sw_lng - longitude of the southwestern corner of the search area
  • checkin - checkin date, format YYYY-MM-DD
  • checkout - checkout date, format YYYY-MM-DD
    Optional:
  • children - number of children (ages 2-12) passengers
  • infants - number of infant (ages 0-2) passengers (0-5)
  • page - number of returned page, default: 1

2.3.2 Response

Search returns an object with error status, headers and an array of results (accomodations).

  • Success Response:
    Code: 200
    Content:
{
  "error": false,
  "headers": {
    "response_time": 840,
    "response_timestamp": "2022-03-04T14:12:04.676Z",
    "response_id": 18260463
  },
  "results": [{
    "id": 28079625,
    "url": "https://www.airbnb.com/rooms/28079625",
    "deeplink": "https://www.airbnb.com/rooms/28079625?check_in=2022-05-15&check_out=2022-05-16&adults=1",
    "position": 1,
    "name": "Padarn's Hut",
    "bathrooms": 1,
    "bedrooms": 0,
    "beds": 1,
    "city": "Llanbadarn Fynydd",
    "images": ["https://a0.muscache.com/im/pictures/303c0881-3aae-454b-b21d-17d2a283889b.jpg?im_w=720", "https://a0.muscache.com/im/pictures/54cfce38-2e83-411e-949c-bd23589fd5d0.jpg?im_w=720", "https://a0.muscache.com/im/pictures/9c3556d4-d93a-46e3-9f81-1808ac74052c.jpg?im_w=720", "https://a0.muscache.com/im/pictures/74ff8055-9144-4f98-85c6-c07770b34d57.jpg?im_w=720", "https://a0.muscache.com/im/pictures/72cc27e7-13ec-4e67-84b8-680c2cdc9511.jpg?im_w=720", "https://a0.muscache.com/im/pictures/efa92133-9d3b-4e97-aa45-755f94f62906.jpg?im_w=720"],
    "hostThumbnail": "https://a0.muscache.com/im/pictures/user/b2b7fad6-a7cc-4bde-aa54-c6668a91b054.jpg?aki_policy=profile_x_medium",
    "isSuperhost": true,
    "rareFind": false,
    "lat": 52.38951,
    "lng": -3.32843,
    "persons": 2,
    "reviewsCount": 245,
    "rating": 4.92,
    "type": "Hut",
    "userId": 150001098,
    "address": "Llanbadarn Fynydd, Wales, United Kingdom",
    "amenityIds": [1, 35, 131, 36, 37, 101, 39, 8, 40, 9, 41, 44, 45, 77, 51, 85, 54, 25, 89, 27, 91, 93, 30],
    "previewAmenities": [],
    "cancelPolicy": "CANCEL_FLEXIBLE",
    "price": {
      "rate": 156,
      "currency": "USD",
      "total": 156,
      "priceItems": [{
        "title": "$134 x 1 night",
        "amount": 134
      }, {
        "title": "Service fee",
        "amount": 22
      },
      ...]
    }
  }]
}
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "Couldn't fetch results at the moment"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR

2.4. Property calendar

Returns availability of the property for a selected period.

2.4.1 Input parameters

Required:

  • room_id - property id
    Optional:
  • currency - price currency, default: USD
  • year - calendar year, default: current year
  • month - calendar month, default: current month
  • count - number of months returned, default: 12, max: 12

2.4.2 Response

Search returns an object with error status, headers and an array of results (array of calendar_month).
Response fields:

  • abbr_name - abbreviated month name
  • day_names - day names
  • days - array of day objects
  • date - day date
  • available - is the property available on this date
  • available_for_checkin - is available for checkin
  • available_for_checkout - is available for checkout
  • min_nights - minimum nights of stay
  • max_nights - maximum nights of stay
  • price - price info (native and local prices and currencies) [deprecated]*
  • Airbnb removed prices from online calendar. The API still returns prices, but these are often incorrect.
  • Success Response:
    Code: 200
    Content:
{
  "error": false,
  "headers": {
    "response_time": 834,
    "response_timestamp": "2023-02-28T12:18:40.988Z",
    "response_id": 23262206
  },
  "results": {
    "calendar_months": [{
      "abbr_name": "Dec",
      "day_names": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
      "days": [{
        "available": false,
        "date": "2023-11-26",
        "available_for_checkin": false,
        "price": {
          "date": "2023-11-26",
          "is_price_upon_request": null,
          "local_adjusted_price": 58,
          "local_currency": "USD",
          "local_price": 58,
          "native_adjusted_price": 55,
          "native_currency": "EUR",
          "native_price": 55,
          "type": "default",
          "local_price_formatted": "$58"
        },
        "min_nights": 2,
        "max_nights": 8
      }, 
      ...]
    }
  }]
}
  • Error Response:
    Code: 200
    Content:
    {
      "error": true,
      "message": "source currently unavailable"
    }
    
    OR
  • Code: 401 UNAUTHORIZED
    OR
  • Code: 400 BAD REQUEST
    OR
  • Code: 429 TOO MANY REQUESTS
    OR
  • Code: 500 INTERNAL ERROR