# @tryghost/content-api / Nuxt 3

**URL:** <https://forum.ghost.org/t/tryghost-content-api-nuxt-3/56495>\
**Category:** Self-hosting\
**Created:** [March 31, 2025, 5:00pm UTC](https://forum.ghost.org/t/tryghost-content-api-nuxt-3/56495 "2025-03-31T17:00:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [March 31, 2025, 5:00pm UTC](https://forum.ghost.org/t/tryghost-content-api-nuxt-3/56495/1 "2025-03-31T17:00:38Z")

</div>

I followed this tutorial:  
[https://ghost.org/docs/jamstack/nuxt/](https://ghost.org/docs/jamstack/nuxt/)

It only works when I set `ssr = false` in the `nuxt.config.ts`  
or use `<ClientOnly><h1>{{ post.title }}</h1><ClientOnly>`

If not, there an error message from AXIOS:

```auto
There is no suitable adapter to dispatch the request since :
- adapter xhr is not supported by the environment
- adapter http is not available in the build

```

**Why does the GhostContentAPI only work on the client side?**

I have discovered similar error messages  
[tryghost-content-api-is-not-working-on-next-v14](https://forum.ghost.org/t/tryghost-content-api-is-not-working-on-next-v14/47470)  
[i-cant-use-local-ghost-content-api](https://forum.ghost.org/t/i-cant-use-local-ghost-content-ap/42502/12)  
But is not for NUXT.

Thanks for help, Joe

---

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [March 31, 2025, 5:41pm UTC](https://forum.ghost.org/t/tryghost-content-api-nuxt-3/56495/2 "2025-03-31T17:41:46Z")

</div>

I have found a solution - using fetch instead of axios:  
[alyatwa](https://forum.ghost.org/u/alyatwa/summary), thank you.

> [@I Can't use local Ghost Content Ap](https://forum.ghost.org/t/i-cant-use-local-ghost-content-ap/42502/12):
>
> just add data to return json const api = new GhostContentAPI({ url: "https://ali-atwa.digitalpress.blog", key: "bef5171833fd701e51903f181e", // @ts-ignore makeRequest: ({ url, method, params, headers }) =\> { const apiUrl = new URL(url); // @ts-ignore Object.keys(params).map((key) =\> apiUrl.searchParams.set(key, encodeURIComponent(params[key])) ); return fetch(apiUrl.toString(), { method, headers }) .then(async (res) =\> { // Check if the response was successful. if (…

---

<div class="post-metadata">

**Author:** ![joe-blocher](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joe-blocher/32/27872_2.png) [@joe-blocher](https://forum.ghost.org/u/joe-blocher)\
**Post date:** [March 31, 2025, 6:52pm UTC](https://forum.ghost.org/t/tryghost-content-api-nuxt-3/56495/3 "2025-03-31T18:52:41Z")

</div>

The solution didn’t work perfect:

```auto
await ghostApi.pages
        .browse({
            limit: "all",
            include: "tags,authors" <----- don't work
        })

```

You have to remove `encodeURIComponent`:

```auto
 makeRequest: ({url, method, params, headers}) => {
        const apiUrl = new URL(url);
        Object.keys(params).map((key) =>
            // apiUrl.searchParams.set(key, encodeURIComponent(params[key]))
            apiUrl.searchParams.set(key, params[key])
        );
 ...

```

And then it works 🙂
