GrubHub Data Collection
GrubHub offers a wealth of information regarding local restaurants, menu items, prices & reviews - displaying all of this publicly on its mobile app & website! However, GrubHub does not offer an official API to access this data from, making it tricky to collect this public data if it interests you.
This may be for a reason - GrubHub most likely does not want you to download its entire database of restaurants & menus, nor wants you re-distributing its content without consent. These are very bad things that have legal consequences.
However, if you were to manually access GrubHub and copy bits and pieces of information that intereset you (e.g. through Google Chrome’s Network Tab or HAR File Exports), perhaps for a research project, etc… this is most likely fine - but you should refer to GrubHub’s Terms of Service before doing anything with data you’ve collected.
Unofficial GrubHub API
Since GrubHub offers a mobile & AJAX-driven web application, they maintain an unofficial API that the mobile app & desktop website use to communicate to and from GrubHub’s servers. Therefore, through the use of open source software & traffic interception, we’re able to document how this unofficial API works and how one could intercept it for data collection as an alternative to “screen scraping” or manually copying & pasting data from GrubHub all day long.
If you want to search for restaurants on GrubHub, you could emulate how its restaurant search feature works using the GrubHub Restaurant Search Formula, allowing you to enter latitude and longitude coordinates with search radii, so you can target the cities you’re interested in - just like the app and website.
Once you have a list of restaurants you’re interested in, you could consider the GrubHub Restaurant Details Formula which shows how one could iterate through your list to then collect more details about the restaurants your interested in!
You can also get the reviews for individual restaurants by considering the GrubHub Restaurants Endpoint - which will return the same review information you can publicly see on the GrubHub app and website.