{
  "id": 17462168,
  "title": "Pull Google Trends data into Python with one API call (no pytrends, no cookies)",
  "url": "https://urgent.news/2026/10/31/pull-google-trends-data-into-python-with-one-api-call-no-pytrends-no",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-31T19:54:20.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/flyingnimbus/pull-google-trends-data-into-python-with-one-api-call-no-pytrends-no-cookies-4o57"
  },
  "original_language": "en",
  "account": "Google Trends data can be easily accessed in Python using a single API call with the Apify actor, eliminating the need for additional libraries like pytrends or handling cookies. This approach overcomes the pain points of scripting Google Trends, such as a lack of official API, frequent breaking due to changes, and rate limits from datacenter IPs. The Python workflow provided handles retries and proxy rotation on the server side, allowing you to focus solely on the code execution.\n\nTo get started, create a free Apify account and retrieve the API token from the Settings → Integrations section. Install the 'requests' package and export the token as an environment variable. The 'fetch_trends' function simplifies the process, requiring you to simply POST JSON and receive JSON in return. This function allows you to fetch Google Trends data for specific keywords, with optional parameters for geo-location, time range, comparison terms, and other settings.\n\nA reusable fetch function enables you to create a 'fetch_trends()' function, which can be used to obtain a reusable dataset. The script also compares several keywords in a Canada-only query, provides rising related queries, and generates a CSV file ready for analysis in a spreadsheet. This allows you to analyze the data without any additional setup or external dependencies.",
  "summary": "Disclosure: I built and sell the Apify actor used in this post ( Google Trends Scraper ). It is pay-per-use ($2 per 1,000 search terms that return data; failed or empty terms are not charged). Everything below was run against the real actor on 2026-10-30; the numbers shown are from that run. If you have ever scripted Google Trends, you know the pain: there is no official API, pytrends breaks…",
  "key_points": [
    "Access Google Trends data in Python with a single API call using Apify actor",
    "Eliminates need for pytrends library, cookies, and server-side retries",
    "Provides reusable fetchtrends() function for Canada-only keyword analysis"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}