# Get tasks from multiple projects

**URL:** <https://forum.asana.com/t/get-tasks-from-multiple-projects/163088>\
**Category:** API & Developers\
**Tags:** projects, tasks\
**Created:** [28 April 2022 16:40 UTC](https://forum.asana.com/t/get-tasks-from-multiple-projects/163088 "2022-04-28T16:40:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon70948208](https://luna1.co/8d76cd.png) [@anon70948208](https://forum.asana.com/u/anon70948208)\
**Post date:** [28 April 2022 16:40 UTC](https://forum.asana.com/t/get-tasks-from-multiple-projects/163088/1 "2022-04-28T16:40:24Z")

</div>

I have a list of projects and am trying to get all their tasks. It is returning only a list of numbers. Do you know what the issue is? The code works when not in the loop

task\_list = {}  
for i in range(len(project\_list)):  
task\_list[i] = client.tasks.get\_tasks\_for\_project(project\_ba\_list[i], {‘param’: ‘value’, ‘param’: ‘value’},opt\_pretty=True)

list(task\_list)

---

<div class="post-metadata">

**Author:** ![Rashad\_Issa](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/rashad_issa/32/283198_2.png) [@Rashad\_Issa](https://forum.asana.com/u/Rashad_Issa)\
**Post date:** [28 April 2022 16:46 UTC](https://forum.asana.com/t/get-tasks-from-multiple-projects/163088/2 "2022-04-28T16:46:33Z")

</div>

Calling on the experts [@ambforumleader](https://forum.asana.com/groups/ambforumleader) can anyone help Tim?

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:** [28 April 2022 19:42 UTC](https://forum.asana.com/t/get-tasks-from-multiple-projects/163088/3 "2022-04-28T19:42:35Z")

</div>

What is “param”, “value” ? Don’t you use opt\_fields instead? I think you get only id+name in results because you don’t use the opt\_fields param.

---

<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:03 UTC](https://forum.asana.com/t/get-tasks-from-multiple-projects/163088/4 "2025-05-30T19:03:17Z")

</div>

Closed on 30 May 2025 19:03 UTC


