29

Are there any APIs that will provide the hours of operation for a business at a particular location? Google Places, SimpleGeo, and Yelp don't seem to expose it. If not, is there some dataset that exists (again, i couldn't find one on data.gov or anything) that i could use to create such an API?

aschepis
  • 743
  • 1
  • 7
  • 14
  • When you say "hours of operation for a business", do you mean 9AM to 5PM local time? As [this answer](http://stackoverflow.com/questions/5356538/api-for-getting-business-hours-at-a-location/5469791#5469791) points out, your question is a bit vague. – Matt Passell Mar 31 '11 at 18:30
  • 1
    @Matt, I don't agree. As I commented on that answer, "particular location" seems to clearly mean "particular branch" or "particular storefront." – Matthew Flaschen Mar 31 '11 at 19:22
  • @Matthew Oh, I see. It would be a bit clearer if the question were phrased as "the" (rather than "a") business at a particular location. – Matt Passell Mar 31 '11 at 20:04

7 Answers7

16

The feature request to the Google Places API mentioned by Mihai Danila has been since fulfilled.

Comment 17:

Opening hours are now returned in Place Details results where available: https://developers.google.com/places/documentation/details#PlaceDetailsResults https://developers.google.com/places/documentation/details#PlaceDetailsResponses

Place Search results also now include a property that indicates if a business is currently open.

Community
  • 1
  • 1
Lenny Sirivong
  • 1,001
  • 8
  • 19
  • 1
    Be aware that "special hours" (i.e. you add special hours for a public holiday) are not supported by the Google Places API though. see https://stackoverflow.com/questions/41225668/unable-to-get-special-opening-hours-from-google-places-api – Adriano Nov 27 '17 at 12:51
  • @AdrienBe however, it is available through Google My Business API – Yehor Androsov Nov 21 '18 at 10:04
3

You may want to contact DNB and see if they have an offering since they are the prime source of business information: http://www.dnb.com

Just because they do not offer it as a product publicly does not mean that they cannot build a service to provide what you need.

Keith Adler
  • 20,880
  • 28
  • 119
  • 189
2

Using YQL and JSONP you could gather the data yourself if the API doesn't exist yet.

http://paul.donnelly.org/2009/07/08/yql-and-jsonp-x/

http://developer.yahoo.com/yql/guide/yql-code-examples.html#sdk_yql

Dylan Valade
  • 5,565
  • 6
  • 42
  • 56
  • 1
    thanks Dylan. I've actually started building the functionality myself through scraping, but that's not an answer to the question. Unfortunately, i think that, at present, the answer is that there is not an API that does this. So i'm going to build it as a part of my app. – aschepis Mar 26 '11 at 18:05
  • Please let me know when your app is ready because I would really like to check it out. Good luck! – Dylan Valade Mar 28 '11 at 19:09
2

The Yelp and Facebook API's will often list opening times for local businesses. A company can put it on their page. But its kinda luck of the draw as to wheter or not the times are there.

Check out graph.facebook.com www.facebook.com/developers and http://www.yelp.com/developers/documentation

Steve
  • 21,163
  • 21
  • 69
  • 92
  • You should link to a page that explains the API he wants, not just the general developer home page. – Matthew Flaschen Mar 31 '11 at 19:23
  • 1
    I did some research on this prior to posting the question. Neither of the APIs provide this via the API (although they have the data, as does Google Places.) Its easy enough to scrape from yelp, but thats a hack. – aschepis Apr 01 '11 at 17:29
  • I'll double check. But 100% I used to be able to get opening times via facebook for businesses if its listed on their page. – Steve Apr 02 '11 at 11:44
0

Do you have any news on this thread?

I stumbled upon hoursmap.com trying to solve this, and even e-mailed them, but no response so far.

A scraper may be the best we can do, at least until features requiring business hours find more momentum.

As far as the need to handle siesta times, I believe you can handle this, worst case by writing something like "open between 9-12 and 14-18 on each weekday." I don't think that's a show stopper by any means.

Perhaps Yahoo! Pipes with some scraping is the way to go.

Please let us know if you've been able to make progress.

  • 3
    There is also a feature request for the Google Map API, [here](http://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=store%20hours&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal&groupby=&sort=&id=2431). – Mihai Danila May 08 '12 at 02:37
0

I'm currently investigating Simple Geo's support for annotations as a way to add this info to their Places API. It makes it DIY, but the docs talk about public annotations so maybe operating hours can be crowd sourced.

I'll follow up as I learn more.

-1

hat will provide the hours of operation for a business at a particular location

Are you sure business hours are standardized at least in one country? In Russia we have plenty of varieties. My primary bank works from 09-00 till 20-00. Another one near to my work closes at 19. The shop I buy food from is 24h, another one also with food closes at 22-00.

I don't think you can have an API like that.

Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
  • I think particular location means, "the FooBank at 340 Main St, Smalltown, NY", not "New York". The API would take a unique location id as a parameter. For example, Google Maps has a cid parameter for this purpose. Bank location [one](http://maps.google.com/maps/place?cid=7809276116497473555) and [two](http://maps.google.com/maps/place?cid=10231762686240267284) are the same company, but different locations and different cids. – Matthew Flaschen Mar 31 '11 at 19:22