Archive and export your AI chat conversations as JSON and Markdown.
Project description
open-export
Download and archive all your ChatGPT conversations as JSON and Markdown files.
Connects to your active browser session via Chrome DevTools Protocol (CDP) — no credentials or API keys needed. You stay logged in through your browser; the tool piggybacks on that authenticated session.
Installation
pip install -e .
Usage
1. Launch your browser with remote debugging enabled
Edge (Windows):
& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222
Chrome (Windows):
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
Chrome (macOS/Linux):
google-chrome --remote-debugging-port=9222
Important: Close all browser windows before running the command above. The
--remote-debugging-portflag is ignored if the browser is already running.
2. Log into ChatGPT
Navigate to chatgpt.com in the browser you just launched and make sure you're logged in.
3. Run the exporter
python -m open_export.cli -o ./my_chats
Or if the CLI entry point is on your PATH:
open-export -o ./my_chats
Options
| Option | Default | Description |
|---|---|---|
--output, -o |
./open_export_output |
Output directory |
--cdp-url |
http://localhost:9222 |
Chrome DevTools Protocol URL |
--delay |
1.0 |
Seconds between API requests |
--page-size |
100 |
Conversations per page |
--verbose, -v |
off | Debug logging |
--version |
Show version |
Output
my_chats/
json/ # Raw API responses (one file per conversation)
markdown/ # Human-readable formatted conversations
How it works
- Connects to your running browser via CDP (
connect_over_cdp) - Finds an open ChatGPT tab (or navigates to one)
- Fetches an access token from ChatGPT's session endpoint
- Paginates through the conversation list API
- Downloads each conversation's full data
- Exports as JSON (raw) and Markdown (readable)
The access token is used only during the session and cleared from memory on exit. No credentials are stored on disk.
Development
pip install -e ".[dev]"
pytest tests/ -v
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_export-0.1.1.tar.gz.
File metadata
- Download URL: open_export-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2939bcc0791ab7cbb61cb7d645ec60baab0d39860f681f441065c44532a2332
|
|
| MD5 |
91b6e9facc3df0883f6e0033fe73c553
|
|
| BLAKE2b-256 |
1197fc6181fdbe85502c439e1836717a9093c7a387f67ac3a59f8f33cf9fe5dd
|
File details
Details for the file open_export-0.1.1-py3-none-any.whl.
File metadata
- Download URL: open_export-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203474431dd1c7257bed866b69fd5c70807d58e8d29b718e19568815dc047d69
|
|
| MD5 |
03b02e314707125b210b8abd1a7f0370
|
|
| BLAKE2b-256 |
e71d76d9a6002aedb80c6c1f4bfce3e6b60d41633f3c09ce4e6b9b5270aa8c7b
|