The @trendsagi/core client mirrors the Python SDK's response shapes for trends, analytics, AI insights, recommendations and ads previews. It ships ESM, CommonJS and TypeScript declarations, supports AbortSignal and an injectable fetch, and throws a typed TrendsAGIError for 401, 429 and other API failures. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com115
Routes
23
Guides
3
Languages
Typed npm client with no runtime dependencies
The @trendsagi/core client mirrors the Python SDK's response shapes for trends, analytics, AI insights, recommendations and ads previews. It ships ESM, CommonJS and TypeScript declarations, supports AbortSignal and an injectable fetch, and throws a typed TrendsAGIError for 401, 429 and other API failures.
Install
npm install @trendsagi/coreRequired credentials
import { TrendsAGI } from "@trendsagi/core";
const trendsagi = new TrendsAGI(); // reads TRENDSAGI_API_KEY
const { trends } = await trendsagi.trends.list({
category: "Technology",
limit: 5,
});
console.log(trends.map((trend) => trend.name));# Save as quickstart.mjs
node quickstart.mjs1. 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