zxol/airbnbapi

listingSearch doesn't work anymore?

d668 opened this issue · 7 comments

d668 commented

Copied from the readme

var airbnb = require('airbnbapijs');
(async () => {
    var list = await airbnb.listingSearch({
        location: 'Akihabara, Tokyo',
        checkin: '2020-01-21',
        checkout: '2020-02-10',
        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
    });
    console.log(list); //undefined
})().catch(err => {
    console.error(err);
});

list is undefined

Have you tried logging from a then callback?

This function stopped working for me too. It worked from earlier this year but stopped working about a couple months ago.

d668 commented

@pbvillaflores because it is silly to assume just calling http endpoint will keep working. Have a look at https://github.com/mgp25/Instagram-API to get the idea what it takes to fool a mega corporation

d668 commented

@jasonsbarr await is the same as then

Anyway

var airbnb = require('airbnbapijs');
airbnb.listingSearch({
    location: 'Akihabara, Tokyo'
})
    .then(x =>
        console.log(x)
        )
    .catch(x =>
        console.log(x)
        );

doesn't go into error, goes into then and undefined

Same for me, return undefined.

Looks like there is also problem with catch block (log doesn`t work??).

After replace log.e to console.error I am getting :

StatusCodeError: 404 - {"error_code":404,"error_type":"record_not_found","error_message":"Unfortunately, this is no longer available.","error_id":"0901df9625d97646f8a8b1fa8eef9b89"}

I am using big cities in query like: Prague, New York, London...

Was anyone able to get this working?