I’m a big fan of Yelp and frequently use it to find great local restaurants. I started using it about six years ago and quickly found the user-contributed reviews and tips to be invaluable. It proved incredibly handy when I moved to DC and knew nothing about the city. A few years ago, I decided to “give back” and over time have contributed over 200 reviews and over a 1000 photos. It’s turned me into a sort of food snob (four star restaurants or bust!) as I always check Yelp before I go anywhere.
Writing Yelp reviews is a fun and creative outlet for me that helps balance out the engineering I normally do. I’m proud of a number of the reviews I’ve written and have enjoyed reading the community’s feedback. It dawned on me that I had no copy of my reviews other than what is on Yelp. If Yelp were to disappear one day, all that work would be lost. Surely, there must be a way to save all your Yelp data. Well, if there is, I didn’t find it. Yelp offers no way to do this (either through the web interface or their API) and it didn’t seem like there was a third party script or application to do this either.
What’s an engineer that wants a copy of his Yelp reviews to do? Write a script himself, of course. Sure, I’m probably the only person who wants a copy of their Yelp reviews. But I figured it’d be a fun way to combine my interests in Yelp and scripting to come up with something useful for me and just maybe, someone else who wants to do the same.
A quick overview of the script:
- Reviews are compiled into a text file and includes relevant business information, date of the review, whether it was a “Review of the Day”, the rating, and the number of useful, funny, and cool votes. If there are multiple reviews for a particular business (updated reviews), it’ll save each of those as well including dates and ratings.
- Photos are saved into a “yelp_pics” folder, named by picture number and caption (i.e. “35 – Chips and dip”), and grouped by business name. A text file is also created that acts as an index for all the pictures and will detail picture number, business name, and caption.
It’s pretty simple to run. Just set the YELP_ID variable in the script to your own Yelp ID. Find it by clicking on your own Yelp profile and looking at the URL. For example, my Yelp profile URL is http://www.yelp.com/user_details?userid=_ImRF2A0Nh6x4G82ChY1Gw meaning that my Yelp ID is _ImRF2A0Nh6x4G82ChY1Gw (note the leading underscore). Once you do that, go ahead and run the script to save your data.
Download the script here. Enjoy!