# Fetch Fresh data from Builder using sdk after Builder content is updated

**URL:** <https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703>\
**Category:** Technical Questions\
**Tags:** nextjs\
**Created:** [May 30, 2024, 10:11am UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703 "2024-05-30T10:11:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehal](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@nehal](https://forum.builder.io/u/nehal)\
**Post date:** [May 30, 2024, 10:11am UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703/1 "2024-05-30T10:11:12Z")

</div>

> **[Builder.io: Visual Development Platform](https://builder.io/content/ddddf032e095470d9c82cfe053415259)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

Hi,  
I am currently using the fetchOneEntry function from the @builder.io/sdk-react-nextjs package to retrieve data from a specific model in Builder content. However, I am encountering a couple of issues when updating the content.

1. When I update the content in Builder, the function does not return the updated data until after three function calls. Despite using all available options to disable the cache, the problem persists.

const builderResponse: any = await fetchOneEntry({  
model: “model-name”,  
apiKey: BUILDER\_KEY,  
staleCacheSeconds: 0,  
cacheSeconds: 0, limit: 1,  
sort: { createdDate: -1 },  
});  
Note: The cachebust option was not available in this function.

This behavior is causing issues with displaying the latest data on my home page, as I am using Next.js static site generation. I revalidate the page whenever there is an update in the Builder content to rebuild the page and show the latest data. However, due to Builder’s caching behavior, I receive the cached data instead of the updated data on the first build.  
Is there a way to ensure that fresh data is available on the first call itself immediately after the content is updated in Builder instead of the old cached data.

I have also tried using the builder.get() method from the @builder.io/sdk package to fetch the latest data after content is updated,  
const builderResponse = await builder.get(“model-name”, {  
limit: 1,  
sort: { createdDate: -1 },  
cachebust: true,  
cacheSeconds: 0,  
});  
However, I encountered the same issue where the updated data is only received on the second call.

1. I also wanted to understand the stability and support for @builder.io/sdk-react-nextjs since its currently in beta

Thank you.

NextJS, react

---

<div class="post-metadata">

**Author:** ![JuliusGD](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/juliusgd/32/2523_2.png) [@JuliusGD](https://forum.builder.io/u/JuliusGD)\
**Post date:** [June 14, 2024, 3:42pm UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703/2 "2024-06-14T15:42:09Z")

</div>

Hello Nehal,

Would you be able to share the implementation code? I may be able to provide better guidance if I can see how the function is being used in your pages.tsx file or equivalent.

---

<div class="post-metadata">

**Author:** ![RadisLuo](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RadisLuo](https://forum.builder.io/u/RadisLuo)\
**Post date:** [October 8, 2024, 6:15am UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703/3 "2024-10-08T06:15:31Z")

</div>

> [@What are the rules for counting Visual Views?](https://forum.builder.io/t/what-are-the-rules-for-counting-visual-views/6488/3):
>
> I’m currently facing an issue with using SSG. Due to caching, the page doesn’t get updated immediately after publishing. It may require a hard reload or some waiting time. How can I ensure the page gets updated every time after publishing? PS: It seems that requesting fetchOneEntry with options: { cachebust: true, noCache: true } can fetch the latest version, but this would increase the load on the Visual View.

Do you have a good solution for a similar problem I encountered?

---

<div class="post-metadata">

**Author:** ![hammad01](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@hammad01](https://forum.builder.io/u/hammad01)\
**Post date:** [November 28, 2024, 11:46am UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703/4 "2024-11-28T11:46:11Z")

</div>

I have encountering the same issue from the past couple of days the only way I am getting refreshed data by restarting the server or deleted the cache and cookies but yes this is not the solution. The issue might be from their own end something needs to be fix

---

<div class="post-metadata">

**Author:** ![arj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/arj/32/5039_2.png) [@arj](https://forum.builder.io/u/arj)\
**Post date:** [June 8, 2025, 3:04pm UTC](https://forum.builder.io/t/fetch-fresh-data-from-builder-using-sdk-after-builder-content-is-updated/5703/5 "2025-06-08T15:04:18Z")

</div>

Hi Nehal,

Instead of using fetchOneEntry you could try with this

const contentUrl = `https://cdn.builder.io/api/v2/content/${model}?apiKey=${PUBLIC_API_KEY}&query.id=${entryId}&limit=1&includeUnpublished=true&cachebust=true&ts=${Date.now()}`;

You should get the latest change with this.

Thank you,
