TrendsAGI API Docs

Complete API reference for trends, automations, and integrations. Connect ads platforms, Shopify, Meta CAPI, Reddit Ads, BigQuery, Google Sheets, n8n, Slack, and webhooks with a mix of one-click OAuth and direct REST workflows.

Base URL: https://api.trendsagi.com

Manage API Keys Generate and rotate keys in the dashboard.
Python SDK

Best for backend jobs, orchestration workers, and data pipelines.

pip install trendsagi
JavaScript REST (fetch/axios)

Best default path for TypeScript services and web apps.

npm install axios

Quick Start

Install command

bash
npm install axios

SDK usage

typescript
const API_BASE_URL = process.env.API_BASE_URL ?? "https://api.trendsagi.com";
const API_KEY = process.env.TRENDSAGI_API_KEY;
if (!API_KEY) throw new Error("Set TRENDSAGI_API_KEY first");

async function main() {
  const response = await fetch(`${API_BASE_URL}/api/trends?category=Technology&limit=5`, {
    headers: { Authorization: `Bearer ${API_KEY}` },
  });
  if (!response.ok) throw new Error(`Request failed: ${response.status}`);

  const trends = await response.json();
  console.log((trends.trends ?? []).map((item: any) => item.name));
}

main().catch(console.error);

Run command

bash
# Save as quickstart.ts
npx tsx quickstart.ts

Integration Checklist

Follow this order for the fastest path from first call to production-ready automation.

Step 1

Generate API key

Create and store `TRENDSAGI_API_KEY` in your runtime secrets.

Open API key manager

Step 2

Choose integration path

Use one-click setup for speed, or advanced custom setup for execution in your own stack.

Step 3

Run first signal pull

Validate connectors with `GET /api/integrations/ads/providers`.

Step 4

Enable category-driven automation

Save a trend category with safety guardrails, then run preview/apply.

NPM Setup Reality Check

Last verified on February 19, 2026: app-level installs work, but there is no public `trendsagi` npm package.

Verified

`npm ci` in `frontend_public`

Verified

`npm ci` in `frontend_app`

Not available

`npm install trendsagi` returns npm 404

If you need a private JS SDK, publish to a private registry and configure auth token + registry scope in your runtime.

Integrations
11

SDKs, frameworks, social/search, and automation connectors.

Reference Endpoints
114

Grouped by domain with request/response schema details.

Ads Integrations
2

One-click and advanced setup paths for Google, Meta, TikTok, and LinkedIn workflows.

Social/Search
4

Playbooks for social listening, content ops, and search workflows.