The @socialrouter/cli package lets you run extractions, browse providers, and check your account directly from the terminal. It wraps the SDK and adds formatted output with spinners.

Installation

npm install -g @socialrouter/cli
Or run without installing:
npx @socialrouter/cli extract -u "..." -p apify/linkedin/profile.info

Authentication

Set your API key as an environment variable:
export SOCIALROUTER_API_KEY=sr_live_your_key
Optionally override the base URL (for self-hosted or testing):
export SOCIALROUTER_BASE_URL=https://api.socialrouter.io

Quick example

# Extract a LinkedIn profile
socialrouter extract -u "https://linkedin.com/in/satyanadella" -p apify/linkedin/profile.info

# List available providers
socialrouter providers

# Check your balance
socialrouter balance

All commands

extract

Extract data from one or more social media URLs.

search

Run a query-driven search (e.g. Google Maps).

get

Retrieve a previous extraction or search by ID.

providers

List available providers and pricing.

balance & usage

Check credits and usage stats.

JSON output

Every command supports a -j / --json flag for raw JSON output, useful for piping into other tools:
socialrouter extract -u "https://linkedin.com/in/example" -p apify/linkedin/profile.info -j | jq '.data[0].company'