Get opening hours and find open places

HERE Geocoding and Search returns the opening hours of place results and can restrict place results to those that are open at a given moment. This helps users plan a visit, for example, by finding a restaurant that is open when they arrive.

The placesOpenAt query parameter is supported by the /discover, /browse and /autosuggest endpoints.

Read the opening hours of a place

When HERE has a place's opening hours, its result includes an openingHours list. The following extract of a /lookup response shows a specialty food store that also runs a restaurant:

{
  "title": "Bricco Salumeria & Pasta Shop",
  "id": "here:pds:place:840drt2z-da7d929da56241ab90a63e9b04581a3e",
  "resultType": "place",
  "categories": [
    { "id": "600-6300-0067", "name": "Specialty Food Store", "primary": true },
    { "id": "100-1000-0000", "name": "Restaurant" }
  ],
  "openingHours": [
    {
      "categories": [{ "id": "100-1000-0000" }],
      "text": ["Mon-Sun: 10:00 - 22:00"],
      "isOpen": false,
      "structured": [
        { "start": "T100000", "duration": "PT12H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA,SU" }
      ]
    },
    {
      "categories": [{ "id": "600-6300-0067" }],
      "text": ["Mon-Sat: 09:00 - 17:00"],
      "isOpen": false,
      "structured": [
        { "start": "T090000", "duration": "PT08H00M", "recurrence": "FREQ:DAILY;BYDAY:MO,TU,WE,TH,FR,SA" }
      ]
    }
  ]
}

The openingHours fields are:

  • text is a human-readable rendering that you can display as is. The API localizes it in the same language as the other textual elements of the result and follows the lang query parameter where possible. With lang=de-DE, the first block reads Mo-So: 10:00 - 22:00. See Response language.
  • structured is the machine-readable form, with iCalendar start, duration, and recurrence values.
  • categories lists the place categories that a set of opening hours applies to. In the example, the restaurant and the store have different hours. When categories is absent, the opening hours apply to all categories of the place.
  • isOpen tells whether the place is open at the time of the request. The placesOpenAt filter doesn’t affect this field.

For the definition of these fields, see the API Reference.

📘

Note

The place's time zone may differ from the user's time zone. See Include time zone information.

Use cases

The following examples show how to use the opening hours filter in common search scenarios.

Places that are open when you arrive

To search for restaurants near the geo-position (42.36346,-71.05444) in Boston that are open on Monday, December 7, 2026 at 19:00 local time (UTC-05:00), send the following request:

GET https://discover.search.hereapi.com/v1/
    discover
    ?at=42.36346,-71.05444
    &q=restaurant
    &limit=5
    &placesOpenAt=2026-12-07T19:00-05:00
    &apiKey={YOUR_API_KEY}

The request uses these parameters:

  • at - The search center.
  • q - A free-text query.
  • limit - The maximum number of results.
  • placesOpenAt - The moment at which places must be open. For the accepted formats, see the API Reference.
  • apiKey - Your API key.

The response contains only places that are open at the requested moment. The following extract shows the first two results:

{
  "items": [
    {
      "title": "Ristorante Villa Francesca",
      "id": "here:pds:place:840drt3p-3913bfe3c9be45dab20af116ae4ca18b",
      "resultType": "place",
      "openingHours": [{ "text": ["Mon-Sat: 12:00 - 22:30"] }]
    },
    {
      "title": "Casarecce Ristorante",
      "id": "here:pds:place:840drt3p-bfe137a807b449ccb3dac212fadcd5b0",
      "resultType": "place",
      "openingHours": [{ "text": ["Mon-Thu, Sun: 11:00 - 22:00", "Fri, Sat: 11:00 - 22:30"] }]
    }
  ]
}

Without placesOpenAt, the same request also returns Galleria Umberto, which closes at 14:30, and Aquapazza, which has no opening hours on Mondays. The filtered response omits both places and fills the list with the next open restaurants. The API applies the filter first, then ranks and limits the results, so limit applies to places that are open.

The offset only fixes the moment. The API checks each place against its opening hours in its own local time, so the same moment written with another offset gives the same result. placesOpenAt=2026-12-08T00:00Z and placesOpenAt=2026-12-08T01:00+01:00 are equivalent to the Monday 19:00 request.

Keep places without known opening hours

Not every place has known opening hours, and some places lack hours for a given day. By default, the API omits such places. To include them in the response, add the qualifier includeUnknown=true to the value:

GET https://discover.search.hereapi.com/v1/
    discover
    ?at=42.36346,-71.05444
    &q=restaurant
    &limit=5
    &placesOpenAt=2026-12-07T19:00-05:00;includeUnknown=true
    &apiKey={YOUR_API_KEY}

The response now also contains Aquapazza, which has no opening hours on Mondays, and Mare Boston, which has no opening hours at all:

{
  "items": [
    {
      "title": "Aquapazza",
      "resultType": "place",
      "openingHours": [{ "text": ["Wed, Thu: 17:00 - 22:00", "Fri, Sat: 17:00 - 23:00", "Sun: 17:00 - 21:00"] }]
    },
    {
      "title": "Mare Boston",
      "resultType": "place"
    }
  ]
}

Places that close before the requested time, such as Galleria Umberto, are not returned in either case.

Use the default when users need to know a place is open, such as when planning a trip to a remote location. Use includeUnknown=true when few places in a category have known opening hours; otherwise, the default might omit too many results.

Search for places and other result types in one query

The filter only applies to places. Other result types are returned as usual. The following request returns the city of Boston, because a city has no opening hours:

GET https://discover.search.hereapi.com/v1/
    discover
    ?at=42.36346,-71.05444
    &q=Boston
    &limit=3
    &placesOpenAt=2026-12-07T19:00-05:00
    &apiKey={YOUR_API_KEY}
{
  "items": [
    {
      "title": "Boston, MA, United States",
      "resultType": "locality",
      "localityType": "city"
    }
  ]
}

You can therefore leave placesOpenAt set while your end-users enter free-text queries.

Special case: search for a secondary category

When you search by category using /discover or /autosuggest endpoint, or use the categories parameter with /browse endpoint, results can include places where the searched category is secondary. The filter then uses the opening hours of the primary category of the place, not those of the searched category.

Bricco Salumeria & Pasta Shop, introduced in Read the opening hours of a place, is a specialty food store (primary category, open Monday to Saturday from 09:00 to 17:00) with a restaurant (secondary category, open daily from 10:00 to 22:00). The following request searches restaurants around it at 19:00 on a Monday:

GET https://discover.search.hereapi.com/v1/
    discover
    ?in=circle:42.36309,-71.05495;r=60
    &q=restaurant
    &placesOpenAt=2026-12-07T19:00-05:00
    &apiKey={YOUR_API_KEY}

Although its restaurant is open at 19:00, the Geocoding and Search API v7 omits Bricco Salumeria & Pasta Shop because its primary store category closes at 17:00. At 12:00 on the same day, the store is open and the API returns the place. A request to the /browse endpoint with categories=100-1000-0000 around the same position gives the same results.

The response includes the opening hours of secondary categories, each set with its categories. You can use those hours to refine results for the searched category.

Edge cases and limits

Keep the following behavior and limitations in mind:

  • Coordinate search: placesOpenAt does not apply to coordinate searches.
  • Which opening hours count: the filter uses the opening hours of the primary category of the place. See Special case: search for a secondary category.
  • Autosuggest: Place suggestions only contain their opening hours when the request has show=details. Query suggestions are not filtered, because they have no opening hours. The follow-up link of a query suggestion contains the same placesOpenAt value, so that the filter is kept when the suggestion is selected.
  • Closed place not found: When users search for a specific place by name or phone number, the API omits it if its opening hours exclude the requested moment. Retry the request without placesOpenAt to find the place.
  • Unknown state: A place has an unknown state when it lacks opening hours, lacks hours for the evaluated day, or when the API cannot determine its time zone. The API returns such a place only with includeUnknown=true.
  • Boundaries: A place is open from its opening minute up to, but not including, its closing minute. The API supports opening hours that cross midnight.
  • Past and future moments: The Geocoding and Search API v7 evaluates past and future moments against the opening hours available when it processes the request. It doesn’t use historical opening hours, and future hours might not match a place’s actual hours.
  • Weekly hours only: Only regular weekly opening hours are considered. Holidays and annual closing periods are not.

Did this page help you?