# How can we get draft pages from builder.io in next js app

**URL:** <https://forum.builder.io/t/how-can-we-get-draft-pages-from-builder-io-in-next-js-app/2525>\
**Category:** Technical Questions\
**Tags:** nextjs\
**Created:** [August 26, 2022, 7:44am UTC](https://forum.builder.io/t/how-can-we-get-draft-pages-from-builder-io-in-next-js-app/2525 "2022-08-26T07:44:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [August 26, 2022, 3:34pm UTC](https://forum.builder.io/t/how-can-we-get-draft-pages-from-builder-io-in-next-js-app/2525/2 "2022-08-26T15:34:43Z")

</div>

Hi @olivela,

Thanks for reaching out.

Yes, you can get the latest draft from the API, it requires knowing the content ID, so you’d make an extra API Call to get the latest draft, something like:

```auto
import { builder } from "@builder.io/react" // or `@builder.io/sdk`

builder.init(process.env.BUILDER_API_KEY)
export async function resolveBuilderContent(modelName: string, userAttributes: Record<string, string | number>, loadLatestDraft = false) {
  let page = await builder.get(modelName, { userAttributes }).toPromise();
  if (page && loadLatestDraft) {
      page = await fetch(`https://builder.io/api/v2/content/${modelName}/${page.id}?apiKey=${apiKey}&preview=true&noCache=true&cachebust=true`).then(res => res.json())
  }

  return page;
}

```

To know more you can visit our forum post [API parameter to include not yet live content](https://forum.builder.io/t/api-parameter-to-include-not-yet-live-content/361).

Let us know if you have any further questions. Thank you!

---

_[View the full topic](https://forum.builder.io/t/how-can-we-get-draft-pages-from-builder-io-in-next-js-app/2525)._
