REST API populate with pagination


I have categories endpoint and they’re linked with articles. On our homepage I want to show the last 10 articles from each category.
However, I cannot get the pagination to work with populate.

Here’s the endpoint

I’m also attaching the code (might be easier to understand). It’s parsed with qs.stringify qs.stringify(urlParamsObject, { encodeValuesOnly: true })

    fetchAPI("/categories", {
      populate: {
        articles: {
          populate: {
            image: "*",
          fields: ["title", "description"],
          pagination: {
            pageSize: 1,
          sort: ["createdAt:desc"],
        svg: {
          populate: "*",
      filters: {
        site: {
          id: siteId,

Does anyone know where the problem is?

Thank you very much!

Were you able to get this working? I am wondering the same thing

AFAIK this is not supported - the API always returns all related entities.

Maybe you could work around this using multiple requests where you first fetch all your Categories and then you fetch 10 articles for each. Roughly like this:

const categories = await request("/api/categories?pagination[pageSize]=999")

const articlesPerCategory = Promise.all( => {
  return request(`/api/articles?filters[category]=${}?pagination[pageSize]=10`)

Not the most performant solution tough. ./