界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

chatgpt-exporter-ultimate

chatgpt-exporter-ultimate

【数据与研究】Export ALL your ChatGPT conversations instantly — no 24h wait, no extensions. Works via browser relay OR standalone bookmarklet. Extracts full message history with timestamps, roles, and metadata. One command, one JSON file, done.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: chatgpt-exporter-ultimate description: Export ALL your ChatGPT conversations instantly — no 24h wait, no extensions. Works via browser relay OR standalone bookmarklet. Extracts full message history with timestamps, roles, and metadata. One command, one JSON file, done.

ChatGPT Exporter ULTIMATE

🔗 Part of the OpenClaw Ecosystem — This skill is part of a larger AI agent revamp project. Full project: https://github.com/openclaw/openclaw

Export all ChatGPT conversations in seconds — no waiting for OpenAI's 24-hour export email.

Usage

Export my ChatGPT conversations

Requirements

  1. User must attach their Chrome ChatGPT tab via browser relay
  2. User must be logged into ChatGPT

How It Works

  1. Attach browser - User clicks OpenClaw toolbar icon on chatgpt.com tab
  2. Inject script - Agent injects background export script
  3. Fetch all - Script fetches all conversations via internal API
  4. Download - JSON file auto-downloads to user's Downloads folder

Technical Details

Authentication

ChatGPT's internal API requires a Bearer token from /api/auth/session:

const session = await fetch('/api/auth/session', { credentials: 'include' });
const { accessToken } = await session.json();

API Endpoints

EndpointPurpose
/api/auth/sessionGet access token
/backend-api/conversations?offset=N&limit=100List conversations
/backend-api/conversation/{id}Get full conversation

Export Script

The agent injects a self-running script that:

  1. Fetches the access token
  2. Paginates through all conversations (100 per page)
  3. Fetches each conversation's full content
  4. Extracts messages from the mapping tree
  5. Creates JSON blob and triggers download

Progress Tracking

window.__exportStatus = { phase: 'fetching', progress: N, total: M }

Output Format

{
  "exported": "2026-02-06T11:10:09.699Z",
  "conversations": [
    {
      "id": "abc123",
      "title": "Conversation Title",
      "created": 1770273234.966738,
      "messages": [
        { "role": "user", "text": "...", "time": 1770273234 },
        { "role": "assistant", "text": "...", "time": 1770273240 }
      ]
    }
  ]
}

Rate Limits

  • 100ms delay between conversation fetches
  • ~3 minutes for 200 conversations
  • ChatGPT allows ~100 requests/minute

Troubleshooting

IssueSolution
No tab attachedClick OpenClaw toolbar icon on ChatGPT tab
401 errorLog into ChatGPT and re-attach tab
Export stuckCheck browser console for errors
No downloadCheck Downloads folder / browser settings

Files

  • scripts/bookmarklet.js - Standalone console script (paste in DevTools)
  • scripts/export.sh - CLI export with token argument

Comparison to Extensions

FeatureThis SkillChatGPT Exporter Extension
InstallationNoneChrome Web Store
AutomationFull (agent-controlled)Manual (user clicks)
FormatJSONJSON, MD, HTML, PNG
Batch export✅ Auto✅ "Select All"
ProgressAgent monitorsUI progress bar

When to use this skill: Automated exports, programmatic access, agent workflows When to use extension: Manual exports, multiple formats, visual UI

我的收藏