# Getting data from subtasks via the API

**URL:** <https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404>\
**Category:** API & Developers\
**Tags:** subtasks\
**Created:** [18 June 2018 20:55 UTC](https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404 "2018-06-18T20:55:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raphael\_Baysa](https://luna1.co/8d76cd.png) [@Raphael\_Baysa](https://forum.asana.com/u/Raphael_Baysa)\
**Post date:** [18 June 2018 20:55 UTC](https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404/1 "2018-06-18T20:55:39Z")

</div>

I’m trying to get the due dates from subtasks through the api, but when I do, all they do is return the ID, and the name of the task. I was wondering if there is a way to get all the data from the subtask whether it be subtasks of that subtask or due date or comments. I am currently using Asana python to query, and create tasks.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Joe\_Trollo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/joe_trollo/32/4025_2.png) [@Joe\_Trollo](https://forum.asana.com/u/Joe_Trollo)\
**Post date:** [18 June 2018 22:58 UTC](https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404/2 "2018-06-18T22:58:46Z")

</div>

Hi @Raphael_Baysa,

To get a subtasks of a task you can make a request to `GET /tasks/<task-id>/subtasks` and then use the [`opt_fields`](https://asana.com/developers/documentation/getting-started/input-output-options) parameter to select what data you want from those tasks. The API does not support getting subtasks as a field on tasks or other subtasks.

---

<div class="post-metadata">

**Author:** ![Raphael\_Baysa](https://luna1.co/8d76cd.png) [@Raphael\_Baysa](https://forum.asana.com/u/Raphael_Baysa)\
**Post date:** [19 June 2018 21:18 UTC](https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404/3 "2018-06-19T21:18:04Z")

</div>

Thanks Joe! Works beautifully!

---

<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:08 UTC](https://forum.asana.com/t/getting-data-from-subtasks-via-the-api/24404/4 "2025-05-30T19:08:40Z")

</div>

Closed on 30 May 2025 19:08 UTC


