nderkach / airbnb-python

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

get listing details stopped working #24

Closed fedebenji closed 3 years ago

fedebenji commented 3 years ago

Hello, I get this error on get listing details (I've covered the listing ID on purpose):

400 Client Error: Bad Request for url: https://api.airbnb.com/v2/pdp_listing_details/XXXXXXX?adults=0&_format=for_native&infants=0&children=0

Thanks

Federico

eladhayun commented 3 years ago

Same here, anyone knows the new endpoint?

remybar commented 3 years ago

But is there a new endpoint ? I saw in other projects that now there is an API v3 using GraphQL ... :(

fedebenji commented 3 years ago

I found the solution, the API KEY provided in the code stopped working. That's why. You have to change it with the one you find in your browser requests details (dev mode).

eladhayun-rep-holdings commented 3 years ago

@fedebenji can you please elaborate on how did you get the token? the /authenticate API returns a cookie with sparse data in it

kingfisher429 commented 3 years ago

+1 on the request to elaborate

remybar commented 3 years ago

Just access to an airbnb page, on your web browser dev tools and search for api/v2 calls. You will find an request parameter called key. That's the key to use instead of your current one that is broken now.

fedebenji commented 3 years ago

@eladhayun-rep-holdings, @kingfisher429 Just as @remybar wrote:

  1. open your browser's developer tools tab, network section, XHR
  2. navigate to an Airbnb.com page
  3. look for GET API calls (v2 or v3) -> Header -> Request Header ->Airbnb API Key
assaf13 commented 3 years ago

Thanks @fedebenji I am still getting the same error even after updating the airbnb_access_token with the Airbnb API Key that I found at the Request Header. Did you able to call get_listing_details api or alternatively call the rest API directly ? can you send an example ?

greeceruit commented 3 years ago

Hello! Is there any news on the topic? Maybe someone found another API (or library)?

mcglocks5051 commented 2 years ago

+1 on the above comments. Got the new API key, but still getting the 420 message.

r3v3r3seEntropy commented 9 months ago

i am still not able to fix this