Hi,
according to the Google API documentation, we can get the opening hours of a place, although when I run this in Bubble I can not see how I can get the opening hours from the results returned?
Hi,
according to the Google API documentation, we can get the opening hours of a place, although when I run this in Bubble I can not see how I can get the opening hours from the results returned?
Use the Place API to get details of the place, including opening hours.
thanks @NigelG
I can see that I can get the âOpen Nowâ result, how do you get the actual daily opening hours for a place?
We donât expose that yet. Which field are you interested in?
Hey @emmanuel
I am after the âopening_hoursâ results from a Google Place Details search.
Here is the link to the Google developers documentation:
https://developers.google.com/places/web-service/details#PlaceDetailsResults
Well opening_hours has a few sub fields, and open_now is one of them⌠So iâm asking for something specific.
Looks like the âperiods []â or âweekday_textâ would have what I require, which is basically the opening hours by day.
I could add weekday_text, the other one is a bit more complex.
Excellent! -yes I think that would work, as it looks like is returned formatted as 7 strings representing each day.
Are you able to also add âpermanently_closedâ Boolean aswell?
That would be helpful too.
Because you have the PlaceId it is quite simple to do the Places API call to get the details.
I tried through Get Google Place and through the connector using the Google Place Details API and the opening_hours is not being exposed as I understand on what @emmanuel said earlier.
Your place may not have that data ?
I just tried with the following id of a venue in Melbourne AU, Arbory Bar & Eatery and the same results (no opening hours).
place id: ChIJ0VN8sMdC1moRC6hlFTecbTM
Doesnât have it.
{
âhtml_attributionsâ: [],
âresultâ: {
âaddress_componentsâ: [
{
âlong_nameâ: â1â,
âshort_nameâ: â1â,
âtypesâ: [
âstreet_numberâ
]
},
{
âlong_nameâ: âFlinders Laneâ,
âshort_nameâ: âFlinders Lnâ,
âtypesâ: [
ârouteâ
]
},
{
âlong_nameâ: âMelbourneâ,
âshort_nameâ: âMelbourneâ,
âtypesâ: [
âlocalityâ,
âpoliticalâ
]
},
{
âlong_nameâ: âMelbourne Cityâ,
âshort_nameâ: âMelbourneâ,
âtypesâ: [
âadministrative_area_level_2â,
âpoliticalâ
]
},
{
âlong_nameâ: âVictoriaâ,
âshort_nameâ: âVICâ,
âtypesâ: [
âadministrative_area_level_1â,
âpoliticalâ
]
},
{
âlong_nameâ: âAustraliaâ,
âshort_nameâ: âAUâ,
âtypesâ: [
âcountryâ,
âpoliticalâ
]
},
{
âlong_nameâ: â3000â,
âshort_nameâ: â3000â,
âtypesâ: [
âpostal_codeâ
]
}
],
âadr_addressâ: â<span class=âstreet-addressâ>1 Flinders Ln, <span class=âlocalityâ>Melbourne <span class=âregionâ>VIC <span class=âpostal-codeâ>3000, <span class=âcountry-nameâ>Australiaâ,
âformatted_addressâ: â1 Flinders Ln, Melbourne VIC 3000, Australiaâ,
âgeometryâ: {
âlocationâ: {
âlatâ: -37.814523,
âlngâ: 144.974164
},
âviewportâ: {
ânortheastâ: {
âlatâ: -37.81432665000001,
âlngâ: 144.97419445
},
âsouthwestâ: {
âlatâ: -37.81458845,
âlngâ: 144.97407265
}
}
},
âiconâ: âhttps://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.pngâ,
âidâ: â93c59bfd0dbd22d21c6dd96c701e22b5a1a3a8bfâ,
ânameâ: â1 Flinders Lnâ,
âplace_idâ: âChIJ0VN8sMdC1moRC6hlFTecbTMâ,
âreferenceâ: âCpQBigAAAAqugD3V48fq2gctrDwDWYFx81WjZUEbFgv3h2z9gsVQQVMzOqLdWR7XbAyZZSKSXhYOk1SYV43TIQ5CS9gs8pxjcsN9jnYxgQebEiCJMW49fYw1s0t_sk_peIBqf_GzRxOTKVcPo24G624lbjerf_8U-L40XUaSRwuqmrkQd30UeVdGmim4xcuI_QjSGvcxmBIQgWioRZ_VTuqgLKoKJBBY4BoUnCFb11UBVFhWxYwVU4VY4oGjnvIâ,
âscopeâ: âGOOGLEâ,
âtypesâ: [
âstreet_addressâ
],
âurlâ: âhttps://maps.google.com/?q=1+Flinders+Ln,+Melbourne+VIC+3000,+Australia&ftid=0x6ad642c7b07c53d1:0x336d9c371565a80bâ,
âutc_offsetâ: 600,
âvicinityâ: âMelbourneâ
},
âstatusâ: âOKâ
}
My example âŚ
{
âhtml_attributionsâ: [],
âresultâ: {
âaddress_componentsâ: [
{
âlong_nameâ: âOld London Roadâ,
âshort_nameâ: âOld London Rdâ,
âtypesâ: [
ârouteâ
]
},
{
âlong_nameâ: âMicklehamâ,
âshort_nameâ: âMicklehamâ,
âtypesâ: [
âpostal_townâ
]
},
{
âlong_nameâ: âSurreyâ,
âshort_nameâ: âSurreyâ,
âtypesâ: [
âadministrative_area_level_2â,
âpoliticalâ
]
},
{
âlong_nameâ: âEnglandâ,
âshort_nameâ: âEnglandâ,
âtypesâ: [
âadministrative_area_level_1â,
âpoliticalâ
]
},
{
âlong_nameâ: âUnited Kingdomâ,
âshort_nameâ: âGBâ,
âtypesâ: [
âcountryâ,
âpoliticalâ
]
},
{
âlong_nameâ: âRH5 6DUâ,
âshort_nameâ: âRH5 6DUâ,
âtypesâ: [
âpostal_codeâ
]
}
],
âadr_addressâ: â<span class=âstreet-addressâ>Old London Rd, <span class=âlocalityâ>Mickleham <span class=âpostal-codeâ>RH5 6DU, <span class=âcountry-nameâ>UKâ,
âformatted_addressâ: âOld London Rd, Mickleham RH5 6DU, UKâ,
âformatted_phone_numberâ: â01372 372279â,
âgeometryâ: {
âlocationâ: {
âlatâ: 51.26773869999999,
âlngâ: -0.3241108
},
âviewportâ: {
ânortheastâ: {
âlatâ: 51.26776064999998,
âlngâ: -0.3238903000000001
},
âsouthwestâ: {
âlatâ: 51.26767285000001,
âlngâ: -0.3241843
}
}
},
âiconâ: âhttps://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.pngâ,
âidâ: âceb8321f73a72af2e93e576f3cc2fcf0472a02e6â,
âinternational_phone_numberâ: â+44 1372 372279â,
ânameâ: âThe Running Horsesâ,
âopening_hoursâ: {
âopen_nowâ: true,
âperiodsâ: [
{
âcloseâ: {
âdayâ: 0,
âtimeâ: â2230â
},
âopenâ: {
âdayâ: 0,
âtimeâ: â1200â
}
},
{
âcloseâ: {
âdayâ: 1,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 1,
âtimeâ: â1130â
}
},
{
âcloseâ: {
âdayâ: 2,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 2,
âtimeâ: â1130â
}
},
{
âcloseâ: {
âdayâ: 3,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 3,
âtimeâ: â1130â
}
},
{
âcloseâ: {
âdayâ: 4,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 4,
âtimeâ: â1130â
}
},
{
âcloseâ: {
âdayâ: 5,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 5,
âtimeâ: â1130â
}
},
{
âcloseâ: {
âdayâ: 6,
âtimeâ: â2300â
},
âopenâ: {
âdayâ: 6,
âtimeâ: â1130â
}
}
],
âweekday_textâ: [
âMonday: 11:30 am â 11:00 pmâ,
âTuesday: 11:30 am â 11:00 pmâ,
âWednesday: 11:30 am â 11:00 pmâ,
âThursday: 11:30 am â 11:00 pmâ,
âFriday: 11:30 am â 11:00 pmâ,
âSaturday: 11:30 am â 11:00 pmâ,
âSunday: 12:00 â 10:30 pmâ
]
},
âphotosâ: [
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAGBZ0upbIsj3c2alv9dIS0dtu6uGGgf_vzkYd1yflVhUhT21Ud8q9nJQeXN2__f5RBfdfvd3O9gwXIte7OUfMtXrN0Qsm0YFxRNyt8YZ_xJTAjWrV2rgDpv0-I-ULda4VA9p-xrm16zHRJrCoN5Zq_48ork09_z4lA3sWcrqSOo2EhDrm63EDCcQiWNN-ZM_tHgsGhT9mrAXYQjrp0iDXFRtnBNgFhX3PAâ,
âwidthâ: 668
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAPrcvhFQ8ClKST10VKeZYqSDqfIQTCgwxaxT8MiZh16vFPI1kev_uTpiwjvPn75xc_ub_hdo1-O2TKaTi8wUrtd87E_6TVPrLOmOBkeTiTjHG5Fb-evJ8o5tN7rE6PO3yNy2S8t3rMZMpF2FeyVupBNFZk3gB9Of-umka7dGQohpEhDWHeSda7sCvFUxqSLyob-tGhQArBxyVE0wFlA9-6wzFtpd98avYwâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAHnxCtMnueLrQRuBPLSzi3eJZTfzLYy_NlhsQOrEcTDIJvbiVTkFUfluxESK7Riv-UnsMdNRlXnTrblszEJJVSgFVMb2IjqG4U3WkOUGx7l8J3f6mOxg-8D8eeWjZZMTyHEAUiVMo2GvvEXqwzrUgWg_aHtqYp6HVSoBLhdHoVjcEhDfK6q6BSvYx6gLqfU6MOvBGhT7ty-JEnZJazXGVXxJa5qXHWPlHQâ,
âwidthâ: 1000
},
{
âheightâ: 2160,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/114270508239756000923/photosâ>Jørgen Lutroâ
],
âphoto_referenceâ: âCoQBdwAAACpPK9XYzHXaBm9bnqdaHsWI2-P1DklE-kobEBbc6lZSRaaFsrVTl1dOltmF1w2XmdkbCGF64uf8KqasHyCQtY0H7K5kTMrfWlg6AIw4hmIQm4aE3ehkpYoalqCHkTKmm4-DPDJPF-ncJBzsDejuWwOccIE8OPTltnBKqysQfsCPEhDD0QQUOzJg37W82kQPDhKpGhRoKXPPHCSvnZf0e_RwAggw77NXSwâ,
âwidthâ: 3840
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAOhBSbq7Vm5oidcHJlycmJEMYZab5_gowdJz_ejP51ngBFGQ9Xz11jOKycm0Moovdop71fc96QCwbgIhcKCrB4qZeGfXP_ap3GhaxklDVNUFYBrDwitgOePKDDw5JfGsGwHHFmUg9zQMpFEoiuTOqtIiVcjxpwcsfkNGcFR3XuN0EhDDnnetU-Rtugno93FftMGGGhQVoN9Ew0dg6EeUbHrKUb63zFdkXgâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAO9jPoJT9ss7vC73kapCJ8WwyVlmWJVXMqc8oZtzZoZXh9OFUh-tqCMEZLtT_0i0zVFCj7XE2KymlB4-2RI1jkHebZWxW_XedEEjj6FBbk6vcoqsom8qWl9gZu_mlTy41C74Eru_f9Et_HrKVOTTbymNuzeZ273IAszra_rlCvB8EhBiuFHK0IJEOoVvfkzCq0cdGhQj880RFfdenc60BxpQHFjiozFyogâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAIGWr_6P6D6B6aOniVMzWtd2QThJNh2uANFuItW9l_TQFYkDwrcZMq0FUOzsG9o6agQjjwk2y-LVuiy0AZUBkZAnlo1-yegxAMVaMAkVH9ex58PvyBx3BmhVVDKap5uLWgpAZREHer25XdeC1X-jxYnJle3j2CzX7QjCWjUeftF7EhAVVvWgdQRwIQofYd36yQtqGhS4eZxdZA2cQ39iEdbpMT8p4pcdKgâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAM0VRfh3EHGeztyBVqrq8_DPs7mNgYwUCxpOerKrDmiZzA9ZjUFIgccAylOPNdwon9GsUFRJxNyO9wbiim4gDbhkdlr2jes0m7mNW586Mc9CsfZPozSd3ZKWvVDpBCHdDnJfVERNPYNpaRvOb6MrtCg-DGPJWIUiu2N0DTJSpKrlEhCXSaVGLrzKCl9ZqLy-vXm4GhRNOSuK3r8LYXK_hyjDZWbBVME52Aâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAAATvioggQcI5M8bWWCmx6dpR4pdw9eG1GvUTJYluJ20yKS3cH34nleXqQ-mz0dskdIPsbQXhIDCMpm1gKP_jEjeN4c27TjVYEJsNZPqH7I-dcfoErHv-VQCoe_FJ-XouBIMHZ5NaPh9idt31zafYskuyu_XA0Aqe8j3ZwX9KgHTEhDANzKG2mPMqQSj1UwEHDr9GhQo2fEqcNvcY0XJixCnRcVnAoq2Uwâ,
âwidthâ: 1000
},
{
âheightâ: 667,
âhtml_attributionsâ: [
â<a href=âhttps://maps.google.com/maps/contrib/112945391202338073310/photosâ>The Running Horsesâ
],
âphoto_referenceâ: âCoQBdwAAAAdpC9_PLv-fVs4YVNjMxu4M4PpdZkCPAZdQqF4y4E4JuWVCo006g_bYNk1DooKmXX1o8AhR19T_94_fdKGKFoF7IgUCPYLfJwIw6_SprED1AQbffFUpFtvheRJaL2hDYhx10pBzXldfRypbL24da8NC8VaHuS4DCi6ChqpU7uagEhBEMGTqMrPjQWWgeatdBBP-GhTETB1f9Kg-CVZ44_7_6f7vDf3wngâ,
âwidthâ: 1000
}
],
âplace_idâ: âChIJkwrZKCrhdUgRSgg_RRlJpLMâ,
âratingâ: 4,
âreferenceâ: âCnRmAAAAim7MzuHjsf1SJFJICM1R3Nh5SmAM-2J1drO8C7RYxd2SE9BjxLXihXlMOJHYRLgG5so5E6stwOurR4bq0E4-Mk8cKlCEhZfLgSNr4sxnZwOuIBzryhoc8YMTjLmPxWUwjIYpvZD0X_7kjsL-pXCjLxIQw9y8oFn9qE3eJzKDi-y-GRoUUpZIghcn82nH1KhSitFmMbmUe7sâ,
âreviewsâ: [
{
âaspectsâ: [
{
âratingâ: 3,
âtypeâ: âoverallâ
}
],
âauthor_nameâ: âKathryn Phillipsâ,
âauthor_urlâ: âhttps://plus.google.com/109688355995349532307â,
âlanguageâ: âenâ,
âprofile_photo_urlâ: â//lh4.googleusercontent.com/-x-yeChsxWIs/AAAAAAAAAAI/AAAAAAAANwM/KLsusU0-fVQ/photo.jpgâ,
âratingâ: 5,
âtextâ: âWe live locally and have been to the Running Horses on a number of occasions. Sunday lunch is wonderful and very generous, the steak is lovely and we once popped in after a walk up Box Hill and had great sandwiches. All round great place to have near home.â,
âtimeâ: 1466625793
},
{
âaspectsâ: [
{
âratingâ: 2,
âtypeâ: âoverallâ
}
],
âauthor_nameâ: âde Beaufort jacquesâ,
âauthor_urlâ: âhttps://plus.google.com/100151273641032665413â,
âlanguageâ: âenâ,
âprofile_photo_urlâ: â//lh4.googleusercontent.com/-NKvfMYTZRCU/AAAAAAAAAAI/AAAAAAAAAVI/x176QfMNJ1k/photo.jpgâ,
âratingâ: 4,
âtextâ: "Very friendly staff and management.\nCosy pub with good beers and wines. Good and thoughtful food. Beautiful countryside environment. This is an excellent place to stay for a while, play golf in one of many neighboring ones. ",
âtimeâ: 1466009355
},
{
âaspectsâ: [
{
âratingâ: 3,
âtypeâ: âoverallâ
}
],
âauthor_nameâ: âDavid Garciaâ,
âauthor_urlâ: âhttps://plus.google.com/101235765771484979547â,
âlanguageâ: âenâ,
âratingâ: 5,
âtextâ: âStopped for lunch. Delicious food⌠I had a devilled crab on toast, my companion had pie and mash⌠they have their own bitter especially brewed for the Running Horses which hit the spot. Good atmosphere⌠seemed like the good people of Mickleham use the pub as an extension to their homes. My only criticism is that I would have appreciated a more generous portionâ,
âtimeâ: 1460207678
},
{
âaspectsâ: [
{
âratingâ: 2,
âtypeâ: âoverallâ
}
],
âauthor_nameâ: âFrankie Mayâ,
âauthor_urlâ: âhttps://plus.google.com/103557305832355481396â,
âlanguageâ: âenâ,
âratingâ: 4,
âtextâ: "Good food slightly over priced. Lovely helpful manager! ",
âtimeâ: 1462395640
},
{
âaspectsâ: [
{
âratingâ: 3,
âtypeâ: âoverallâ
}
],
âauthor_nameâ: âRichard Thomasâ,
âauthor_urlâ: âhttps://plus.google.com/112001555782914072199â,
âlanguageâ: âenâ,
âprofile_photo_urlâ: â//lh4.googleusercontent.com/--7vHGaM1BC4/AAAAAAAAAAI/AAAAAAAABiU/NRAPLagTquk/photo.jpgâ,
âratingâ: 5,
âtextâ: "Nice pub with friendly service and garden; unspoilt by corporate makeovers. ",
âtimeâ: 1466861060
}
],
âscopeâ: âGOOGLEâ,
âtypesâ: [
âbarâ,
âlodgingâ,
âpoint_of_interestâ,
âestablishmentâ
],
âurlâ: âhttps://maps.google.com/?cid=12944551601854416970â,
âutc_offsetâ: 60,
âvicinityâ: âOld London Road, Micklehamâ,
âwebsiteâ: âhttp://www.therunninghorses.co.uk/â
},
âstatusâ: âOKâ
}
Now that is a very good question.