Simple native Airbnb API wrapper
Project description
Airbnb API wrapper (for hosts)
Disclaimer
This is a unofficial python API wrapper for airbnb.com. At the moment only methods for hosts are implemented. Provides access with login(email) and password to host reservations, fees and calendar.
Using this software might contradict airbnb.com terms of service. Use in educational purpose only.
Requirements
- selenium
- requests
Install
pip install airbnb-host-api
Usage
from airbnb_host_api import Airbnb
Initial run (slow, uses Selenium to get auth token and API key)
api = Airbnb(email='user@domain.com', password='qwerty')
auth_token = api.access_auth_token()
api_key = api.access_api_key()
You may skip credentials check (faster):
api = Airbnb(email='user@domain.com', password='qwerty', credentials_check=False)
Further runs (fast, doesn`t require Selenium)
api = Airbnb(auth_token=auth_token, api_key=api_key)
If you get 401 error ("authentication_required"), while running get_reservations() or other requiring authentication methods, update auth token:
api = Airbnb(email='user@domain.com', password='qwerty', api_key=api_key)
new_auth_token = api.access_auth_token()
In case you get 400 error ("invalid_key" - this one should be rare), update API key (auth token will be also updated):
api = Airbnb(email='user@domain.com', password='qwerty')
new_auth_token = api.access_auth_token()
new_api_key = api.access_api_key()
Running methods examples
api.get_reservations()
api.get_reservations(date_min='2024-12-01', date_max='2024-12-31')
api.get_reservations(status='upcoming')
api.get_reservations(status='completed', listing_id=1298231212340118374)
api.get_reservations(date_min='2024-11-01', date_max='2025-01-15', status='canceled')
api.get_host_fees(confirmation_code="ZMAB0FZABY")
api.get_host_fees(invoice_ids=["1012647776", "1030511337"])
api.get_calendar(listing_id=1298761234240118374)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airbnb_host_api-0.0.3.tar.gz.
File metadata
- Download URL: airbnb_host_api-0.0.3.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8d6372855405c3004830e78fb5006740b71120a57c462d01a7ff149c7c7e0d0
|
|
| MD5 |
539483a9d88d124714c438ce9eb50ce4
|
|
| BLAKE2b-256 |
1bd13e76a359f859f53b66690fba615ba8456a35c9ebf0e426574c5827278e80
|
File details
Details for the file airbnb_host_api-0.0.3-py3-none-any.whl.
File metadata
- Download URL: airbnb_host_api-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da138230657f9ce8546db09b5ea68539dd6db2402033281bb76c2d5223e9fc9f
|
|
| MD5 |
ab98857e9ce7c31b86c9ee41624ad176
|
|
| BLAKE2b-256 |
0a2b5c775279d66c54e4cd98f5342adf20e76c466c16833c5b23bf9f3e71852f
|