Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Takeout - Export Your Conversation History

Locked in an annoying apple private relay email labrynth? This repo/tool allows you to export your complete ChatGPT conversation history as JSON and Markdown files.

Fastest: Run the GUI and easy instructions are there.

Quick Start with UI

  1. Run the GUI:

    python3 chatgpt_ui.py
  2. Follow the instructions in the UI to:

    • Get your cURL command from ChatGPT's Network tab
    • Choose export settings (directory, conversation limit, format options)
    • Start the export

Manual Command Line Usage

If you prefer the command line:

  1. Get your cURL command:

    • Open ChatGPT in browser (https://chatgpt.com)
    • Open Developer Tools (F12)
    • Go to Network tab
    • Click "ChatGPT" in sidebar to load conversations
    • Find "backend-api/conversations" request
    • Right-click → Copy → Copy as cURL
  2. Save cURL to file:

    pbpaste > curl.txt
  3. Run the export:

    python3 chatgpt_takeout.py --curl-file curl.txt --zip --markdown

Options

Command Line Options:

  • --curl-file: Path to file containing your cURL command
  • --curl: Pass cURL string directly (quoted)
  • --out: Output directory (default: chatgpt_takeout)
  • --zip: Create ZIP archive
  • --markdown: Include Markdown files
  • --max-conversations: Limit number of conversations (0 = all)

UI Features:

  • Visual cURL Instructions: Step-by-step guide with screenshots
  • Directory Selection: Choose where to save your export
  • Conversation Limits: Export specific number of conversations
  • Size Estimates: Approximate file size before export
  • Progress Tracking: Real-time export progress
  • Auto-Open Results: Option to open export folder when complete

Export Structure

chatgpt_export/
├── conversations/
│   ├── conversation-id-1.json
│   ├── conversation-id-1.md
│   ├── conversation-id-2.json
│   └── conversation-id-2.md
├── manifest.list.json      # List of all conversations
└── manifest.json          # Export metadata

Size Estimates

  • JSON only: ~50KB per conversation
  • JSON + Markdown: ~70KB per conversation
  • 1000 conversations: ~50-70MB
  • ZIP compression: Reduces size by ~60-80%

Troubleshooting

"No cURL command found"

  • Make sure you copied the entire cURL command
  • Verify it starts with curl and contains headers

"401 Unauthorized"

  • Your session may have expired - get a fresh cURL
  • Make sure you copied from the correct "backend-api/conversations" request

"No conversations found"

  • Try refreshing ChatGPT and clicking between conversations
  • Look for the "backend-api/conversations" request in Network tab

Requirements

  • Python 3.7+
  • requests library: pip install requests
  • For UI: tkinter (usually included with Python)

Notes

  • Your cURL contains authentication tokens - keep it secure
  • The tool replicates your browser's exact headers and cookies
  • Export works with both chatgpt.com and chat.openai.com
  • No rate limiting - exports run at full speed

About

A repository for downloading your data from ChatGPT - if you're locked out via a private relay email from receiving data exports this is a great backup. Please note there are sometimes limits by pagination as ChatGPT's UI won't load more than 49 conversations, but if this is better than nothing for you it's a great option.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages