# Getting 504 error while using 'GET PROJECTS' API

**URL:** <https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443>\
**Category:** API & Developers\
**Tags:** error, projects\
**Created:** [14 July 2023 14:12 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443 "2023-07-14T14:12:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish4](https://luna1.co/8d76cd.png) [@Manish4](https://forum.asana.com/u/Manish4)\
**Post date:** [14 July 2023 14:12 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/1 "2023-07-14T14:12:11Z")

</div>

Hi,

We are getting 504 gateway timeout status code while using the ‘GET PROJECTS’ API of Asana. Below is the link of the API.

> **[Get multiple projects](https://developers.asana.com/reference/getprojects)**
>
> Returns the compact project records for some filtered set of projects. Use one or more of the parameters provided to filter the projects returned.Note: This endpoint may timeout for large domains. Try filtering by team!

We are getting below error from the server  
Server timed out with your request. Try paginating if you aren’t already doing so or call GET /teams/:team/projects instead, to reduce the scope of the request.  
We are able to use the other APIs of the Asana but getting error while using the ‘GET PROJECTS’ API.  
Any Solutions?

Thanks.

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [14 July 2023 15:03 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/2 "2023-07-14T15:03:10Z")

</div>

In our app, some of our customers with tons of projects have the same issue.

We had to change our approach, we call the “typeahead” api to get the 100 project with most potential to be used.

> **[Get objects via typeahead](https://developers.asana.com/reference/typeaheadforworkspace)**
>
> Retrieves objects in the workspace based via an auto-completion/typeaheadsearch algorithm. This feature is meant to provide results quickly, so donot rely on this API to provide extremely accurate search results. Theresult set is limited to a single...

But we are still unable to retrieve all projects for these accounts.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [15 July 2023 05:09 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/3 "2023-07-15T05:09:46Z")

</div>

@Manish4 and @Frederic_Malenfant, you’re getting this error even if you’re doing pagination?

Also, there is a hard limit of something like 50,000 elements returned for an org even if using pagination, though I can’t find the reference to it at the moment. Could it be this?

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [15 July 2023 13:51 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/4 "2023-07-15T13:51:16Z")

</div>

Hi @Phil_Seeman ,

Yes, we can’t get the first page even if I set limit to 10. It waits very long time, then timeout.

I searched in my archived, I found a private message with @Ross_Grambo in 2020 about it, they know the issue, looks like they never fixed it.  
But one of the suggestion he told me is to query projects by team, instead of all projects.  
/team/xxx/projects.

So, we offer both in our app, the first 100-200 projects being sent by typeahead, but the users can also search by team, and that is working.

Typeahead is great because the returned projects are based on the user recent actions in asana, so there’s a good chance that the project you try to reach is on that list.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [15 July 2023 18:40 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/5 "2023-07-15T18:40:11Z")

</div>

> [@Frederic\_Malenfant](#):
>
> one of the suggestion he told me is to query projects by team, instead of all projects.

Ah, yes, I remember that discussion now!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:01 UTC](https://forum.asana.com/t/getting-504-error-while-using-get-projects-api/480443/6 "2025-05-30T19:01:59Z")

</div>

Closed on 30 May 2025 19:01 UTC


