A Python automation tool that exports Xiaomi/Mi Notes from the Mi Notes web interface into separate .txt files.
Mi Notes web did not provide a practical bulk export option for all notes. Manually opening and copying hundreds of notes one by one was slow and error-prone.
This project automates the export process by combining:
- Browser automation with Playwright
- Reverse engineering of Mi Notes web network calls
- Exact note-detail extraction from internal note endpoints
- Plain-text export into separate
.txtfiles
Simple UI scraping was not reliable because the page mixed note-list previews and note-detail content. To solve that, this tool captures internal note list and note detail responses and uses them to export each note accurately.
- Manual login support
- Reads notes in visible order from the Mi Notes web interface
- Fetches exact note details
- Exports each note as a separate
.txtfile - Supports batch export for testing or full export
- Debug mode for troubleshooting
- Open Mi Notes web page in Chrome using Playwright
- User logs in manually
- Tool detects the visible notes in the left pane
- Tool maps visible notes to internal note records
- Tool fetches exact note detail using internal note endpoints
- Tool cleans note markup into readable plain text
- Tool saves each note into a separate
.txtfile
- The browser opens Mi Notes web
- The user logs in and opens the
All notespage - The exporter reads the starting visible notes in order
- The tool captures internal network responses
- It fetches exact content for each note
- It saves notes as separate text files
- Python
- Playwright
- Browser automation
- Network/API response analysis
- Text extraction and normalization
git clone https://github.com/varuntech123/mi-notes-bulk-exporter.git
cd mi-notes-bulk-exporterpython -m venv venvWindows PowerShell:
venv\Scripts\Activate.ps1Windows CMD:
venv\Scripts\activatepip install -r requirements.txt
python -m playwright install chromepython mi_notes_exporter.py --output-dir exported_notes_first20 --limit 20 --debugpython mi_notes_exporter.py --output-dir exported_notes_all --limit 601 --debug- Run the script
- Log in to Mi Notes web manually
- Open
All notes - Keep the top notes visible in the left pane
- Press Enter in terminal
- Do not manually scroll or click after that
- Wait for the export to complete
The tool creates separate .txt files for each note in the selected output folder.
Example:
001_90-days-challenges.txt002_daily_tasks.txt
Use --debug to save troubleshooting artifacts such as:
- page screenshot
- ordered note targets
- captured network payloads
- Do not upload personal exported notes to GitHub
- Do not upload browser profile/session folders
- This project is intended for personal data extraction and automation research
- Web app changes may require selector or response-mapping updates
python mi_notes_exporter.py --output-dir exported_notes_demo --limit 10 --debug
python mi_notes_exporter.py --output-dir exported_notes_first20 --limit 20 --debug
python mi_notes_exporter.py --output-dir exported_notes_all --limit 601 --debugSCREESHOT Screenshot of Chrome...
This project demonstrates:
- solving a real user problem
- browser automation
- reverse engineering a production web app
- using internal network responses instead of fragile scraping
- designing a hybrid automation plus data extraction workflow

