HTML / JavaScript

Use StreetKit with a script tag

available The browser widget is the current supported integration for plain HTML forms, static sites, CMS templates, and custom web apps.

When to use

Use this path when you can edit the page markup and add a stylesheet, script tag, and short initialization block. The host form still owns validation, submission, and fallback behavior.

Public mode snippet

<link rel="stylesheet" href="https://streetkit.smp.kiwi/widget/streetkit.css">
<script src="https://streetkit.smp.kiwi/widget/streetkit.js" defer></script>

<label for="address">Address</label>
<input id="address" name="address" autocomplete="off">

<script>
  window.addEventListener("DOMContentLoaded", () => {
    StreetKit.init({
      input: "#address",
      publicMode: true,
      indexBaseUrl: "https://index.streetkit.smp.kiwi/public/v1",
      onSelect(address) {
        console.log(address.label);
      },
      onError(error) {
        console.warn("StreetKit error", error.code);
      }
    });
  });
</script>

Registered siteId pattern

Registered browser access uses an issued public siteId and matching customer index path. Do not invent a site ID, and do not treat it as a secret.

window.addEventListener("DOMContentLoaded", () => {
  const siteId = "REPLACE_WITH_ISSUED_SITE_ID";

  StreetKit.init({
    input: "#address",
    siteId,
    indexBaseUrl: `https://index.streetkit.smp.kiwi/c/${siteId}/v1`,
    limit: 8,
    onSelect(address) {
      console.log(address);
    }
  });
});

Limitations

  • StreetKit v1 covers New Zealand physical-address autocomplete only.
  • It is not postal verification, delivery certification, DPID, PO Box, or Private Bag support.
  • Static index requests can appear in normal CDN/static-host logs.
  • The widget does not replace the form owner's validation, checkout rules, or manual address fallback.
  • Production forms should use short request timeouts and continue normally if suggestions are unavailable.

Read the quick start, widget configuration, and rate limits docs. For registered access, check the current request site ID page.