google-trends-node
v1.0.1
Published
Node.js Google Trends client via the Trends API. History, growth, live Google Trends feed. Drop-in mindset for google-trends-api / scraper refugees.
Maintainers
Readme
google-trends-node
Google Trends for Node.js - managed API client, not Puppeteer
Presets source: "google search" for convenience. One API key → 30+ sources - override source anytime.
Install
npm install google-trends-nodeQuickstart
import { TrendsAPI } from "google-trends-node";
const client = new TrendsAPI({ apiKey: process.env.TRENDSAPI_KEY });
const series = await client.getTimeSeries("bitcoin");
console.log(series.at(-1)?.date, series.at(-1)?.value);
const g = await client.getGrowth("bitcoin", { percent_growth: ["12M"] });
console.log(g.results[0].growth, g.results[0].direction);Live feed
const hot = await client.getLive({ limit: 5 });
console.log(hot.data);Auth & quota
Free key: trendsapi.ai/#get-key. Only successful 200 responses count.
Links
- Product: https://trendsapi.ai
- GitHub: https://github.com/trendsapi-ai/google-trends-api
- Full client:
npm install trendsapi
License
MIT
