npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

airapi

v0.1.0

Published

A JS wrapper for airbnb API

Readme

AirAPI

AirAPI is a convenient NodeJS wrapper for Airbnb's API endpoints. This is not affiliated nor endorsed by Airbnb. Airbnb does not provide public access to their API, so use at your own risk. I'm not responsible for any misuse of this.

##How to

// Include the library in your app
var airbnb = require('airapi');

// Search
airbnb.search(options);

// Get calendar
airbnb.getCalendar(options);

// Get hosting information
airbnb.getInfo(hostingId);

// Get hosting estimate income, given availability, 
// which can be retrieved using `airbnb.getCalendar()` above
airbnb.getEstIncome(hostingAvailability);

// Get hosting reviews
airbnb.getReviews(userId, options);

NOTE: All of these API endpoints, except for getEstIncome return a promise.

##Examples ###Search

Search instant-bookable hostings in Seattle, Wa from July 3rd - July 6th, 2015, for 2 people, 2nd result page.

airbnb.search({
 location: 'Seattle, WA',
 checkin: '07/03/2015',
 checkout: '07/06/2015',
 guests: 2,
 page: 2,
 ib: true
}).then(function(searchResults) {
  console.log(searchResults);
});

Possible search options

{
  checkin: {String}, e.g: '04/30/2015'
  checkout: {String},
  guests: {Number},
  page: {Number},
  location: {String}, e.g: 'New York, NY' or 'Seattle, WA'
  price_min: {Number},
  price_max: {Number},
  min_bedrooms: {Number},
  min_bathrooms: {Number},
  min_beds: {Number},
  superhost: {Boolean},
  hosting_amenities: {Array of id}, e.g: [1,4]
  property_type_id: {Array of id}, e.g: [1]
  languages: {Array of id}, e.g: [1,64]
  keywords: {String}, e.g: 'ocean,view,balcony'
  room_types: {Array}, e.g: ['Entire home/apt', 'Private room', 'Shared room']
  ib: {Boolean}, instant-book
  neighborhoods: {Array}, e.g: ['Belltown', 'Queen Anne']
}

###Hosting calendar

Get May + June 2015 calendar for hosting ID: 4569115

airbnb.getCalendar(4569115, {
 currency: 'USD',
 month: 5,
 year: 2015,
 count: 2
}).then(function(schedules) {
  console.log(schedules);
});

###Hosting information

Get general information for hosting ID: 4569115

airbnb.getInfo(4569115).then(function(info) {
  console.log(info);
});

###Hosting estimate income

Estimate income for hosting ID: 4569115 for Jan + Feb, 2015

airbnb.getCalendar(4569115, {
 currency: 'USD',
 month: 1,
 year: 2015,
 count: 2
}).then(function(schedules) {
  console.log(airbnb.getEstIncome(schedules));
});

###Hosting reviews

Get reviews for user ID: 4586440, as a host

airbnb.getReviews(4586440, {
  page: 1,
  role: 'host'
}).then(function(reviews) {
  console.log(reviews);
});

Get reviews for user ID: 4586440, as a guest

airbnb.getReviews(4586440, {
  page: 1,
  role: 'guest'
}).then(function(reviews) {
  console.log(reviews);
});
  • To run the example
git clone https://github.com/phamtrisi/airapi.git airapi
cd airapi && npm install && node example.js

##License Free to use. Please star if this is helpful to you.