InBetween
SearchPreferences

Opening Times

Use openingConditions to only return venues that are open (or closed) now or at a time you choose, and learn how opening hours are returned.

"preferences": {
  "openingConditions": {
    "state": "OPEN",
    "atTime": "2026-06-12T19:30:00+01:00"
  }
}

Prop

Type

stateEffect
ALLNo opening-time filter. This is the same as leaving out openingConditions.
OPENFilter: only venues open at atTime (or now) are returned.
CLOSEDFilter: only venues closed at atTime (or now) are returned. Venues with no opening hours recorded are never returned.

Overnight hours count towards the day they open. A venue open Friday 22:00-02:00 is open at 01:00 on Saturday morning, and closed at 01:00 on Friday morning.

Getting the time right

atTime is a full RFC 3339 timestamp. InBe converts it to UK local time (Europe/London, so British Summer Time applies) and compares the day and time with each venue's opening hours.

  • Send a real UTC offset. For London in summer (BST), 2026-06-12T19:30:00+01:00 means 7:30pm.
  • Z means UTC. 2026-06-12T18:30:00Z is also 7:30pm in London during BST, but 2026-06-12T19:30:00Z is 8:30pm. If you build timestamps from a local date and time, send the local offset instead of Z.
  • Send a full timestamp. A time on its own, such as "13:00", is rejected with 400.
  • Leave out atTime for "open now". InBe then uses the current UK time.
Build atTime from a local date and time
// "2026-06-12" + "19:30" in Europe/London → "2026-06-12T19:30:00+01:00"
function localAtTime(date: string, time: string, timeZone = "Europe/London") {
  const probe = new Date(`${date}T${time}:00Z`);
  const offset = new Intl.DateTimeFormat("en-GB", {
    timeZone,
    timeZoneName: "longOffset",
  })
    .formatToParts(probe)
    .find((p) => p.type === "timeZoneName")!
    .value.replace("GMT", "");

  return `${date}T${time}:00${offset || "+00:00"}`;
}

Examples

{
  "locations": [{ "lat": 51.5136, "lon": -0.1365 }],
  "mode": { "mode": "POINT", "maxDistance": 500 },
  "preferences": {
    "establishmentFilters": ["serves_coffee"],
    "openingConditions": {
      "state": "OPEN",
      "atTime": "2026-06-12T15:05:00+01:00"
    }
  }
}
{
  "locations": [
    { "lat": 51.5072, "lon": -0.1276 },
    { "lat": 51.5154, "lon": -0.1419 }
  ],
  "mode": { "mode": "POINT", "maxDistance": 750 },
  "preferences": {
    "establishmentFilters": ["serves_dinner"],
    "openingConditions": {
      "state": "OPEN",
      "atTime": "2026-06-12T19:30:00+01:00"
    }
  }
}
{
  "locations": [{ "lat": 51.5246, "lon": -0.0784 }],
  "mode": { "mode": "POINT", "maxDistance": 800 },
  "preferences": {
    "genre": ["Cocktail Bar"],
    "openingConditions": {
      "state": "OPEN",
      "atTime": "2026-12-12T23:45:00+00:00"
    }
  }
}

Open at, not open until

OPEN checks a single minute. A venue that closes at 19:45 is "open" at 19:30. If your users need time to eat, set atTime 30-60 minutes later than they plan to arrive, or check regularOpeningHours in the results.

Opening hours in responses

Every venue includes regularOpeningHours: seven entries, one per day, starting with Sunday, or [] when we don't know the venue's hours. Each day has zero or more time slots in the venue's local time, as 24-hour HH:MM.

"regularOpeningHours": [
  { "weekday": "Sun", "openingTimes": [] },
  { "weekday": "Mon", "openingTimes": [{ "openTime": "12:00", "closeTime": "22:00" }] },
  { "weekday": "Tue", "openingTimes": [{ "openTime": "12:00", "closeTime": "22:00" }] },
  { "weekday": "Wed", "openingTimes": [{ "openTime": "12:00", "closeTime": "22:00" }] },
  { "weekday": "Thu", "openingTimes": [{ "openTime": "12:00", "closeTime": "22:00" }] },
  {
    "weekday": "Fri",
    "openingTimes": [
      { "openTime": "12:00", "closeTime": "15:00" },
      { "openTime": "17:00", "closeTime": "02:00" }
    ]
  },
  { "weekday": "Sat", "openingTimes": [{ "openTime": "10:00", "closeTime": "02:00" }] }
]
  • Empty openingTimes means the venue is closed that day, or its hours aren't known.
  • Several slots mean the venue closes during the day, for example between lunch and dinner.
  • A closeTime earlier than its openTime (like 17:00-02:00 above) means the venue closes after midnight, the next morning. Those hours belong to the day the venue opens.
  • isOpen on each venue says whether it's open at the time of the request, in UK time.

The Detail endpoints also return kitchenOpeningHours (when food is served) and specialOpeningHours (holidays and one-off dates).

Next steps

On this page