I am trying to find spatial data on all (or as many as possible) US college dormitories. Specifically, I want to find the location as a polygon or centroid. I have tried a few methods to acquire this data, including using the serpapi Python scraping package. I tried using the following but it seems it is returning an incomplete dataset (I tried Raleigh, NC to test, which probably has a couple dozen dorms and it only returned 3-4).

 from serpapi import GoogleSearch
 search2 = GoogleSearch({"q": "dormitory", "location": "Raleigh, North Carolina", "api_key": <my_api_secret_key>})
 result2 = search2.get_dict()

If you print the results, it returns a json object with a key called "local_results" that has the data I need but, like I said, it was incomplete and only returned a few dorms. Is anyone familiar with this API package or know of another source where I might find this data?

  • 2
    What do you count as a "dormitory?" For example, are you counting only residence halls owned by a college, only residence halls on a college campus, or apartment complexes that appeal to college students?
    – moonman239
    Nov 16, 2021 at 18:45
  • 2
    I searched "dormitory raleigh nc" in Google Maps and found that out of 20 student housing arrangements, 2 were classified as dormitories, and the rest as "student housing centers"
    – moonman239
    Nov 16, 2021 at 18:47
  • Good point, I'll try to widen my search parameters.
    – gwydion93
    Nov 16, 2021 at 18:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.