Engineer can’t get decent dinner reservations, creates Urbanspoon-dominating bot | Ars Technica

Hungry? Why wait? —

Engineer can’t get decent dinner reservations, creates Urbanspoon-dominating bot

If all the day's best tables are gone by 4:01am, don't bother waking up—get coding.

Want a seat here? Use Diogo Mónica's bot and thank him later.
Want a seat here? Use Diogo Mónica's bot and thank him later.

It's not uncommon for new San Francisco Bay Area restaurants to spring up and take both the neighborhood and nation by storm (see Mission Chinese Food). But State Bird Provisions (SBP) in the Fillmore district lived this ascent in hyper speed. Despite only opening in 2012, the small plate virtuosos earned distinctions like Bon Appetit's Restaurant of the Year 2012, the James Beard Foundation's Best New Restaurant 2013, and a place in Zagat's 10 Hottest Restaurants in the World. Needless to say, it's hard to just walk up and get a table, even midweek. SBP easily made the SanFranciscoWaits Tumblr.

Diogo Mónica, a security engineer at Square, knows this pain as well as anyone. He was a fan from the start, calling SBP "nothing short of spectacular." But as the restaurant's profile grew, its online reservations portal kept returning the same message: "No reservations are currently available. Reservations are taken online up to 60 days in advance. As tables become available, they will be shown here."

Rather than getting discouraged, Mónica went to his developer tool kit. He SSHed into his remote server and wrote some code to get notified (via e-mail) every time the SBP reservations page changed. (See the code in full on his blog.) He learned that new reservations open around 4am everyday, saw that most were gone by 5am, and received heads-ups about newly available times from cancellations. But curiously, his setup revealed that most of the primetime reservations were scooped up by 4:01am.

"One day I found myself looking at it and noticed that as soon as reservations became available on the website (at 4am), all the good times were immediately taken and were gone by 4:01am," he wrote. "It quickly became obvious that these were reservation bots at work. After a while, even cancellations started being taken immediately from under me. It started being common [to receive] an e-mail alerting of a change, seeing an available time, and it being gone by the time the website loaded."

This isn't the first time Mónica ran into extreme reservation trouble (he told Ars via e-mail that SF's House of the Prime Rib, for example, is also mind-numbingly difficult). He believes any website that exposes an unprotected reservation form online (like Urbanspoon and Open Table) can be vulnerable to this.

So how does one deal with reservation-thieving bots? With one's own reservation-thieving bot, of course. Using mechanize, Mónica created a ruby script that checked for available reservations in a given time range and then made a reservation under his name. The hack worked—he was able to start finding better seating times at SBP.

"Bots are the ideal solution because they require no operation from humans. You want a reservation from a restaurant, you tell your preferred times to the bot and it will check for reservation availability multiple times per minute until it gets you the reservations you want," he told Ars. "In this particular case, bots are actually the only solution because there seem to be other bots at play. Without having one of your own, you are at a significant disadvantage. No human can beat a machine when it comes to these repetitive tasks."

If Mónica's hunch about multiple hungry bots in play is correct—and reservation-hacking bots like HackerTable definitely exist, plus colleagues and friends have told him they've done this in the past—he expects the competition to become more efficient. In a sense, the situation is reminiscent of those fast Ticketmaster concert sellouts. On Twitter, these restaurant reservation wars have been compared to high-frequency stock tradingMónica even joked that the next step is getting his bot physically closer to the reservation system's Web server so he can have a few-microsecond advantage.

Recently, Mónica put his code up for anyone to employ on GitHub. "The point of releasing this bot is leveling the playing field," he said. "My objective is to create a website where non-technical people can use my bot to get reservations of their own. It seems unfair that only technical people get to dine at the 'hip' restaurants in San Francisco." So stay tuned to Mónica's blog for updates on his crusade and notices about other available tools to combat restaurant bots. And as long as the restaurant you're currently targeting uses Urbanspoon, you won't have to eat your fancy dinners at 4pm any longer (for now).

UPDATE (2:05pm PST): EaterSF noticed that Urbanspoon released a statement today in response to Mónica's post (via Inside Scoop):

Urbanspoon's data on State Bird Provisions' reservations do not support the findings reported in Diogo Mónica's post. While we will not disclose data about specific customers, we currently have processes in place to prevent duplicate reservations and combat reservation fraud. Urbanspoon's goal is to give real diners the opportunity to make reservations. We've noticed that many diners will stop at nothing to get a table at the hottest restaurants in town, like State Bird Provisions, so we are constantly working on improving the overall reservations process to give all diners an opportunity to secure a table.

Urbanspoon did not publicly disclose the data referenced here. But in light of Mónica's story, anecdotal evidence overwhelmingly supports his perception—whether it's first-hand accounts of his friends using bots, commenters at EaterSF or here, or folks on Twitter. We'll update further if more information becomes available.

Channel Ars Technica