Docs menu

    Docs / Reference

    Pagination: Following @odata.nextLink

    How large results come back in pages, and how to read them all safely.

    When more records match than one page holds, the answer carries @odata.nextLink, the full address of the next page. The RESO Web API Core specification requires servers to support this server-driven paging. Follow the link until it no longer appears, sending your Authorization header each time.

    Reading every page

    Loop until the answer has no @odata.nextLink. This JavaScript runs in server code.

    JavaScript
    async function getAll(firstUrl) {
      const headers = { Authorization: `Bearer ${process.env.SAIGE_MLS_API_KEY}`, Accept: "application/json" };
      const records = [];
      let url = firstUrl;
      while (url) {
        const res = await fetch(url, { headers });
        if (!res.ok) throw new Error(`MLS API ${res.status}`);
        const page = await res.json();
        records.push(...page.value);
        url = page["@odata.nextLink"];
      }
      return records;
    }

    Pages on a search page

    A search page shows one page at a time: 24 results and a Show more button. Keep the nextLink from the last answer on your server or in the visitor's session, and request it when Show more is pressed.

    Sort with a field that does not change between requests, plus ListingKey as a tie breaker, for example $orderby=OnMarketDate desc,ListingKey desc.

    Reading a large set

    To copy many records, such as every active listing in an area, follow nextLink in a loop and pause between pages if the server answers 429. The page Keep a Saved Copy of Listings Up to Date shows how to update the copy after that with only the records that changed.

    Common questions

    How do I know I reached the last page?

    The answer has no @odata.nextLink.

    Can I build the next page with $skip instead?

    For short pages, yes. For long sets, follow @odata.nextLink, because each provider decides how far $skip may go.

    Do I send my key with the nextLink?

    Yes. Send the Authorization header on every request.

    Why do I see the same listing on two pages?

    The sort order is not steady. Add ListingKey as the last $orderby field.

    How big is each page?

    The server decides the largest page. Use $top for the size your page shows.

    What should I do on a 429 while paging?

    Wait, then retry the same nextLink. Read the Retry-After header if the answer has one.

    Can the nextLink expire?

    Use it soon after you receive it. If it fails, start again from the first request.

    Does @odata.count change between pages?

    It counts matches at the time of the request. New and removed listings can change it.

    Specifications

    Last reviewed 2026-11-20

    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