# Unable to get more than 10,000 projects on sonarqube

**URL:** <https://community.sonarsource.com/t/unable-to-get-more-than-10-000-projects-on-sonarqube/88500>\
**Category:** SonarQube Server / Community Build\
**Tags:** api, web\_api, sonarqube, web-api\
**Created:** [April 3, 2023, 9:20am UTC](https://community.sonarsource.com/t/unable-to-get-more-than-10-000-projects-on-sonarqube/88500 "2023-04-03T09:20:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avivaloni](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@avivaloni](https://community.sonarsource.com/u/avivaloni)\
**Post date:** [April 3, 2023, 9:20am UTC](https://community.sonarsource.com/t/unable-to-get-more-than-10-000-projects-on-sonarqube/88500/1 "2023-04-03T09:20:19Z")

</div>

Hey everyone!  
I’m trying to fetch projects from sonarqube for an organization that owns more than 10,000 projects.  
The problem is when I’m trying to fetch more than 10,000 projects I’m getting the following error:  
‘Can return only the first 10000 results. 12500th result asked.’ with status code 400.  
I’m using this route (filter only projects): /api/components/search  
What can I do to get all projects?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 4, 2023, 12:06pm UTC](https://community.sonarsource.com/t/unable-to-get-more-than-10-000-projects-on-sonarqube/88500/2 "2023-04-04T12:06:12Z")

</div>

Hey there.

**GET api/components/search** is backed by Elasticsearch, so it’s not possible to get more than 10,000 results.

A user with global administration privileges can use **GET api/projects/search** which directly accesses the database and return more than 10,0000 projects.
