0

I have been using Google Places Search API to look for permanently closed locations. As it turns out google filters them out from the query results. For example : Cumberland River Hospital shows up as permanently closed on the google maps

https://www.google.com/search?rlz=1C1GCEV_enUS859US859&ei=JpzVXdXxDq2d_Qams6KwBg&q=Cumberland+River+Hospital&oq=Cumberland+River+Hospital&gs_l=psy-ab.3..0l6j0i22i30l4.3132.3757..4013...0.0..0.229.882.0j4j1......0....1..gws-wiz.3587Ce7Fh7c&ved=0ahUKEwjVnJrvyvnlAhWtTt8KHaaZCGYQ4dUDCAs&uact=5

Now as a test, I try to search for all hospitals in the same coordinates using googleway package as follows :

library('googleway')
 hosps <- google_places(
  location = c(36.544690,-85.500820),
  keyword = 'hospital',
  key = api,
  rankby = 'distance',
  simplify = TRUE)

and it skips out the "Cumberland River Hospital" from the search results. enter image description here

However, when I try to search specifically for "Cumberland River Hospital" in the same coordinates Google Places Search API returns information for that particular hospital that includes a flag "permanently_closed" = TRUE indicating that this place is permanently closed.

library('googleway')
pc_hosp <- google_places(
  location = c(36.544690,-85.500820),
  keyword = "cumberland river hospital",
  key = api,
  rankby = 'distance',
  simplify = TRUE)

enter image description here

Why does Google Places API skip permanently closed location from the regular search results ? Is there a way to include the permanently closed locations along with the regular establishments using Google Places Search API ?

  • If you make a Place Details request using a place ID, or a very specific text search, then I guess you can retrieve the place *and* the information that it is permanently closed which is better than no results. I don't think that Google wants to show closed businesses in their search results though which is likely to be why it doesn't appear when searching for broad terms... – MrUpsidown Nov 25 '19 at 22:16
  • Yup @MrUpsidown , I agree with you that probably google doesn't want to show the closed businesses as it might not be relevant to the search results.Even if choose to go down the route of using Places Detail API as you suggested, I will have no success as for it to work I need to have the place id of the permanently closed hospital which Places Search API won't return when searching for hospitals in a particular region. I wonder if there is a way out there to tweak the query a bit so that it also returns closed businesses alongside other establishments ? – Maiden_Blue Nov 26 '19 at 15:40
  • AFAIK, no. All the different requests and parameters are documented in the official docs and there is no such option. – MrUpsidown Nov 27 '19 at 10:38
  • Thanks @MrUpsidown, really appreciate the help ! – Maiden_Blue Nov 27 '19 at 14:40

0 Answers0