Framer set up

    Store Your MLS API Key in Framer

    Where Framer keeps secrets, how a small proxy server reads the key, and how to check it never reaches the page.

    Part of the Framer MLS API Integration guide · Last reviewed 2026-11-20

    Storing an MLS API key in Framer secrets

    With Framer, the key goes into the proxy's host, outside Framer. On Cloudflare Workers, run npx wrangler secret put SAIGE_MLS_API_KEY and paste the key when asked, then the same for SAIGE_MLS_API_URL. The Worker reads both from its environment. The Framer site only knows the proxy's address, which returns listings without exposing the key.

    Key takeaways

    • Secrets live with the proxy, never in Framer.
    • Cloudflare Workers: npx wrangler secret put SAIGE_MLS_API_KEY.
    • The proxy returns public listing fields only.
    • The proxy allows only your Framer domain.

    Need the data feed for this? Saige is an approved MLS data vendor in BC. Send a request and our team will contact you.

    Where Framer keeps secrets

    Framer has no place for server-side secrets that its pages can use. So the key lives where the server code lives: the proxy.

    • Create a Cloudflare Worker (or a Supabase Edge Function) for the proxy.
    • Run npx wrangler secret put SAIGE_MLS_API_KEY and paste the key.
    • Run npx wrangler secret put SAIGE_MLS_API_URL and paste the feed address.
    • Deploy the Worker and note its address for Framer.

    Reading the key in a small proxy server

    The Worker below reads both secrets, asks the feed for active Kitsilano listings with a fixed list of public fields, and allows only your Framer domain to read the answer. Change the domain and the area before deploying.

    Cloudflare Worker proxy for Framer
    // A Cloudflare Worker that holds the key and returns public listing fields.
    // Secrets set with: npx wrangler secret put SAIGE_MLS_API_KEY (and SAIGE_MLS_API_URL)
    const ALLOWED_ORIGIN = "https://www.your-framer-site.com";
    const FIELDS = "ListingKey,ListPrice,BedroomsTotal,BathroomsTotalInteger,LivingArea,UnparsedAddress,MLSAreaMinor,ListOfficeName";
    
    export default {
      async fetch(request, env) {
        const url = new URL(request.url);
        const top = Math.min(Number(url.searchParams.get("top")) || 12, 24);
        const filter = "StandardStatus eq 'Active' and MLSAreaMinor eq 'Kitsilano'";
        const feed = `${env.SAIGE_MLS_API_URL}/Property?$filter=${encodeURIComponent(filter)}&$select=${FIELDS}&$top=${top}`;
        const res = await fetch(feed, { headers: { Authorization: `Bearer ${env.SAIGE_MLS_API_KEY}` } });
        return new Response(await res.text(), {
          headers: {
            "Content-Type": "application/json",
            "Access-Control-Allow-Origin": ALLOWED_ORIGIN,
          },
        });
      },
    };

    Check before you publish

    Open the published Framer site, view the page source, and search for the first characters of your key. It must not be there. Then use the search page with the browser's network panel open: requests should go to your own server code, not straight to the feed address. The full check list is at Keep Your MLS API Key Secret on an AI-Built Site.

    Frequently asked questions

    Why fix the filter in the proxy?

    If the proxy passed any filter through, anyone could use it to pull the whole feed. Fixing the area and fields limits it to what the site shows.

    Can anyone call the proxy address?

    Browsers on other domains are blocked by the allowed-origin header, but scripts can still call it. That is why it returns only the public fields the site already shows.

    Related pages in this guide

    Sources

    Every claim on this page that could be checked against a primary source is linked below. Where something is not publicly documented by a vendor, the page says so rather than filling the gap with an estimate.

    MLS API for BC

    Put live MLS listings on the site you are building

    Saige is an approved MLS data vendor for Greater Vancouver REALTORS, Fraser Valley Real Estate Board, Chilliwack and District Real Estate Board and BC Northern Real Estate Board. Send a request and our team will contact you to check what your board allows and how to connect your builder.

    Call 604.401.4849