Try it:
uv run https://raw.githubusercontent.com/konstin/say-hi/refs/heads/main/say-hi.py
Look ma, no installs, no pip, no requirements.txt...Friends tell friends:
uv runLeaving a ChatGPT business account? This tool saves your conversations before they're gone.
ChatGPT's business and Team accounts often have no "Export data" button ā the one-click archive that personal accounts get is simply missing, and there's no official way to take your conversation history with you when the workspace is closed or your subscription is cancelled. scrapemychats fills that gap: it exports every conversation ā text and attached files ā to your own computer, then builds a beautiful, searchable, offline archive you can keep forever. (It works on personal accounts too.)
Your data never leaves your machine. The tool drives a real Chrome window on your computer using your own logged-in ChatGPT session. It never sees your password, and nothing is sent anywhere except to chatgpt.com itself.
The offline viewer: categories on the left, your chats in the middle, the full conversation ā tables, files, images ā on the right. (Sample data shown.)
export/
āāā viewer.html ā open this: search + browse everything
āāā manifest.csv ā one row per chat: status, counts
āāā errors.log ā anything that couldn't be fetched
āāā 001_Some Chat Title_6a5f6592/
āāā conversation.json ā complete raw data (every message, tool call)
āāā conversation.md ā readable transcript
āāā files/ ā attachments, images & generated files
The viewer is a single self-contained HTML file: instant full-text search across all chats, optional Personal/Work categorisation, inline image thumbnails, keyboard navigation. No server, no internet, no dependencies ā it works from a USB stick.
Full-text search is instant and highlights matches in the results and inside the open chat. (Sample data shown.)
Requirements: Python 3.10+, Google Chrome
(or Microsoft Edge with --browser-channel msedge).
pip install -r requirements.txt
# 1. Test with a few chats first (a Chrome window opens ā log into ChatGPT
# in it; if you have multiple workspaces, switch to the right one)
python export_chats.py --limit 3
# 2. Check the export/ folder looks right, then run the full export
python export_chats.py
# 3. Build the viewer, then open export/viewer.html in your browser
python build_viewer.py
The chat list is discovered automatically (including chats inside
Projects) and saved to chats.csv. Alternatively supply your own list
with --csv mylist.csv (first column: chat URL, second: title).
You don't need to be a programmer. There are ~10 steps and each one is a thing you type or click. Set aside 20 minutes for setup, then the export itself runs unattended for a few hours.
<> Code button ā Download ZIP. Then open your Downloads
folder, right-click scrapemychats-main.zip ā Extract All.scrapemychats-main folder in File Explorer, click in the address bar
at the top, type powershell and press Enter. A blue/black text window
opens ā that's the terminal, already pointed at the right folder.pip install -r requirements.txt
python export_chats.py --limit 3
A Chrome window opens. Log into ChatGPT in it (pick the right
workspace if you have several). The tool then exports 3 chats and stops.export folder ā you should see a numbered
folder per chat. If it looks right, run the full export:python export_chats.py
Leave it running (minimise Chrome, don't close it). Big accounts take a
few hours ā this is deliberate, see "Things to know" below. If your
computer sleeps or you interrupt it, just run the same command again ā
it continues where it left off.python build_viewer.py
then double-click export\viewer.html. That's your archive ā searchable,
offline, yours.<> Code button ā Download ZIP. It lands in Downloads and
usually unzips itself into a scrapemychats-main folder (double-click
the ZIP if not).Cmd + Space, type Terminal, press Enter.cd ~/Downloads/scrapemychats-main
python3 -m pip install -r requirements.txt
python3 export_chats.py --limit 3
A Chrome window opens. Log into ChatGPT in it (pick the right
workspace if you have several). The tool exports 3 chats and stops.export folder, then run the full export:python3 export_chats.py
Leave it running (minimise Chrome, don't close it); big accounts take a
few hours. Interrupted? Run the same command again ā it resumes.python3 build_viewer.py
then double-click export/viewer.html.On a Mac, type
python3wherever this README sayspython.
Honestly, the easiest path for a non-technical person is to let an AI assistant drive:
With ChatGPT (or any chatbot): paste this prompt, then follow along ā it will give you one instruction at a time and decode any error you paste back:
I'm a complete beginner on [Windows / Mac]. Help me set up and run the open-source tool "scrapemychats" from GitHub (paste this page's web address here). It needs Python and Google Chrome, then
pip install -r requirements.txt, thenpython export_chats.py --limit 3as a test, thenpython export_chats.pyfor the full run, thenpython build_viewer.py. Walk me through it one step at a time and wait for me to confirm each step. If I paste an error, explain the fix simply.
With an AI coding agent (Claude Code, Codex, etc.): these tools can
run the steps for you. Install the agent, open the scrapemychats folder
with it, and say: "Set this tool up and run the export for me ā start
with a 3-chat test run." The agent installs the dependency, starts the
script, and tells you when to log into the Chrome window it opens. It can
also fix anything unexpected (a changed endpoint, an odd error) on the
spot ā which a static README never can.
cp categories.example.json categories.json # Windows: copy categories.example.json categories.json
# edit the groups / subcategories / keywords to match your life
python build_viewer.py
Chats are auto-filed by keyword scoring (title matches weigh 4Ć). Anything matching nothing lands in Unsorted ā skim that list, add keywords, and re-run; regeneration takes seconds.
errors.log ā but the conversation text referencing
them is still captured. No export method can recover them. The tool also
recovers what it can from your account's file Library and from
code-generated (sandbox) files.export/, chats.csv, and browser_profile/ are
git-ignored. browser_profile/ contains your live ChatGPT login ā never
share or commit it, and delete it when you're done.Rather than scraping the page or asking for your credentials, the script waits for ChatGPT's own frontend to request each conversation's JSON from its backend and captures that response. Attachments come through the files API, generated files through the interpreter-download API, and stale uploads through the account Library ā all using the same session headers the page itself uses. This makes the export complete and robust to UI redesigns.
For exporting your own data from your own account. Automating a website may be subject to its terms of use ā this tool deliberately behaves like a (patient) human reader, but you use it at your own risk. Not affiliated with OpenAI.
MIT