Export all your completed Todoist tasks into a JSON file. Using Todoist's v9 API. The program will run until the API does not return any new completed tasks. Meant to run on MacOS or Linux.
Note: The amount of tasks you can export may be limited by your Todoist plan.
Running the script
requests
On MacOS/Ubuntu - pip3 install requests
- Find your Todoist API key
- Enter your API key in the variable
api_token
. python3 todoist-export-completed.py
The script will run and output the entire response in todoist_tasks_incremental.json
, in the same directory as the script.
The default output isn't organized. To fix this, simply run jq '.[]' todoist_tasks_incremental.json > output.json
.
This will format the JSON into output.json
and make it readable. You can download jq
from brew
or apt
, depending on what OS you are running.
If you have too many tasks, change max_tasks
on line 4 to be a higher number. This increases the amount of pages to request. The program will automatically exit once the API stops returning tasks.