> ## Content Index
> Fetch the complete content index at: https://reactpractice.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Build a Github repositories search page with sorting and pagination
- URL: https://reactpractice.dev/exercise/build-a-github-repositories-search-page-with-sorting-and-pagination/
- Published: 2025-03-12T20:47:24.000Z
- Updated: 2026-08-18T11:07:31.000Z
- Author: Corina Udrescu
- Tags: Data fetching, #corina-2, Exercises, Phase 1 - STARTER, #Import 2026-06-09 12:07

Build a Github Repositories **search page**, with **sorting and pagination**.  
You can use the Github REST API [/search/repository endpoint](https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28&ref=reactpractice.dev#search-repositories) to query the data.  
The results should be paginated; by default, show 10 repositories per page

Users should be able to:

- search repositories by name
- choose how many items to show per page
- choose what to sort by: best match, stars, recently updated

You can use [React Query](https://tanstack.com/query/v5/docs/framework/react/quick-start?ref=reactpractice.dev) for fetching the data.  
If you hit the rate limit, you can work with a mock JSON file of the data in development, or alternatively, setup an API key to [increase your rate limit](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28&ref=reactpractice.dev#primary-rate-limit-for-authenticated-users).

The search is inspired by this Github page: [https://github.com/search?q=nextjs&type=repositories&s=&o=desc](https://github.com/search?q=nextjs&type=repositories&s=&o=desc&ref=reactpractice.dev)

💡 Ready to check your work?  
Become a member and get access to the ****official solution** and the comments section for ****feedback and discussion**.  
  
Also, for a limited time, you will also get a ****code review** when you share a link to your completed challenge in the comments section!

[Learn more about the membership ](https://reactpractice.dev/become-a-member/)