GitHub API Search Request to get Trending Repos

Hi,

I am using the GitHub Search API to get a list of repos matching criterias like development language and sort for stars. This works well and I get the results expected.

The request URL is: https://api.github.com/search/repositories?q=language:swift+sort:stars

But what I would appreciate a lot is to make a request to the GitHub API that return me the same results like this wonderful site here (your GitHub Trending Repos site): https://github.com/trending/swift?since=monthly&spoken_language_code=

Can you please help me and tell me how should I change the used URL in my application to get this result?
As far as I understood on this Trending page there are repositories that earn the most stars in the month.

The solution is used in a iOS Swift project.

1 Like

Hey! Sorry for the delay on getting you an answer for this. It seems as though there is no official API for this (trending is one of the internal GitHub API’s). You can find 3rd part unofficial “API’s” that scrape the info from that trending section but I am not sure how good they of a job they do.