HourSync logoHourSync
CheckerPricingFAQ
HourSync logoHourSync
CheckerPricingFAQ

Documentation

Installation Guide

Paste one snippet into a Custom HTML or embed block on your website.

Step 1: Configure Allowed Domains (Recommended)

Before embedding, configure which domains are allowed to use your widget. This prevents unauthorized use and protects your widget.

Security Best Practice

Go to your dashboard, select your widget, and click the "Manage Allowed Domains" button (shield icon) to add your website's domain.

If no domains are configured, the widget will work on any website (not recommended for production).

Step 2: Add the Widget

Replace the placeholder widget ID with the ID from your dashboard, then paste the complete snippet where the widget should appear. In WordPress, use a Custom HTML block rather than a paragraph or code block.

<div data-opening-hours-widget="YOUR_WIDGET_ID_HERE"><span style="display:none" aria-hidden="true">HourSync widget</span></div>
<script src="https://hoursync.com/api/embed-script?v=4" defer></script>

If a hosted PMS website does not accept third-party scripts, its support team or site administrator must add the snippet for you.

Keep the hidden marker inside the placeholder. It prevents hosted site builders from removing the element without displaying extra text.

Advanced: Separate Placement

If your site manages global scripts separately, put the placeholder where the widget should appear:

<div data-opening-hours-widget="YOUR_WIDGET_ID_HERE"><span style="display:none" aria-hidden="true">HourSync widget</span></div>

Advanced: Add the Script Globally

Copy the `script` tag below and paste it anywhere on your page, ideally just before the closing `</body>` tag. This script only needs to be added once per page, even if you have multiple widgets.

<script src="https://hoursync.com/api/embed-script?v=4" defer></script>

Localization (Automatic)

The widget automatically detects language from your page's `html lang`, URL locale prefixes like `/el`, and browser locale. For Next-Intl websites this usually works out of the box.

Built-in languages: English, Norwegian, Greek, French, German, Spanish, Italian, Portuguese, Dutch, Turkish, Arabic, Hebrew, Japanese, Chinese, Korean, and Russian.

Most/all languages: Pass `data-translations` from your app (for example Next-Intl message strings).

Optional explicit locale:

<div data-opening-hours-widget="YOUR_WIDGET_ID_HERE" data-locale="el"><span style="display:none" aria-hidden="true">HourSync widget</span></div>

Optional custom translations:

<div data-opening-hours-widget="YOUR_WIDGET_ID_HERE" data-translations='{"today":"Σήμερα","open":"Ανοιχτά","closed":"Κλειστά"}'><span style="display:none" aria-hidden="true">HourSync widget</span></div>

Security & Rate Limiting

Domain Allowlisting: Configure allowed domains in your widget settings to restrict where your widget can be embedded. Requests from unauthorized domains will be rejected with a 403 error.

Rate Limiting: API endpoints are rate-limited to prevent abuse:

  • 100 requests per minute per IP address
  • 200 requests per minute per widget
  • 100 requests per minute per IP + Widget combination

If you exceed these limits, you'll receive a 429 Too Many Requests response with a `Retry-After` header indicating when to try again.

Back to DashboardDashboard Guide
HourSync logoHourSync

Website opening hours, automatically synced with Google Business Profile. Beautiful embeddable widget for any website.

Copyright © 2026 - All rights reserved

LINKS
FeaturesPricingDashboardDocumentationFAQ
SOLUTIONS
Best opening hours widgetWidget alternativesVs manual hoursGBP hours on your siteWix + Google hoursShopify store hours syncSquarespace + Google hoursWordPress + Google hoursWebflow + Google hoursRestaurant hoursFree hours checker
LEGAL
Terms of ServicePrivacy PolicySupport