Loading API docs...
Use TrendsAGI to detect emerging topics, then validate durability against Google Trends before creating content, budget, or outreach actions. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://api.trendsagi.com114
Routes
16
Guides
3
Languages
Validate signal momentum against query-interest curves
Use TrendsAGI to detect emerging topics, then validate durability against Google Trends before creating content, budget, or outreach actions.
Install
# Install your preferred Google Trends client
# Call TrendsAGI over HTTPS directlyRequired credentials
import googleTrends from "google-trends-api";
async function main() {
const apiKey = process.env.TRENDSAGI_API_KEY;
if (!apiKey) throw new Error("Set TRENDSAGI_API_KEY first");
const apiBaseUrl = process.env.API_BASE_URL ?? "https://api.trendsagi.com";
const url = new URL("/api/trends", apiBaseUrl);
url.search = new URLSearchParams({
search: "AI chips",
sort_by: "velocity",
period: "24h",
limit: "5",
}).toString();
const response = await fetch(url, {
headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const signals = await response.json();
for (const signal of signals.trends ?? []) {
const response = await googleTrends.interestOverTime({
keyword: signal.name,
geo: "US",
startTime: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
});
const parsed = JSON.parse(response);
const timeline = parsed.default?.timelineData ?? [];
const latestInterest = timeline.length
? Number(timeline[timeline.length - 1]?.value?.[0] ?? 0)
: 0;
console.log(signal.name, signal.average_velocity, latestInterest);
}
}
main().catch(console.error);# 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