Skip to main content

Google Trends API

Python client for Google Trends data via the Trends API. Normalized 0-100 scores, history + growth, free tier. Not a scraper.

License: MIT PyPI

Key: trendsapi.ai/#get-key. Full contract: trendsapi-ai/trendsapi.

JS: google-trends-js, google-trends-node, google-trends-client.

Install

pip install google-trends-client
from google_trends_client import TrendsAPI

client = TrendsAPI()  # TRENDSAPI_KEY
series = client.get_time_series("heat pump")
growth = client.get_growth("heat pump", percent_growth=["12M"])
hot = client.get_live(limit=10)

Keyword helpers default to source: "google search". Override source= for any other platform. Official full client: trendsapi.

Call

Field Value
Endpoint POST https://api.trendsapi.ai/api
Auth Authorization: Bearer $TRENDSAPI_KEY
History source: google search with get_time_series or get_growth
Keyword Any phrase, e.g. heat pump
Live type Google Trends
curl -sS -X POST https://api.trendsapi.ai/api \
  -H "Authorization: Bearer $TRENDSAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"get_time_series","source":"google search","keyword":"heat pump"}'

Related sources (same endpoint, different source): google images, google news, google shopping.

value is 0-100 for this term on Google web search, not Ads impressions.

Site: https://trendsapi.ai/trends/google-trends. GitHub: trendsapi-ai/google-trends-api.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_trends_client-1.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_trends_client-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page