Skip to content
 
 

Repository files navigation

Perplexity Conversation Exporter

This tool automatically exports your Perplexity conversations as JSON and markdown files. Built with TypeScript and Puppeteer.

It's raw but functional. You will need to log in using your email code. Sometimes there are issues with stability (as to be expected with browser automation).

Your credentials and session are not stored, so from one side it's all secure, from the other requires manual attention to run.

I do not use the built-in export functionality (it's rate limited and the output is quite sparse), but render the conversation from its data. The data itself is stored as JSON and could be considered a complete backup of the conversation.

Setup

git clone https://github.com/ribbear/perplexport.git
cd perplexport
npm install
npm run build

Usage

Usage: node dist/cli.js [options]

Export Perplexity conversations as markdown files

Options:
  -V, --version             output the version number
  -o, --output <directory>  Output directory for conversations (default: ".")
  -d, --done-file <file>    Done file location (tracks which URLs have been
                            downloaded before) (default: "done.json")
  -c, --chrome <path>       Path to Chrome/Chromium executable (or set
                            CHROME_PATH env var)
  -e, --email <email>       Perplexity email
  -h, --help                display help for command

Examples

Basic usage:

node dist/cli.js -e your@email.com -o ./conversations

With custom Chrome path (e.g. WSL):

node dist/cli.js -e your@email.com -o ./conversations -c "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"

Or using the environment variable:

export CHROME_PATH="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
node dist/cli.js -e your@email.com -o ./conversations

How it works

The script will:

  1. Log in to your Perplexity account (only login with email is currently supported)
  2. You will need to provide the login code sent to your email
  3. Navigate to your conversation library
  4. Scroll through and click each conversation row
  5. Open each conversation in a new tab, capture the API response
  6. Save JSON data and rendered Markdown to the output directory
  7. Track progress in a done file so it can resume if interrupted

Resume support

The done file (done.json by default) tracks which conversations have been downloaded. If the script is interrupted (rate limit, timeout, etc.), just run it again and it will skip already-downloaded conversations.

Troubleshooting

  • If the browser doesn't open at all, or opens and closes instantly, try npx puppeteer browsers install chrome.
  • On WSL, you need to point to the Windows Chrome executable with -c or CHROME_PATH.
  • Puppeteer doesn't like to be run from a global installation, so perhaps try cloning the project and running it this way.
  • If login rate-limits you, wait a few minutes and try again. The script saves progress after each conversation.

(c) 2025 Leonid Shevtsov

About

Script to bulk export Perplexity.ai conversations into Markdown files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages