# Browsing posts limited to 100 with GhostContentAPI

**URL:** <https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490>\
**Category:** Integrations & API\
**Created:** [October 16, 2025, 4:17pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490 "2025-10-16T16:17:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBauszus](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dbauszus/32/8335_2.png) [@DBauszus](https://forum.ghost.org/u/DBauszus)\
**Post date:** [October 16, 2025, 4:17pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/1 "2025-10-16T16:17:04Z")

</div>

We are using the ghostContentAPI to browse our Ghost [pro] hosted posts to include in our static build site with eleventy.

We have no more than a hundred posts but cannot browse them all.

The posts returned from the api.posts.browse method are always limited to 100.

```auto
const api = new ghostContentAPI({
	url: process.env.GHOST_API_URL,
	key: process.env.GHOST_CONTENT_API_KEY,
	version: "v6.0",
});

const posts = await api.posts.browse({
	include: "tags,authors",
	limit: "all",
})

console.log(posts.length)

```

Is there a way around this limit?

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [October 16, 2025, 4:35pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/2 "2025-10-16T16:35:46Z")

</div>

`limit=all` has been removed in Ghost 6:

> **[Breaking Changes - Ghost Developer Docs](https://docs.ghost.org/changes#return-max-100-results-from-apis-removing-%3Flimit%3Dall-support)**
>
> A catalog of critical changes between major Ghost versions

If you have under 100 posts you should still get all your posts back from the API (not quite sure from how you described it).

If you have over 100 posts you’ll need to query through them.

---

<div class="post-metadata">

**Author:** ![DBauszus](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dbauszus/32/8335_2.png) [@DBauszus](https://forum.ghost.org/u/DBauszus)\
**Post date:** [October 16, 2025, 4:56pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/3 "2025-10-16T16:56:16Z")

</div>

We do have more than a 100 posts.

How can we query through them with pagination?

The docs don’t really provide much information in this regard.

> To fetch more than 100 items, pagination should be used, being mindful to build in small delays so as not to trigger any rate limits or fair usage policies of your hosts.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 16, 2025, 5:38pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/4 "2025-10-16T17:38:41Z")

</div>

You’ll need to make multiple requests. The content API takes a page argument. 🙂 Some examples here: [Content API JavaScript Client - Ghost Developer Docs](https://docs.ghost.org/content-api/javascript)

---

<div class="post-metadata">

**Author:** ![ashishkumar](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ashishkumar/32/37397_2.png) [@ashishkumar](https://forum.ghost.org/u/ashishkumar)\
**Post date:** [October 16, 2025, 6:23pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/5 "2025-10-16T18:23:23Z")

</div>

There is a wacky way around this restriction if you can modify your config file, or set an environment variable. Could only be applicable to self-hosted websites…

```json
// config.production.json

{
  // "…"

  "optimization": {
    "allowLimitAll": true
  }
}

```

```sh
# .env

optimization__allowLimitAll=true

```

Source: [Ghost/ghost/core/core/shared/max-limit-cap.js at main · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/blob/main/ghost/core/core/shared/max-limit-cap.js)

---

<div class="post-metadata">

**Author:** ![DBauszus](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/dbauszus/32/8335_2.png) [@DBauszus](https://forum.ghost.org/u/DBauszus)\
**Post date:** [October 16, 2025, 6:23pm UTC](https://forum.ghost.org/t/browsing-posts-limited-to-100-with-ghostcontentapi/60490/6 "2025-10-16T18:23:32Z")

</div>

Thanks. I was able to work it out.

This snippet maybe helpful for others who hit the same issue.

```javascript
	let page = 1

	let limit = 15;

	let posts = await api.posts
		.browse({
			include: "tags,authors",
			page,
			limit,
		})
		.catch((err) => {
			console.error(err);
		});

	page = posts.meta.pagination.next;

	let pages = posts.meta.pagination.pages;

	while (page < pages) {

		const morePosts = await api.posts
			.browse({
				include: "tags,authors",
				page,
				limit,
			})
			.catch((err) => {
				console.error(err);
			});

		//console.log(morePosts.meta)

		posts = posts.concat(morePosts)

		page = morePosts.meta.pagination.next;
	}

```
