API to retrieve all commits of a push in paginated format

I have a webhook configured to receive push events for my repository. But this push notification limits the number of commits to 20. I want to retrieve all commits that were part of the push and I need the data in the paginated format for scalability.
I know that there is a repository compare API, where we can pass the from and to commits sha (by taking before and after from push event), but this API is not returning response in paginated format.

I expected repository/compare API to return a paginated response.

I am using gitlab.com