Fork notice (2026-05-03). This fork brings the original
leonid-shevtsov/perplexportback to working order against the current Perplexity site (May 2026). The upstream stopped working sometime after July 2025 because Perplexity changed several DOM selectors, the login flow, and the per-thread API pagination defaults.What changed (vs upstream
main):
- Login (
src/login.ts) — multi-selector cookie banner with EN/CS variants; verifies login via/api/auth/sessionpoll instead of waiting for#ask-input(which is rendered to logged-out users too); explicit instructions to use the 6-digit code, not the magic link in the email (the magic link logs in your regular browser, not the Puppeteer one).- Library enumeration (
src/listConversations.ts) — observe and replay the/rest/thread/list_ask_threadsPOST with paginatedoffset. The old DOM-scrape approach only saw the ~20 threads in the sidebar; this gets the full archive.- Per-thread fetch (
src/ConversationSaver.ts) — direct API call to/rest/thread/<uuid>?limit=1000with offset pagination viahas_next_page. The original captured the SPA's natural request which usedlimit=10, silently truncating any thread with >10 turns. Also ~10× faster (no per-thread page navigation).- Resilience (
src/exportLibrary.ts) — try/catch per conversation with page-recreation recovery ondetached Frame/Target closed/Session closederrors. Cookies persist on the browser context, so no re-login is needed during recovery.Original README below — most of it still applies.
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.
Usage: npx perplexport -e <email> [options]
Export Perplexity conversations as markdown files
Options:
-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")
-e, --email <email> Perplexity email
-h, --help display help for command
The script will:
- Log in to your Perplexity account (Only login with email is currently supported)
- You will need to provide the login code sent to your email
- Navigate to your conversation library
- Store every conversation's data in JSON
- Render conversation into Markdown
- Save the files in the specified output directory (defaults to
./conversations)
- If the browser doesn't open at all, or opens and closes instantly, try
npx puppeteer browsers install chrome. - Puppeteer doesn't like to be ran from a global installation, so perhaps try cloning the project and running it this way.
git clone https://github.com/osedlacek/perplexport.git
cd perplexport
npm install
npm run build
node dist/cli.js -e <your-email> -o ./conversations -d done.jsonOriginal (c) 2025 Leonid Shevtsov — MIT. Fork (c) 2026 Ondřej Sedláček — MIT.