Skip to main content

DocsIntegrate

Widget

Two lines of HTML give any website a live “Can you build here?” checker. A resident types an address and the real Score engine answers with the Score, the factors and what their project needs. The checker is an iframe; the one-line script that fits its height is optional, so the widget installs with no JavaScript on your page.

On this page
  1. Live demo
  2. Install
  3. Parameters
  4. Keys and origins
  5. What residents see
  6. Payment
  7. Events
  8. Accessibility

Live demo

This is the widget, embedded on this page with the snippet below. Try any US address. To see it on a city site, open the demo city website: a full Planning & Zoning page with the widget installed in the city’s colours.

Install

  1. Get a key

    A city or county gets its key from its city account. A city email address is verified at once; otherwise we confirm the account by hand first, and the widget stays paused until then. A company serving several cities applies to the partner program and turns each city on from one console.

  2. Allow your domains

    The key lists the exact origins allowed to show the widget, such as https://www.yourcity.gov. Add staging and production.

  3. Paste the snippet

    Put it where the checker should appear. The script is optional: it fits the iframe’s height to its content. Without it, keep the fixed 560px height, which fits every state.

    Paste into any pagehtml
    <iframe data-buildability
      src="https://buildability.us/embed/checker?key=YOUR_KEY&city=Austin&state=TX"
      style="width:100%;border:0;height:560px"
      title="Buildability checker" allow="payment"></iframe>
    <!-- optional: fits the height -->
    <script src="https://buildability.us/embed.js" async></script>

No iframe at all

A city account also gets a hosted page at https://buildability.us/in/<your-id>: the same checker on its own page. Link to it from your navigation as “What can I build?”.

Parameters

Everything is a query parameter on the iframe src.

Embed URL anatomy
https://buildability.us/embed/checker
  ?key=YOUR_KEY      your partner key
  &city=Austin       the city residents are in
  &state=TX          two-letter state
  &accent=0b5cab     your brand colour, hex
  &lang=es           Spanish (or en)
ParameterRequiredWhat it does
keyYesYour partner key. Authorizes your origins and meters your quota. It’s publishable: it’s visible in your page source, and that’s fine.
cityNoShown in the widget, and added to bare street addresses so residents can type just “500 Main St”.
stateNoTwo-letter state, added with the city.
accentNoYour brand colour as a 3- or 6-digit hex, with or without # (URL-encode # as %23). Colours buttons, focus and links, darkened where needed so text meets WCAG AA contrast. Score colours are never themed.
langNoes opens in Spanish, en forces English. Without it the widget follows the browser language, and residents can switch in the header. Names and notes from official records keep their original wording.

Keys and origins

  • Origin allow-list. The widget is served with a frame-ancestors policy naming your key’s origins. A copied snippet on any other site won’t render. Without a valid key it renders only on buildability.us.
  • One quota per key. All traffic through your key shares one quota, across every page and visitor. Over quota, residents see “busy, try again in a minute”, not an error.
  • Paused is paused. A paused partner, or a city account not yet verified, gets the same treatment as no key.

What residents see

  • An address box with suggestions, and project chips: ADU, addition, garage or shed, fence, new home, split lot.
  • The Score, grade and a plain answer (“Likely yes”, “Maybe”, “Hard to build here”) with the sentence behind it, on the canonical score colours.
  • An answer for their project, and your city’s own next-step links and contact, set in the Partner Console.
  • “Powered by Buildability”. Co-branding is part of the deal.

A first lookup takes about 20 seconds while the sources answer, and the widget narrates them. Repeat lookups are instant.

Payment

Before payment, the widget shows the Score and two factors. A resident who wants the rest buys the full report for $99 without an account: checkout opens in a new tab, and the widget unlocks in place once payment goes through. The purchase lands on a claim page where the resident can attach it to an account. Keep allow="payment" on the iframe.

Events

The widget posts one message to its parent page, buildability:resize, with its content height in pixels. embed.js listens for it and sets the iframe’s height, clamped to 120–2000px. If you size the frame yourself, listen for it directly:

Listen for resizejs
window.addEventListener('message', (e) => {
  if (e.origin !== 'https://buildability.us') return;
  if (e.data?.type === 'buildability:resize') {
    console.log('widget height', e.data.height);
  }
});

There are no result or purchase events. Results stay inside the frame.

Accessibility

Government sites have to be accessible, so the widget is built for procurement review:

  • Full keyboard operation with visible focus.
  • Progress announced in a live region while checking, the full result announced politely, and errors announced as alerts.
  • AA contrast, including score colours used as text and any accent you set.
  • Respects prefers-reduced-motion.

Your part is one attribute: keep the title on the iframe. It names the widget to screen-reader users.

Didn’t find it? The Help Center answers account and billing questions, and Geo answers questions about a specific parcel inside the app.