Embed the widget
One iframe on any booking page. All the stay-context, no code.
The Chora widget is a server-rendered HTML card designed to sit on a property booking page. No API key, no JavaScript framework, works inside any iframe.
Two display modes, and full control over which tiles appear.
Modes
Inline
embed.js handles the shimmer skeleton and auto-resize for you. If
you’d rather wire it yourself, see Graceful loading
and Auto-resize.
Popup
Choose which tiles to show
By default the widget renders every applicable section for the coord
and dates. To limit it, pass sections= with a comma-separated list of
tile IDs.
Available tile IDs:
Order is preserved: sections=michelin,weather,events renders in that
order. Tiles that would return applicable: false for the coord are
still dropped, even if requested.
Query parameters
lat+lng or postcode. If both, lat+lng win.
Locating by postcode
If your CMS stores addresses rather than coordinates, use postcode
instead of lat/lng and let Chora geocode server-side:
Coverage is UK-only (postcodes.io). The resolved coord is the postcode
unit centroid — accurate to ~100 m in urban areas, ~500 m rural. Good
enough for every radius tile (defaults are ≥ 20 km). When postcode
is used, JSON endpoints return a location.resolved_from block so you
can echo the admin district or region back to the user.
Auto-resize (inline mode)
The widget posts a message event with its own height on load and on
mutation. Wire it up on the host page:
Graceful loading
Widget composition takes ~1–2 seconds on a cold request (16 upstream
sources fanned out in parallel; subsequent requests within the minute
are served from cache). Give visitors a placeholder while the first
render is in flight — one <script> tag does it:
embed.js finds every Chora iframe on the page, drops a shimmer
skeleton behind it, fades the widget in the moment its load event
fires, and wires up the auto-resize postMessage. No CSS to paste,
no wrapper markup, no client framework required. The script is
~2 KB gzipped and cached for 5 minutes at the edge.
If you’d rather roll your own placeholder — full control over layout and animation — skip the script tag and inline this pattern:
Theming
Caching
Widget responses are served with Cache-Control: public, max-age=60.
The widget refreshes every minute. Underlying tile data follows each
endpoint’s freshness (weather every 10 minutes, MICHELIN monthly).
Framing policy
The widget sets Content-Security-Policy: frame-ancestors *. It
embeds anywhere. If you’re on a site with a strict CSP, add
https://api.trychora.com to your frame-src.