Google Trends API
Our Google Trends API gives you programmatic access to Google's trend data that isn't available through any official API. Get data on search popularity, regional interest, related topics, and more. And the best part? You can try the Google Trends API entirely for free, no credit card required.

POWERING THE WORLD'S TOP DATA-DRIVEN TEAMS
Integrate our Google Trends API
Access the Google Trends API using Python, JavaScript, CLI, cURL, OpenAPI, or MCP. Choose your preferred option and start extracting Google Trends data in minutes.
Python
JavaScript
HTTP
MCP
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "searchTerms": ["webscraping"],10 "timeRange": "",11 "viewedFrom": "",12}13
14# Run the Actor and wait for it to finish15run = client.actor("emastra/google-trends-scraper").call(run_input=run_input)16
17# Fetch and print Actor results from the run's dataset (if there are any)18print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])19for item in client.dataset(run["defaultDatasetId"]).iterate_items():20 print(item)21
22# π Want to learn more π? Go to β https://docs.apify.com/api/client/python/docs/quick-start
Get data with Google Trends API
Extract Google Trends data by providing search terms or Google Trends URLs with your filters. The Google Trends API returns structured JSON data with search interest over time, geographical breakdowns, related queries and more.
Input
{ "geo": "", "category": "", "isPublic": false, "maxItems": 0, "timeRange": "", "isMultiple": false, "searchTerms": [ "webscraping" ], "maxConcurrency": 10, "skipDebugScreen": false, "maxRequestRetries": 7, "pageLoadTimeoutSecs": 180}
Output
{ "interestBy": [ { "value": [ 100 ], "geoCode": "SH", "geoName": "St. Helena", "hasData": [ true ], "maxValueIndex": 0, "formattedValue": [ "100" ] }, { "value": [ 60 ], "geoCode": "TN", "geoName": "Tunisia", "hasData": [ true ], "maxValueIndex": 0, "formattedValue": [ "60" ] }, { "value": [ 56 ], "geoCode": "SG", "geoName": "Singapore", "hasData": [ true ], "maxValueIndex": 0, "formattedValue": [ "56" ] }, { "value": [ 46 ], "geoCode": "PK", "geoName": "Pakistan", "hasData": [ true ], "maxValueIndex": 0, "formattedValue": [ "46" ] }, { "value": [ 0 ], "geoCode": "KM", "geoName": "Comoros", "hasData": [ false ], "maxValueIndex": 0, "formattedValue": [ "" ] }, { "value": [ 0 ], "geoCode": "IO", "geoName": "British Indian Ocean Territory", "hasData": [ false ], "maxValueIndex": 0, "formattedValue": [ "" ] } ], "searchTerm": "web scraping", "inputUrlOrTerm": "web scraping", "interestByCity": [], "relatedTopics_top": [ { "link": "/trends/explore?q=/m/07ykbs&date=today+12-m", "topic": { "mid": "/m/07ykbs", "type": "Topic", "title": "Web scraping" }, "value": 100, "hasData": true, "formattedValue": "100" }, { "link": "/trends/explore?q=/m/0828v&date=today+12-m", "topic": { "mid": "/m/0828v", "type": "Topic", "title": "World Wide Web" }, "value": 97, "hasData": true, "formattedValue": "97" }, { "link": "/trends/explore?q=/m/05z1_&date=today+12-m", "topic": { "mid": "/m/05z1_", "type": "Programming language", "title": "Python" }, "value": 29, "hasData": true, "formattedValue": "29" }, { "link": "/trends/explore?q=/m/026sq&date=today+12-m", "topic": { "mid": "/m/026sq", "type": "Topic", "title": "Data" }, "value": 14, "hasData": true, "formattedValue": "14" }, { "link": "/trends/explore?q=/m/085n4&date=today+12-m", "topic": { "mid": "/m/085n4", "type": "Topic", "title": "Website" }, "value": 9, "hasData": true, "formattedValue": "9" }, { "link": "/trends/explore?q=/m/0c828v&date=today+12-m", "topic": { "mid": "/m/0c828v", "type": "Software", "title": "Selenium" }, "value": 5, "hasData": true, "formattedValue": "5" }, { "link": "/trends/explore?q=/m/0z5n&date=today+12-m", "topic": { "mid": "/m/0z5n", "type": "Type of software", "title": "Application programming interface" }, "value": 5, "hasData": true, "formattedValue": "5" }, { "link": "/trends/explore?q=/m/022qrc8&date=today+12-m", "topic": { "mid": "/m/022qrc8", "type": "HTML parser", "title": "Beautiful Soup" }, "value": 5, "hasData": true, "formattedValue": "5" }, { "link": "/trends/explore?q=/m/07k1x&date=today+12-m", "topic": { "mid": "/m/07k1x", "type": "Topic", "title": "Tool" }, "value": 5, "hasData": true, "formattedValue": "5" }, { "link": "/trends/explore?q=/m/086nh&date=today+12-m", "topic": { "mid": "/m/086nh", "type": "Topic", "title": "Web page" }, "value": 5, "hasData": true, "formattedValue": "5" }, { "link": "/trends/explore?q=/m/0g57xn&date=today+12-m", "topic": { "mid": "/m/0g57xn", "type": "Field of study", "title": "Sentiment analysis" }, "value": 50, "formattedValue": "+50%" } ], "relatedQueries_top": [ { "link": "/trends/explore?q=python+scraping&date=today+12-m", "query": "python scraping", "value": 100, "hasData": true, "formattedValue": "100" }, { "link": "/trends/explore?q=python&date=today+12-m", "query": "python", "value": 96, "hasData": true, "formattedValue": "96" }, { "link": "/trends/explore?q=web+scraping+python&date=today+12-m", "query": "web scraping python", "value": 94, "hasData": true, "formattedValue": "94" }, { "link": "/trends/explore?q=web+data+scraping&date=today+12-m", "query": "web data scraping", "value": 39, "hasData": true, "formattedValue": "39" }, { "link": "/trends/explore?q=data+scraping&date=today+12-m", "query": "data scraping", "value": 38, "hasData": true, "formattedValue": "38" }, { "link": "/trends/explore?q=web+scraping+in+python&date=today+12-m", "query": "web scraping in python", "value": 18, "hasData": true, "formattedValue": "18" }, { "link": "/trends/explore?q=what+is+web+scraping&date=today+12-m", "query": "what is web scraping", "value": 17, "hasData": true, "formattedValue": "17" }, { "link": "/trends/explore?q=selenium+web+scraping&date=today+12-m", "query": "selenium web scraping", "value": 17, "hasData": true, "formattedValue": "17" }, { "link": "/trends/explore?q=selenium&date=today+12-m", "query": "selenium", "value": 16, "hasData": true, "formattedValue": "16" }, { "link": "/trends/explore?q=web+scraping+google&date=today+12-m", "query": "web scraping google", "value": 16, "hasData": true, "formattedValue": "16" }, { "link": "/trends/explore?q=api&date=today+12-m", "query": "api", "value": 16, "hasData": true, "formattedValue": "16" }, { "link": "/trends/explore?q=website+scraping&date=today+12-m", "query": "website scraping", "value": 16, "hasData": true, "formattedValue": "16" }, { "link": "/trends/explore?q=web+scraping+api&date=today+12-m", "query": "web scraping api", "value": 16, "hasData": true, "formattedValue": "16" }, { "link": "/trends/explore?q=web+scraping+using+python&date=today+12-m", "query": "web scraping using python", "value": 15, "hasData": true, "formattedValue": "15" }, { "link": "/trends/explore?q=web+scraping+with+python&date=today+12-m", "query": "web scraping with python", "value": 14, "hasData": true, "formattedValue": "14" }, { "link": "/trends/explore?q=web+scraping+tools&date=today+12-m", "query": "web scraping tools", "value": 12, "hasData": true, "formattedValue": "12" }, { "link": "/trends/explore?q=beautifulsoup&date=today+12-m", "query": "beautifulsoup", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=beautifulsoup+web+scraping&date=today+12-m", "query": "beautifulsoup web scraping", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=web+scraping+free&date=today+12-m", "query": "web scraping free", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=web+scraper&date=today+12-m", "query": "web scraper", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=scraper&date=today+12-m", "query": "scraper", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=scrape&date=today+12-m", "query": "scrape", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=web+scrape&date=today+12-m", "query": "web scrape", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=python+selenium+web+scraping&date=today+12-m", "query": "python selenium web scraping", "value": 11, "hasData": true, "formattedValue": "11" }, { "link": "/trends/explore?q=python+selenium&date=today+12-m", "query": "python selenium", "value": 11, "hasData": true, "formattedValue": "11" } ], "interestBySubregion": [], "relatedQueries_rising": [ { "link": "/trends/explore?q=chatgpt+web+scraping&date=today+12-m", "query": "chatgpt web scraping", "value": 4250, "formattedValue": "+4,250%" }, { "link": "/trends/explore?q=analisis+data+adalah&date=today+12-m", "query": "analisis data adalah", "value": 1150, "formattedValue": "+1,150%" }, { "link": "/trends/explore?q=analisis+data&date=today+12-m", "query": "analisis data", "value": 750, "formattedValue": "+750%" }, { "link": "/trends/explore?q=playwright&date=today+12-m", "query": "playwright", "value": 50, "formattedValue": "+50%" }, { "link": "/trends/explore?q=web+scraping+tool+free&date=today+12-m", "query": "web scraping tool free", "value": 50, "formattedValue": "+50%" } ], "interestOverTime_averages": [], "interestOverTime_timelineData": [ { "time": "1673136000", "value": [ 99 ], "hasData": [ true ], "formattedTime": "Jan 8βββ14, 2023", "formattedValue": [ "99" ], "formattedAxisTime": "Jan 8, 2023" }, { "time": "1673740800", "value": [ 96 ], "hasData": [ true ], "formattedTime": "Jan 15βββ21, 2023", "formattedValue": [ "96" ], "formattedAxisTime": "Jan 15, 2023" }, { "time": "1674345600", "value": [ 99 ], "hasData": [ true ], "formattedTime": "Jan 22βββ28, 2023", "formattedValue": [ "99" ], "formattedAxisTime": "Jan 22, 2023" }, { "time": "1674950400", "value": [ 98 ], "hasData": [ true ], "formattedTime": "Jan 29βββFeb 4, 2023", "formattedValue": [ "98" ], "formattedAxisTime": "Jan 29, 2023" }, { "time": "1675555200", "value": [ 100 ], "hasData": [ true ], "formattedTime": "Feb 5βββ11, 2023", "formattedValue": [ "100" ], "formattedAxisTime": "Feb 5, 2023" }, { "time": "1676160000", "value": [ 91 ], "hasData": [ true ], "formattedTime": "Feb 12βββ18, 2023", "formattedValue": [ "91" ], "formattedAxisTime": "Feb 12, 2023" }, { "time": "1676764800", "value": [ 98 ], "hasData": [ true ], "formattedTime": "Feb 19βββ25, 2023", "formattedValue": [ "98" ], "formattedAxisTime": "Feb 19, 2023" }, { "time": "1703376000", "value": [ 80 ], "hasData": [ true ], "formattedTime": "Dec 24βββ30, 2023", "formattedValue": [ "80" ], "formattedAxisTime": "Dec 24, 2023" }, { "time": "1703980800", "value": [ 81 ], "hasData": [ true ], "formattedTime": "Dec 31, 2023βββJan 6, 2024", "formattedValue": [ "81" ], "formattedAxisTime": "Dec 31, 2023" }, { "time": "1704585600", "value": [ 91 ], "hasData": [ true ], "isPartial": true, "formattedTime": "Jan 7βββ13, 2024", "formattedValue": [ "91" ], "formattedAxisTime": "Jan 7, 2024" } ]}
1Sign up for Apify account
Creating an account is quick and free β no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.
Get started for free
2Get your Apify API token
Go to settings in the Apify console and navigate to the βAPI & Integrationsβ tab. There, create a new token and save it for later.
3Integrate Google Trends API
Navigate to the Google Trends API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more.
Open Google Trends API4Get your Google Trends data via API
Now, you can use the API and get the data you need from Google Trends.
Why use Apify?
Never get blocked
Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.
Customers love us
We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.
Monitor your runs
With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.
Export to various formats
Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.
Integrate Apify to your workflow
You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.
Large developer community
Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!
Get AI-ready Google Trends data via API
Connect to hundreds of apps right away using ready-made integrations, or set up your own with webhooks and our API.
Explore our Google Trends APIs
We have multiple Google Trends APIs available in our store. Browse our collection to find the one that works best for your project.

Google Trends Scraper
emastra/google-trends-scraper
Scrape data from Google Trends by search terms or URLs. Specify locations, define time ranges, select categories to get interest by subregion and over time, related queries and topics, and more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.
4.7K
4.8

Google Trends Scraper FAST
data_xplorer/google-trends-fast-scraper
Get instant access to π₯ daily trending searches by country and analyze Google Trends keyword search trends. This ultimate API alternative gives developers and data scientists programmatic access to Google Trends data without limitations.
226
5.0

Google RealTime Trends Data Scraper
easyapi/google-realtime-trends-data-scraper
Real-time Google Trends data scraper that monitors trending search keywords across 40+ countries worldwide. Updated every 10 minutes, perfect for market research, content planning, and trend analysis. Get instant access to what's trending globally! ππ
67
5.0
Google Trends does not offer an official API for public use. However, we provide our own unofficial Google Trends API that gets all the up-to-date data you need, serving as an alternative to access Google Trends information programmatically for your projects and applications.
Yes, you can try our Google Trends API for free! No credit card required, no strings attached. Just create Apify account with free $5 monthly prepaid usage, get your API token and start using the Google Trends API.
Google Trends API allows you to get data such as search term interest over time, interest by geographic regions and cities, average interest metrics, rising and top related queries, related topics, timeline data with formatted dates, and geo codes with corresponding location names for comprehensive trend analysis.
It is legal to scrape publicly available data from Google Trends. However, you should always review and comply with Google's terms of service and any applicable laws and regulations regarding web scraping. Additionally, be mindful of any rate limits or restrictions imposed by Google to avoid potential issues.
Getting started with our Google Trends API is easy β simply create a free Apify account, get your API token, and start using the Google Trends API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.