Jorn
Jorn

Reputation: 272

How to get only 15 repositories from GitHub API?

As my title stays, how to get only a limited number of repositories from the public API? I'm using the following link:

https://api.github.com/repositories //Gets 100

To get first the 100 repositories but I only need to get 15. This what I tried:

https://api.github.com/repositories?per_page=15 //Gets 100

It seems that adding per_page=10 doesn't work at all. I have also tried:

https://api.github.com/repositories?since=369&per_page=15

Without any luck. Can anyone help me with that?

Upvotes: 1

Views: 276

Answers (1)

J.Gerbershagen
J.Gerbershagen

Reputation: 316

GitHub Api doc says: Note: Pagination is powered exclusively by the since parameter. see https://developer.github.com/v3/repos/#list-all-public-repositories

The per_page parameter is not supported.

Upvotes: 3

Related Questions