perplexity-exporter
v0.1.0
Published
Export all threads from Perplexity.ai with full conversation history
Downloads
30
Maintainers
Readme
Perplexity Exporter
Export all of your Perplexity.ai conversation threads to JSON, preserving the full back-and-forth conversation history including sources.
How It Works
- Opens a persistent Chromium browser window (so your login session is saved between runs)
- Navigates to your Perplexity Library and auto-scrolls to load all threads
- Fetches full conversation details for each thread via the Perplexity API (using your browser cookies)
- Saves everything to a timestamped JSON file of your choosing
Requirements
- Node.js 18+
- A Perplexity.ai account
Quick Start (no install)
npx perplexity-exporter
# or
pnpm dlx perplexity-exporterFirst run: Chromium will be downloaded automatically (~150 MB, one-time setup).
Usage (from source)
# Clone and install
git clone https://github.com/kylebrodeur/perplexity-exporter.git
cd perplexity-exporter
pnpm install
npx playwright install chromium
# Build and run
pnpm build
node dist/index.jsFirst run
On the first run a browser window will open. Log in to Perplexity.ai if prompted, then press Enter in the terminal to begin the export.
Your session is saved to browser-data-playwright/ so subsequent runs start already logged in.
Output Format
Exports a JSON array of thread objects:
[
{
"slug": "abc123",
"title": "How does RLHF work?",
"steps": [
{
"step_type": "INITIAL_QUERY",
"query_str": "How does RLHF work?",
"final_response": "RLHF (Reinforcement Learning from Human Feedback)..."
}
]
}
]Each steps array entry represents one turn of the conversation.
Notes
- Rate limiting: The exporter adds small delays between requests (~350ms) to avoid hammering the API.
- Large libraries: Auto-scroll handles infinite-scroll pagination. Very large libraries (1000+ threads) may take several minutes.
- Re-running: Each run creates a new timestamped file — existing exports are never overwritten.
browser-data-playwright/stores your login session locally. It is gitignored and should never be committed.
License
MIT
