The trendsagi command runs TrendsAGI from a terminal: log in once with an API key, then use one command per action for trends, AI insights, recommendations, crisis events, the watchlist, read-only SQL, webhooks, exports, ads and integrations. It prints tables in a terminal and JSON when piped, so it fits shell scripts, cron jobs and CI. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com115
Routes
20
Guides
3
Languages
Every API action from your terminal or shell scripts
The trendsagi command runs TrendsAGI from a terminal: log in once with an API key, then use one command per action for trends, AI insights, recommendations, crisis events, the watchlist, read-only SQL, webhooks, exports, ads and integrations. It prints tables in a terminal and JSON when piped, so it fits shell scripts, cron jobs and CI.
Install
npm install -g trendsagi # Node.js 18+; or try it with npx trendsagi
pipx install trendsagi # or the Python build (Python 3.8+)
trendsagi login # paste a key from Profile > API KeysRequired credentials
# What is accelerating in Technology right now
trendsagi trends list --category Technology --sort velocity --limit 10
# Why one trend is moving: audience, sentiment and marketing angles
trendsagi insights get 123
# Questions that need joins or aggregation: read-only SQL
trendsagi schema
trendsagi sql "SELECT category, count(*) FROM trends GROUP BY 1 ORDER BY 2 DESC"
# Recommendations and crisis events
trendsagi recommendations list --priority high
trendsagi crisis list --status active
# Track a keyword and get emailed when it spikes
trendsagi watchlist add "oat milk" --threshold 50000 --email
# JSON for scripts: piped output is JSON, or force it with --json
trendsagi trends list --sort velocity --json | jq -r '.trends[].name'
# Any endpoint without a dedicated command
trendsagi api /api/integrations/delivery/health -q lookback_hours=24# Every command has --help, e.g.
trendsagi trends list --help1. Install
Add SDK/dependency for this integration path.
2. Authenticate
Set API key and any provider-specific credentials.
3. Map Endpoints
Use mapped endpoints below to build deterministic flow.
4. Harden
Add rate-limit backoff, idempotency, and safety gates.
Endpoint Mapping
Each integration is mapped to specific API endpoints so teams can compose deterministic workflows.
Production Notes