爱吃甜食是什么原因| 胸疼什么原因| 鸟喜欢吃什么| 敷设是什么意思| 匪气是什么意思| 白细胞十十是什么意思| 不自爱是什么意思| 记号笔用什么能擦掉| cta是什么| 耳廓上长痣代表什么| 鸡蛋与什么食物相克| 凯撒沙拉酱是什么口味| 为什么不建议年轻人做肠镜| 牙龈肿痛发炎吃什么药| 小腹痛挂什么科| 聚宝盆什么意思| 小蛇吃什么| roger是什么意思| 乌鸡白凤丸有什么功效| 乳酸脱氢酶高是什么原因| 冬至为什么烧纸| 天地不仁以万物为刍狗是什么意思| 内分泌是什么意思| 搞破鞋是什么意思| 甾体是什么意思| 单的姓氏读音是什么| 胃痛吃什么药效果好| 91年出生属什么生肖| 明年生肖是什么| 阴道流黄色分泌物是什么原因| 皮肤起小水泡很痒是什么原因| 6.20什么星座| 五十坐地能吸土是什么意思| 木石念什么| 西游记有什么故事| ex是什么意思| 目赤是什么意思| 子鼠是什么意思| 乙肝五项25阳性是什么意思| 火六局是什么意思| hpv病毒通过什么途径传播| 钵仔糕粉是什么粉| 请自重是什么意思| 尿道口发炎用什么药| 上吐下泻吃什么食物好| 偷梁换柱是什么意思| 96166是什么电话| 世事无常什么意思| 嘴唇正常颜色是什么样| 什么时候跳绳减肥效果最好| 眼珠发黄是什么原因| 尘肺病吃什么能排出尘| 女性腰酸是什么原因引起的| 吃什么推迟月经| 内什么外什么| 喉咙痛吃什么药好得快| 产检挂什么科室| 牙龈肿痛吃什么药效果好| 牛初乳是什么| 补肾吃什么药好| pc肌是什么| 肠化是什么意思| 月子里吃什么饭最好| 春秋是什么时期| 什么眉头| 人为什么要日b| 结膜炎吃什么消炎药| 照见五蕴皆空什么意思| 老年人反复发烧是什么原因引起的| 制动是什么| 反哺是什么意思| 低密度结节是什么意思| 上呼吸道感染是什么病| 姨妈安全期是什么时候| 食字五行属什么| l是什么单位| 人体最大的免疫器官是什么| 祥林嫂是什么样的人| 尾椎骨痛挂什么科| 慢性肠炎吃什么药调理| 女性漏尿吃什么药最好| 孩子注意力不集中缺什么微量元素| 吃什么药可以提高性功能| bp在医学上是什么意思| 为什么今年夏天特别热| 牙齿发炎吃什么消炎药| 吐信子是什么意思啊| 心率过缓有什么危害| 什么时候吃姜最好| 怀孕初期吃什么对胎儿发育好| 马云是什么大学毕业的| 两肋胀满闷胀是什么病| 心律不齐什么症状| 蜂蜜有什么好处| 什么的孩子| 3.8什么星座| 为什么来月经肚子疼| 鹤是什么生肖| 拜阿司匹林什么时间吃最好| 肺部高密度影是什么意思| 高糖是什么| 综艺是什么意思| 属虎生什么属相宝宝好| 楔形是什么形状| 舌头发麻看什么科| 肺部感染是什么症状| 9月15号是什么星座| 阴道有腥味是什么原因| 什么是乙肝病毒携带者| 灵芝煮水喝有什么功效| 宫缩疼是什么感觉| 1999是什么年| 黑金刚是什么药| 钠对人体有什么作用| 土星为什么有光环| 施教区是什么意思| 91年羊是什么命| 吃什么抑制食欲| 什么和什么丽| 石榴石是什么材质| 东莞有什么厂| 总有眼屎是什么原因| 拿的起放的下是什么意思| 什么样的房子不能住人脑筋急转弯| 嫌恶是什么意思| 玩微博的都是什么人| 吃什么容易放屁| 什么是三净肉| 什么叫空调病| 什么的绿毯| 建字五行属什么| 黄褐斑内调吃什么药| 吃腰果有什么好处| 樟脑丸是什么| 非布司他片是什么药| kda什么意思| 甲沟炎看什么科室| 黑色素通过什么排出来| 为什么犹太人聪明| 猫什么时候传入中国| 9527是什么意思| 慢性疾病都包括什么病| 吃什么奶水会增多| 脑膜炎吃什么药| 胎记是什么| 1977年出生属什么生肖| 4月份有什么节日| 长血痣是什么原因| 凋谢是什么意思| 子宫肌瘤都有什么症状| 红豆泥是什么意思| 肺气肿吃什么药最有效| 化痰止咳吃什么药最好| 小孩发烧吃什么药| phicomm是什么牌子| 鳄鱼的天敌是什么动物| 百年老枞属于什么茶| 姹紫嫣红是什么意思| 想入非非什么意思| 孙子的儿子叫什么| 吃稀饭配什么菜好吃| 冬眠是什么意思| 左眼皮老是跳是什么原因| 早餐吃什么减肥| 腱鞘炎用什么药治疗| 真丝棉是什么面料| 满月是什么意思| angelababy是什么意思| 手上脱皮什么原因| dt是什么意思| 乳房里面有硬块是什么原因| 弱酸性是什么意思| 孕囊是什么东西| 宫内膜回声不均匀是什么意思| 胃酸反流是什么原因造成| 股骨长径是指胎儿什么| 什么一现| 羊脑炎什么症状怎么治| 下午4点半是什么时辰| 鸡蛋和什么搭配最营养| 舌头两边锯齿状是什么原因| 补肾气吃什么药最好| 什么叫化疗为什么要化疗| 世界上最大的鱼是什么| 罗汉果是什么| 吃什么水果减肥最快减肚子| 湿疹是由什么引起的| 1946年中国发生了什么| pd医学上是什么意思| 普门品是什么意思| 翅膀车标是什么车| 什么叫六亲| 外阴瘙痒用什么洗液| 银屑病为什么会自愈| 胃镜能检查出什么| 孩子气是什么意思| 麻黄是什么| 促狭一笑是什么意思| 缄默是什么意思| 权威是什么意思| 翡翠戴久了会有什么变化| 眼袋肿是什么原因| 淡竹叶有什么功效| 吃辣椒过敏是什么症状| 打飞机是什么| 3月2日是什么星座| 山楂什么季节成熟| 一点是什么时辰| 段泥紫砂壶适合泡什么茶| 天意不可违是什么意思| kpa是什么意思| 念叨是什么意思| 2.10是什么星座| 菊花什么时候扦插最好| 肝右叶占位是什么意思| shiraz是什么名字红酒| 痔疮吃什么药| 来月经小腹痛是什么原因| 脉搏高是什么原因| volume什么意思| 什么是激素脸| 怀孕为什么要建档| 什么菜补铁| 水中毒是什么| suvmax是什么意思| 基础代谢率是什么意思| 糟老头是什么意思| 镜面是什么意思| 冬天怕冷夏天怕热是什么体质| 叶酸什么时候吃| 滇红属于什么茶| 脖子痛挂什么科| 肾水不足是什么意思| 无机盐包括什么| 吃什么有助于降血压| 时过境迁是什么意思| 什么生木| dickies是什么牌子| eeg是什么意思| 经期吃榴莲有什么好处| 吐血挂什么科| 小孩尿味道很重是什么原因| 秋葵不适宜什么人吃| 油漆用什么能洗掉| 教师资格证有什么用| 高血压二级是什么意思| 新生儿湿疹用什么药膏| 丰的部首是什么偏旁| 外围是什么意思| soeasy是什么意思| 面子是什么意思| 转念是什么意思| 月经准时来说明什么| 加仓是什么意思| 端坐呼吸常见于什么病| 羽字五行属什么| 千岛酱是什么味道| 拉架棉是什么面料| 圣女是什么生肖| 私募是做什么的| 3月19是什么星座| 骨折什么感觉| dragon是什么意思| 橘红是什么东西| 百度
Skip to content

zxol/airbnbapi

Repository files navigation

Breaking changes ahead!

Version 0.11.0, due to be released sometime after July 1st. Errors will no longer return null values. Instead, errors will be thrown.

Unofficial airbnb.com REST API wrapper for node.js


Coverage Status


Hi there! ?? This is a javascript library for interacting with airbnb's API.
Disclaimer: this library is not associated with airbnb and should only be used for educational reasons. It is an interface for a private API used by airbnb's mobile applications.
This is a pre 1.0 library. Please request endpoints and functionality as repo issues. Collaborators wanted!

Essential Info

  • All functions return promises.
  • The returned data format is pre-parsed JSON, i.e. a javascript object. Multiple records will be returned as an array.
  • The auth system is a simple crypto token. For the uninitiated, this is like a username and password in one. If you're only using a single account, you can supply a token with .setDefaultToken(), otherwise, you will have to supply a token with every function call.
  • Yeah, I know, airlock is a massive pain in the posterior.
  • Error reporting and data validation is spotty at this stage!
  • This library only has one dependency - request-promise.

Getting started ?????

Installing

npm install airbnbapijs

Importing

var airbnb = require('airbnbapijs')

or es6...

import airbnb from 'airbnbapijs'

Reference ??

Contents

  1. Authorization
  2. Users
  3. Calendars
  4. Listings
  5. Threads
  6. Reservations
  7. Posting
  8. Configuration

AUTHORIZATION

testAuth

Test a token

airbnb.testAuth('faketoken3sDdfvtF9if5398j0v5nui')
// returns bool

newAccessToken

Request a new token

airbnb.newAccessToken({ username: 'foo@bar.com', password: 'hunter2' })
// returns {token: 'faketoken3sDdfvtF9if5398j0v5nui'} or {error: {error obj}}

login

Request a new token (v2 endpoint). Similar to the above function but returns a user info summary with much more information.

airbnb.login({ username: 'foo@bar.com', password: 'hunter2' })
// returns a user info object (includes token) or {error: {error obj}}

setDefaultToken

Set the token to use if a token is not supplied for an endpoint function.

airbnb.setDefaultToken('faketoken3sDdfvtF9if5398j0v5nui')

TODO: support other login methods (facebook, twitter, etc...)


USERS

getGuestInfo

Get a user's public facing information

airbnb.getGuestInfo(2348485493)
// returns public info about user (JSON)

getOwnUserInfo

Obtain user data for the logged in account

airbnb.getOwnUserInfo('faketoken3sDdfvtF9if5398j0v5nui')
// returns private info about user (JSON)

CALENDARS

getPublicListingCalendar

Public availability and price data on a listing. count is the duration in months.

airbnb.getPublicListingCalendar({
    id: 109834757,
    month: 1,
    year: 2018,
    count: 1
})
// returns array of calendar days, with availability and price

getCalendar

Private calendar data regarding your listings. Reservations, cancellations, prices, blocked days.

airbnb.getCalendar({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 109834757,
    startDate: '2025-08-05',
    endDate: '2025-08-05'
})
// returns array of calendar days with extended info, for your listings

setPriceForDay

Set a price for a day.

airbnb.setPriceForDay({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 109834757,
    date: '2025-08-05',
    price: 1203
})
// returns a result of the operation

setAvailabilityForDay

Set availability for a day.

airbnb.setAvailabilityForDay({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 109834757,
    date: '2025-08-05',
    availability: 'available' // or 'blocked'?
})
// returns a result of the operation

LISTINGS

listingSearch

Airbnb's mighty search bar in JSON form. All arguments are optional.

airbnb.listingSearch({
    location: 'Akihabara, Tokyo',
    checkin: '2025-08-05',
    checkout: '2025-08-05',
    offset: 0,
    limit: 20,
    language: 'en-US',
    currency: 'USD',
    guests: 6, // Number of guests for price quote
    instantBook: true, // only list instant bookable listings.
    minBathrooms: 0,
    minBedrooms: 2,
    minBeds: 6,
    minPrice: 0,
    maxPrice: 0,
    superhost: true,
    amenities: [1, 2, 4, 23], // array of IDs.
    hostLanguages: [1, 3, 6], // array of IDs.
    keywords: 'ocean view,garden,quiet', //comma separated
    roomTypes: ['Entire home/apt', 'Private room', 'Shared room'],
    neighborhoods: ['westside', 'riverside'],
    minPicCount: 4,
    sortDirection: 1 // 1 = forward, 0 = reverse
})
// returns an array of listings

getListingInfo

Gets public facing data on any listing.

airbnb.getListingInfo(109834757)
// returns public info for any listing (JSON)

getListingInfoHost

Gets private data on one of your listings.

airbnb.getListingInfoHost({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 109834757
})
// returns extended listing info for your listing (JSON)

getHostSummary

Gets an object containing a host's active listings, alerts, and upcoming reservations

airbnb.getHostSummary('faketoken3sDdfvtF9if5398j0v5nui')
// returns host summary info for your account (JSON)

getOwnActiveListings

Gets an array containing a host's active listings

airbnb.getOwnActiveListings('faketoken3sDdfvtF9if5398j0v5nui')
// returns listing array for your account (JSON)

getOwnListings

Gets an array containing a host's listings

airbnb.getOwnListings({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    userId: '2344594'
})
// returns listing array for your account (JSON)

THREADS

getThread

Returns a conversation with a guest or host. This is a legacy endpoint which is somewhat limited in the content (only basic messages are reported in the 'posts' array)

airbnb.getThread({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 909878797
})
// returns a single thread in the legacy format (JSON)

getThreads

A simple list of thread ID's, ordered by latest update. The offset is how many to skip, and the limit is how many to report.

airbnb.getThreads({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    offset: 0,
    limit: 20
})
// returns an array of thread IDS (only the ids, ordered by latest update) (JSON)

getThreadsFull

This is the best way to pull thread data. Returns an array of full thread data, ordered by latest update. The offset is how many to skip, and the limit is how many to report.

airbnb.getThreadsFull({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    offset: 0,
    limit: 10
})
// returns an array of threads in the new format, ordered by latest update (JSON)

getThreadsBatch

A batch version of the above. You can grab a collection of threads referenced by thread ID.

airbnb.getThreadsBatch({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    ids: [23049848, 203495875, 398328244]
})
// returns an array of threads in the new format (JSON)

RESERVATIONS

getReservation

Reservation data for one reservation.

airbnb.getReservation({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 909878797
})
// returns a single reservation in the mobile app format (JSON)

getReservations

Returns a list of reservations in the same format as above, ordered by latest update

airbnb.getReservations({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    offset: 0,
    limit: 10
})
// returns an array of reservations in the mobile app format, ordered by latest update (JSON)

getReservationsBatch

Batch call for grabbing a list of reservations by ID.

airbnb.getReservationsBatch({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    ids: [98769876, 98769543, 98756745]
})
// returns an array of reservations in the new format (JSON)

POSTING

sendMessage

Send a message to a thread.

airbnb.sendMessage({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 2039448789,
    message: 'Hi there!'
})
// returns confirmation

sendPreApproval

Send a pre-approval to a guest.

airbnb.sendPreApproval({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    thread_id: 2039448789,
    listing_id: 340598483,
    message: ''
})
// returns confirmation

sendReview

Send a review to a guest after they have checked out. (id is the thread id)

airbnb.sendReview({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    id: 2039448789,
    comments: 'They were great guests!',
    private_feedback: 'Thank you for staying!',
    cleanliness: 5,
    communication: 5,
    respect_house_rules: 5,
    recommend: true
})
// returns confirmation

sendSpecialOffer

Send a special offer to a guest.

airbnb.sendSpecialOffer({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    check_in: '2025-08-05T00:00:00+00:00',
    guests: 1,
    listing_id: 9876676,
    nights: 1,
    price: 100000,
    thread_id: 98766767,
    currency: 'USD'
})
// returns confirmation

alterationRequestResponse

Send a "reservation alteration request response" to a guest
To accept the request, supply the decision prop with true
To decline the request, supply the decision prop with false

alterationRequestResponse({
    token: 'faketoken3sDdfvtF9if5398j0v5nui',
    reservationId: 23049459,
    alterationId: 2134094,
    decision: true,
    currency: 'USD'
})
// returns alteration object, or an error object.

CONFIGURATION

setConfig

Set multiple config variables at once

setConfig({
    defaultToken: 'faketoken3sDdfvtF9if5398j0v5nui',
    apiKey: '01123581321345589144233377610987',
    currency: 'USD',
    userAgent: 'Mosaic/0.9',
    proxy: 'myproxy.com'
})

setDefaultToken

Set the token to use if a token is not supplied for an endpoint function.

airbnb.setDefaultToken('faketoken3sDdfvtF9if5398j0v5nui')

setApiKey

Use an api key different from the standard one

airbnb.setApiKey('01123581321345589144233377610987')

setCurrency

Set the default currency (the default is JPY, sorry USA)

airbnb.setCurrency('USD')

setUserAgent

set the user agent string for the requests

airbnb.setUserAgent('Mosaic/0.9')

setProxy

set a proxy server to run traffic through

airbnb.setProxy('myproxy.com')

About

Unofficial airbnb.com REST API wrapper for node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
肺结节是什么病 用盐水泡脚有什么好处 没胃口吃点什么好 取缔役什么意思 吃什么东西对肺好
肺结核是什么病 天台是什么意思 化妆的步骤是什么顺序 没有力气是什么原因 小产什么意思
手脚脱皮是什么原因导致的 抗衡是什么意思 大拇指旁边的手指叫什么 自叹不如什么意思 低钾血症挂什么科
h是什么意思 甲亢病是什么原因引起的 白腊金是什么意思 舌头有点麻是什么病的前兆 冷冻跟冷藏有什么区别
sakose是什么牌子hcv9jop5ns2r.cn 葡萄糖高是什么原因hcv8jop2ns4r.cn 鲱鱼为什么那么臭dajiketang.com 什么的口水hcv8jop1ns9r.cn 你的名字讲的什么故事hcv9jop6ns9r.cn
甲状腺肿大挂什么科hcv8jop3ns7r.cn 梦见买狗是什么意思hcv9jop2ns7r.cn 中出是什么hcv8jop5ns4r.cn 歇后语是什么意思hcv7jop9ns0r.cn 子息克乏是什么意思imcecn.com
泉州和晋江什么关系hkuteam.com 阴茎硬度不够吃什么好0297y7.com 去医院查怀孕挂什么科hcv9jop1ns6r.cn 2015年属什么hcv7jop6ns2r.cn 易蒙停是什么药hcv8jop6ns6r.cn
毓读什么hcv9jop5ns8r.cn 鱼子酱为什么那么贵hcv9jop5ns1r.cn 吃紫甘蓝有什么好处hcv8jop2ns2r.cn 老虎凳是什么hcv9jop4ns6r.cn 右位主动脉弓是什么意思hcv7jop9ns8r.cn
百度