My understanding is the way the API and backend works is different than the web interface. To the backend/API every task is a task. It just happens that some tasks are subtasks and therefore have a parent_task_id.
The way I do it is get the specific parent task(s) I want that have subtasks, then pull the entire list(s). Take all of those parent tasks and compare the parent_task_id with the task_id of the parent tasks.
Hope that helps.
Rob