+ Add Question

"7 days" does not work in Query API

http://todoist.com/API/query?queries=["7 days"]&token=fb5f22601ec566e48083213f7573e908a7a272e5


Bad Request

Unknown error happened: time data u'7 days' does not match format '%Y-%m-%dT%H:%M:%S'

All responses

David Trey  staff
Replied on Jan 08, 2012 - 14:02 UTC

Hello Omar,

unfortunately, "7 days" is not supported by /API/query. If you want to use it, pass your days as correctly formated dates, e.g.:


Best regards,

Replied on Sep 09, 2015 - 00:12 UTC

Is there plans to add "7 days" as a valid API call? I don't believe it currently works.

Clyde Romo  staff
Replied on Sep 09, 2015 - 03:17 UTC

Hi Brian,

We actually made some improvements to our APIs. Can you please check this documentation on the link below to see if that helps?


Let me know if it doesn't so we can check with our devs. :-)


Replied on Sep 09, 2015 - 03:34 UTC

Thanks for the reply!

I looked at the documentation linked and it listed examples of searches that can be done from the Todoist app, but there was a disclaimer that said 'not all of these examples are currently applicable for this method."

I wasn't able to get "7 days" to return tasks for that time range so I resorted to David Trey's solution of requesting all 7 days individually as a workaround.

Clyde Romo  staff
Replied on Sep 09, 2015 - 04:53 UTC

Hi Brian,

I'll have now asked our developer to look into this.