Empty meta object when using entitiyService API

System Information
  • Strapi Version: 4.2.3
  • Operating System: Mac OS 12.4
  • Database: mysql
  • Node Version: 16.13.0
  • NPM Version: 8.1.0
  • Yarn Version: 1.22.19

I am using the strapi entityService to add more filter to my query. They are based on some user details.
Everything works as expected but unfortunately the meta object remains empty. There are no information about pagination available.

Is this the desired outcome? Is there anything missing in my controller’s code?

controller find method

async find(ctx) {
        const userId = ctx.state.user.id
        const { query } = ctx;

        var queryCopy = { ...query }
        queryCopy.start = query.pagination.page
        queryCopy.limit = query.pagination.pageSize
        queryCopy.filters.standort = {}
        queryCopy.filters.standort.id = {}
        queryCopy.filters.standort.id.$eq = 1;

        const entity = await strapi.entityService.findMany('api::fahrzeug.fahrzeug', queryCopy);
        const sanitizedEntity = await this.sanitizeOutput(entity, ctx);

        return this.transformResponse(sanitizedEntity);



How can I generate the normal api output with the included pagination object?

Thanks for your help.


i encounter the same issue, did you solve this problem ?


I had the same issue but i used findPage instead of findMany.

findPage return a pagination object and accept the same parameters as findMany.

I hope it helps :slight_smile:

findPage brings the meta data however I cannot do any pagination.
I am in urgent need of this solution.
Cant get meta data from entityService.findMany and entityService.findPage ignores start and limit properties.
help please.

1 Like

findMany and findPage, don’t accept exactly the same parameters for pagination purpose.

  • findMany needs “start” and “limit”
  • findPage needs “page” and “pageSize”


const { results, pagination } = await strapi.entityService.findPage(
              filters: {
                user: userId,

So we get meta data and paginated result.

After many try in order to figure out how It work the logic of controllers (sanitized function, transforResponse function) I’ve noticed that:

  • with findMany and the parameters “start” and “limit” I get the response filtered, but I didn’t get the meta object.
  • with findPage and the parameters “page” and “pageSize” I get the response filtered with the meta object.

p.s. Is there any documentation of findPage function?

from my understanding and I could be wrong but findPage is something used internally by strapi.For the admin interface. To me more specific it is used to show relationships. Since it is not documented it is not a stable feature and can change at any time and would not be seen as a breaking change. that is also the reason why there is no documentation about it since you are not supposed to use it. so use it at your own risk and at least write a test to check if the endpoint gives the output you expect.

1 Like

thank you for the answer :slight_smile:
I think you right, but at this point I think that entityService API has missing the meta object in the response.

Were you able to find a solution? I’m also experiencing the same problem and really need a meta object with my response.

Again like my post above said findPage will give you the metadata with the other infromation if you do that on the enterty service layer