Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Finding reservation availability? #6

Closed
trtg opened this issue Feb 9, 2015 · 3 comments
Closed

Finding reservation availability? #6

trtg opened this issue Feb 9, 2015 · 3 comments

Comments

@trtg
Copy link

trtg commented Feb 9, 2015

Thanks for putting together this API. I wrote something really quickly to fetch the IDs of all the restaurants in my city, but wanted to take things a little further. Using the network tab in chrome, I see that checking for availability on a given day at a given restaurant is done by making a POST request to something like:

http://www.opentable.com/restaurant/profile/50962/search

with a payload like:

{"covers":2,"dateTime":"2015-02-13 17:00"}

Have you explored this at all? My preliminary attempts at using this programmatically are failing. I've tried spoofing my user agent, but that didn't matter. Perhaps it's checking the request origin or looking for some cookie?

@sosedoff
Copy link
Owner

sosedoff commented Feb 9, 2015

@trtg no, i havent. i dont think making reservations will be possible.

@trtg
Copy link
Author

trtg commented Feb 10, 2015

Thanks for getting back to me. I wasn't referring to actually making a reservation but rather simply checking availability for a given time + party size, which is what the POST request mentioned above does. I imagine the problems remain the same however. I imagine they are checking for the origin of the request and/or cookies to be set before responding to a request at /search

@sosedoff
Copy link
Owner

Any code that interacts directly with OT website(/api) will be unstable and unmaintainable unless you found a reliable way to get the data. I dont have any time at the moment to go over the issue or inspect
any possible vectors to get the data in question. Closing this for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants