nderkach / airbnb-python

A Python wrapper around the Airbnb API (unofficial)
Do What The F*ck You Want To Public License
186 stars 66 forks source link

possible to set other filters when searching? like date range, apartment type, etc #9

Closed vesper8 closed 5 years ago

vesper8 commented 5 years ago

just trying out your unofficial API and got it to work pretty easily. It would be so much more useful if it was possible to programatically set all the filters that you can set via the UI. Is there a way to do this, or is this a difficult feature to add?

A built-in way of paginating and cycling through returned listings would be a most welcome addition as well!

Thanks for your contribution! Looking forward to future updates!

vesper8 commented 5 years ago

I'm not sure how helpful this might be, but this other unofficial api built for nodejs (i prefer to use your python project) has a more complete searchListing which you might be able to implement partially https://github.com/zxol/airbnbapi/blob/master/src/main.js#L905-L948

it's also missing the date range and rental type filters however

nderkach commented 5 years ago

just trying out your unofficial API and got it to work pretty easily. It would be so much more useful if it was possible to programatically set all the filters that you can set via the UI. Is there a way to do this, or is this a difficult feature to add?

A built-in way of paginating and cycling through returned listings would be a most welcome addition as well!

Thanks for your contribution! Looking forward to future updates!

Hi @vesper8,

You can call get_homes(offset=<PAGE_NUMBER>, items_per_grid=8) for paging through listings. Is that what you are looking for?

vesper8 commented 5 years ago

yea thanks, I figured out how to paginate. However I'm finding it very difficult to use this without the ability to set the date range at the very least.. any plans to add other filters so you can get the same kind of search results you can get from using the web filters?

nderkach commented 5 years ago

yea thanks, I figured out how to paginate. However I'm finding it very difficult to use this without the ability to set the date range at the very least.. any plans to add other filters so you can get the same kind of search results you can get from using the web filters?

Your wish is my command! I've added checkin/checkout filters in the most recent release.

You can use them like this:

api.get_homes("Lisbon, Potugal", checkin="2019-04-20", checkout="2019-05-20")