Incorrect GitHub API's behavior

Hi, I’ve been developing my own mobile application with GitHub API usage and I faced an interesting bug in GitHub API. I have a repository list screen with a pagination feature in my app, so I load repositories by pages. The issue is that I have duplicated repositories in response. It reproduces differently, the duplicated repository may come on whether the second or the ninth page, for example. I don’t know if this issue has explained here before, so I decided to create my own topic.

There is an example in the following code snippets:

https://api.github.com/search/repositories?q=repo&sort=stars&order=desc&page=8&per_page=15

{
		"id": 29996513,
		"node_id": "MDEwOlJlcG9zaXRvcnkyOTk5NjUxMw==",
		"name": "Home",
		"full_name": "NuGet/Home",
		"private": false,
		"html_url": "https://github.com/NuGet/Home",
		"description": "Repo for NuGet Client issues",
		...
	}
https://api.github.com/search/repositories?q=repo&sort=stars&order=desc&page=9&per_page=15

{
		"id": 29996513,
		"node_id": "MDEwOlJlcG9zaXRvcnkyOTk5NjUxMw==",
		"name": "Home",
		"full_name": "NuGet/Home",
		"private": false,
		"html_url": "https://github.com/NuGet/Home",
		"description": "Repo for NuGet Client issues",
		...
	}

:wave:Welcome to the GitHub Support Community, @alexsyn02!

Some queries are computationally expensive for our search infrastructure to execute. To keep search fast for everyone, we limit how long any individual query can run. In rare situations when a query exceeds the time limit, search returns all matches that were found prior to the timeout and informs you that a timeout occurred.

Reaching a timeout does not necessarily mean that search results are incomplete. It just means that the query was discontinued before it searched through all possible data.

:memo: Our team wrote about this here: Troubleshooting Search Queries––Potential timeouts.

Given this reality, these timeouts may cause inconsistencies while paging through the results. We see how this could be improved in future iterations of search, and you’re welcome to share additional feedback with our product team by submitting a new inquiry through our official product feedback form so they can track that request. That’s the best place to share requests like these in consideration for future iterations of GitHub features.