# Filtering Task by due\_on.after and before

**URL:** <https://forum.asana.com/t/filtering-task-by-due-on-after-and-before/75873>\
**Category:** API & Developers\
**Tags:** tasks\
**Created:** [28 February 2020 09:13 UTC](https://forum.asana.com/t/filtering-task-by-due-on-after-and-before/75873 "2020-02-28T09:13:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubilay\_turgut](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/kubilay_turgut/32/59717_2.png) [@kubilay\_turgut](https://forum.asana.com/u/kubilay_turgut)\
**Post date:** [28 February 2020 09:13 UTC](https://forum.asana.com/t/filtering-task-by-due-on-after-and-before/75873/1 "2020-02-28T09:13:27Z")

</div>

I am a bit stuck about filtering task api by the `due_on` date. So the query I am using just like below. And Trying to return task that between dates…

`11578316/tasks?completed=true&opt_fields=gid,due_on,assignee,assignee.name,completed,completed_at,due_on,modified_at&due_on.after=2020-02-20&due_on.before=2020-02-25`

But it still returns all tasks. No error or else… Is there anything that I missed in the query.

---

<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 February 2020 21:01 UTC](https://forum.asana.com/t/filtering-task-by-due-on-after-and-before/75873/2 "2020-02-28T21:01:17Z")

</div>

I suppose that “…11578316” is your project ID?  
If you use that endpoint (/projects/11578316/tasks), the only filters available are completed\_since and modified\_since.

> **[Build an app with Asana](https://developers.asana.com/docs)**
>
> Learn the basics of Asana's developer platform

I think what you try to do is use another endpoint, /search.

> **[Build an app with Asana](https://developers.asana.com/docs)**
>
> Learn the basics of Asana's developer platform

Your querystring looks good for filtering, but the url is not. It should looks like:

GET /workspaces/xxx/tasks/search

In that case, …11578316 should be your workspace\_id

---

<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:07 UTC](https://forum.asana.com/t/filtering-task-by-due-on-after-and-before/75873/3 "2025-05-30T19:07:10Z")

</div>


