google-trends-client
v1.0.1
Published
Google Trends client for JS/TS via the Trends API. Normalized 0-100 scores, history + growth, free tier. Drop-in mindset for google-trends-api searchers.
Maintainers
Readme
google-trends-client
Google Trends API for JavaScript — managed JSON, not a scraper
Presets source: "google search" for convenience. One API key → 30+ sources — override source anytime. Quota is per key, not per package.
Install
npm install google-trends-clientQuickstart
import { TrendsAPI } from "google-trends-client";
const client = new TrendsAPI({ apiKey: process.env.TRENDSAPI_KEY });
const series = await client.getTimeSeries("air fryer");
console.log(series.at(-1)?.date, series.at(-1)?.value);
const g = await client.getGrowth("air fryer", { percent_growth: ["12M"] });
console.log(g.results[0].growth, g.results[0].direction);Auth & quota
- Free key: trendsapi.ai/#get-key
- Pass
apiKeyor setTRENDSAPI_KEY - Only successful
200responses count
Links
- Product: https://trendsapi.ai
- Full client:
npm install trendsapi - GitHub: https://github.com/trendsapi-ai/google-trends-api
License
MIT
