getting maximum 30 files only in "Get pull request files" api

I am trying to get all the files assosiated with a pull request.

I am getting successful result, but number of files is limited to 30 only while in documentation I can see that it allows maximum 300.

Please guide me for the same.


Using the below url you can get the desired number of data set.

GitHub has pagination and by default, the result set is 30 only. Either you can traverse through pages or increase the per_page parameter. If you want to traverse through pagination you will have a Link key in the header response and based on that you can traverse through the pages.