AIR READINGS ON YOUR WEBSITE
Add Haze
to your site.
Show regional 24-hour PSI and 1-hour PM2.5 inside your page. Visitors can choose a region or tap Use my location, then read the report without leaving your site.
Free HTML embed. No account or API key needed.
Choose a starting region
Visitors can change this themselves. Location is requested only after they tap the button and grant browser permission.
<iframe
src="https://haze.danielk.am/embed.html#central"
title="Singapore air quality by Haze"
width="100%" height="720"
style="border:0"
allow="geolocation https://haze.danielk.am"
loading="lazy" referrerpolicy="no-referrer">
</iframe>- Choose the starting region and click Copy HTML. If copying is blocked, select and copy the code above.
- Paste it into a part of your website that accepts iframe HTML. Your site builder may require an administrator or an approved embed block.
- Publish the page over HTTPS, then check the readings, region menu, location button and Haze link as a visitor.
Keep the widget and its attribution accessible. The frame reserves 720 pixels of height so loading readings and messages do not move the surrounding page. On narrow screens or with long messages, scroll inside the frame to see the full report. Keep this scrolling available. The widget includes a link back to Haze for the full dashboard and guide.
Live preview
This is the same widget visitors will see. Read each measurement time before using a value.
Enable optional location selection
The host page must use HTTPS and the iframe needs its allow="geolocation https://haze.danielk.am" attribute. Visitors still decide whether to grant location permission. Some embedded browsers or site policies may block it.
If your website sends a restrictive Permissions-Policy header, its administrator must also permit the Haze origin. A policy for a host that wants location on itself and Haze can include:
Permissions-Policy: geolocation=(self "https://haze.danielk.am")Merge this with your existing policy rather than replacing unrelated restrictions. An iframe cannot override a parent site's denial. If location is blocked, select a region manually or open the widget directly. If a site builder adds a sandbox, its administrator must allow the widget's scripts, same-origin data access and outgoing links.
The widget uses your position on the device to choose the nearest reporting centre. It does not send precise coordinates to Haze, the host page or a shop. The region is approximate, not a street-level reading or a verified neighbourhood boundary. The embed does not store location or start continuous tracking.
For platform details, see the browser documentation for location permission and the geolocation permissions policy.
Keep readings useful and properly attributed
Data comes from NEA via data.gov.sg, under the Singapore Open Data Licence. The widget keeps source times, units, severity labels and delayed or unavailable states visible. It requests readings every ten minutes while the page is visible; browsers can pause background updates.
Measured 24-hour PSI is different from a next-day forecast. Use the outdoor activity guide for the PM2.5 and PSI forecast distinction. Haze is an independent project, not an official NEA app.
Loading the frame makes normal web requests to Haze's hosting providers. Precise coordinates stay on the device. No account, advertising script or product carousel is included in the embedded report.
If your site blocks frames from other domains, permit https://haze.danielk.am in its frame-src policy. Embed only /embed.html; Haze's main dashboard and other pages intentionally reject framing.