project内の全てのページ情報を取得するscript
そのとおりです

一度にfetchする量を制限したり、他のREST APIを使うなどの方法を取る必要があります
他のREST API
タイトルとリンクだけ取得するならこれで十分
全部取得するまで時間がかかる
projectの全てのデータを一度に取得できる
load.jsasync function loadAllPages(project) {
// projectの全ページ数を取得する
const pageNum = await fetch(`/api/pages/${project}/?limit=1`)
.then(response => response.json())
.then(json => parseInt(json.count));
const maxIndex = Math.floor(pageNum / 1000) + 1;
const result = [];
const promises = [...Array(maxIndex)].map(async (_, index) => {
const json = await fetch(`/api/pages/${project}/?limit=1000&skip=${index*1000}`)
.then(res => res.json());
const pages = json.pages;
pages.forEach(page =>
result.push({
project: project,
title: page.title,
image: page.image,
descriptions: page.descriptions,
}));
});
await Promise.all(result);
return result;
}