Buider.get model return empty array

Hi,
I created a model page and one content page of this model and I’m trying to get the content page in vite+react but it’s returning an empty array.

Here is my model and page:

Here is my code:

Here is query param in the request:
image

Please help me find the problem. I’ve searched many topics but haven’t found a solution.

Hello @Qhyn,

Welcome to the builder.io forum post.
Regrettably, we are unable to replicate the error on our end. Please ensure that you are using the correct builder API key.→ Follow this link for instructions on finding your API key

import { useEffect, useState } from "react";
import { BuilderComponent, builder, useIsPreviewing } from "@builder.io/react";
import './App.css'
// Put your API key here
builder.init("Your API Key");

// set whether you're using the Visual Editor,
// whether there are changes,
// and render the content if found
export default function CatchAllRoute() {
  const isPreviewingInBuilder = useIsPreviewing();
  const [notFound, setNotFound] = useState(false);
  const [content, setContent] = useState(null);

  // get the page content from Builder
  useEffect(() => {
    async function fetchContent() {
      const content = await builder
        .get("page", {
          url: window.location.pathname
        })
        .promise();

      setContent(content);
      setNotFound(!content);

      // if the page title is found, 
      // set the document title
      if (content?.data.title) {
      document.title = content.data.title
      }
    }
    fetchContent();
  }, [window.location.pathname]);
  
  // If no page is found, return 
  // a 404 page from your code.
  // The following hypothetical 
  // <FourOhFour> is placeholder.
  if (notFound && !isPreviewingInBuilder) {
    return <h2>404....</h2>
  }

  // return the page when found
  return (
    <>
      {/* Render the Builder page */}
      <BuilderComponent model="page" content={content} />
    </>
  );
}

Hope this helps!

Thanks,