The five boroughs of New York City boast a wide range of food options — from halal street food to world famous culinary cuisine. With help of online review sites like Yelp, residents can navigate the overwhelming number of dining options.

And as it turns out, these user-generated commentary sites can be used for more than figuring out where to book a table on a Saturday night.

As New York’s Department of Health and Mental Hygiene figured out, these online reviews are an important source in discovering restaurants violating health code.

Using a software program created by experts at Columbia University, the city mined 300,000 Yelp restaurant reviews (between July 2012 and March 2013) where patrons complained of vomiting, diarrhea, or other details following a meal that could signal food-borne illness, according to the New York Times.

Their findings? Out of 893 possible cases that needed further investigating,  56 percent illustrated an incident akin to food-borne illness, according to a recent federal Center for Disease Control’s Morbidity and Mortality Weekly Report.

MORE: Will Philly Be Known for Healthy Produce Instead of Cheesesteaks? 

Though the method is not entirely accurate — there’s no way to tell if the food poisoning came from somewhere else — health inspectors were able to find three restaurants in violation of code.

One eatery was discovered to have bare-handed contact with ready-to-eat food, while another failed to properly clean work surfaces and was found to have cross-contamination of ingredients in the refrigerator. Health inspectors found evidence of cockroaches and mice at a third restaurant as well.

“With food-borne illnesses, it’s much better to reach people sooner,” medical epidemiologist Dr. Sharon Balter told the New York Times. “When investigating an outbreak, we want to know what people who got sick ate, who else was with them and what items they all ate together. If you wait, people forget.”

During the pilot program, officials culled potential cases using a week’s worth of Yelp data at a time, but now experts are combing through the data daily in attempt to prevent future outbreaks. Officials are encouraging other online review sites to contribute to the project to benefit public health.

And while the innovative, cost-effective experiment is fair from perfect, it goes to show that social media can be used for far more than just to #humblebrag or #tbt.