Go to App

CLI & MCP Server

A command-line tool and MCP server for the ExportComments API. Export comments and reviews from 40+ platforms directly from your terminal or through AI assistants like Claude, Cursor, and Windsurf.

Installation

Install globally via npm:

bash
npm install -g exportcomments-cli

Or run directly with npx:

bash
npx exportcomments-cli export https://www.instagram.com/p/ABC123/
💡
Node.js requirement

The CLI requires Node.js 18 or later.

Authentication

Get your API token from the API dashboard, then set it as an environment variable:

bash
export EXPORTCOMMENTS_API_TOKEN="your-token-here"

Or pass it with each command:

bash
exportcomments --token "your-token-here" export https://...

Commands

CommandAliasDescription
exportcreateCreate a new export job
statuscheckCheck export job status
listlsList all export jobs
downloaddlDownload completed export
platformsList or detect supported platforms
pingCheck API connectivity

Output Format

All commands output structured JSON for easy parsing and automation:

json
{
"ok": true,
"data": { ... }
}

On error:

json
{
"ok": false,
"error": "Human-readable error message",
"error_code": "MACHINE_READABLE_CODE",
"detail": "Additional context"
}

Job Statuses

StatusDescription
queueingJob is queued for processing
progressJob is being processed
doneJob completed successfully
errorJob failed with an error

Quick Example

bash
# 1. Detect the platform
exportcomments platforms --detect "https://www.instagram.com/p/ABC123/"
# 2. Create an export and wait for completion
exportcomments export "https://www.instagram.com/p/ABC123/" --replies --wait
# 3. Download the raw data
exportcomments download <guid> --json