> For the complete documentation index, see [llms.txt](https://docs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akinon.com/technical-guides/project-zero/next.js/plugins/akinon-next/data-fetching/server/flat-page.md).

# Flat Page

## <mark style="color:red;">getFlatPageData</mark> <a href="#getflatpagedata" id="getflatpagedata"></a>

This function is used to fetch flat page data created in Omnitron.

The **getFlatPageData** function is imported from `'@akinon/next/data/server'`.

```javascript
import { getFlatPageData } from '@akinon/next/data/server';
```

The flat page data is fetched by defining this function as `const data = await getFlatPageData({ pk });`.

* `pk`: The pk of the desired flat page to be fetched. This parameter is mandatory and should be of type Number.

Data returned from the function:

```json
{
    "pk": 3,
    "flat_page": {
        "pk": 3,
        "url": "/blog",
        "title": "Blog",
        "content": "<h1>Top Ramadan 2022 Outfits &amp; Fashion Ideas</h1><p>The holy month of Ramadan is a month of spirituality, sharing and giving back in its essence. It comes with a lot of discipline, commitment and also a lot of preparation ahead. With the dedication to prayer and fasting of the day, also come the Iftar gathering, nighttime Suhoor and catching up with family, relatives and friends over all the celebrations that Ramadan brings.</p><p>While cherishing the holy month, the dress code is at the top of the list of preparations. Dressing respectfully while looking fashionable will require some dress code alteration going well along with the holy month’s spirit, culture and tradition. We thought of showing you ways that women, men and kids can dress in this holy month with Ramadan staple styles and statement pieces for fashionable and modest&nbsp;<strong>Ramadan outfit ideas</strong>&nbsp;and looks.</p>",
        "template_name": "flatpages/about-us/index.html",
        "registration_required": false,
        "sites": [
            1
        ],
        "flatpageprettyurl_set": [],
        "type": null
    },
    "type": null
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.akinon.com/technical-guides/project-zero/next.js/plugins/akinon-next/data-fetching/server/flat-page.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
