Google Trends
Parse the Google Trends "Trending now" page into a structured array of trending searches with search-volume metrics, trend breakdowns, filters, and pagination.
API usage
Add &scraper=google-trends to a Crawling API request. URL-encode the target URL in the url parameter. Filters such as geo, time range, and category are passed as query-string parameters on the Google Trends URL itself.
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://trends.google.com/trending?geo=AE-DU' \
--data-urlencode 'scraper=google-trends' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://trends.google.com/trending?geo=AE-DU',
{'scraper': 'google-trends'}
)
import json
data = json.loads(res['body'])const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });
const res = await api.get(
'https://trends.google.com/trending?geo=AE-DU',
{ scraper: 'google-trends' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://trends.google.com/trending?geo=AE-DU', scraper: 'google-trends')
data = JSON.parse(res.body)Example input URL
The URL passed in the url parameter (URL-decoded for readability):
https://trends.google.com/trending?geo=AE-DUResponse shape
JSON response body. Field types may be null when the source page omits the value.
Trending searches on the page, ordered by position.
Rank of the trend within the page (1-based).
Trend query as it appears on the Google Trends page.
Abbreviated search volume for the trend (for example
20K+, 1M+).Localized human-readable search-volume label (for example
20K+ searches).Recent increase in search interest, as shown on the page.
When the trend started rising, as a relative time string (for example
6 hours ago).Trend status as shown by Google (typically
Active or Lasted).Related sub-queries that Google groups under this trend.
Number of additional sub-queries beyond those listed in
trendBreakdown.Total number of trends returned in
trends.Filter state reflected by the page, decoded from the Google Trends URL.
Resolved geography label (country or sub-region) the trends are scoped to.
Time-range label the page is filtered by (for example
Past 7 days).Category filter label (for example
All categories).Trend-type filter label (for example
All trends).Sort-order label (for example
By relevance, By search volume).Localized label showing when the page was last updated by Google.
Pagination state for the current request.
Page index of the current response (1-based).
Number of trends Google returns per page.
Total trends available across all pages for the current filters.
true when more trends are available on a subsequent page.true when a previous page is available.Sample response
{
"trends": [
{
"position": 1,
"title": "al maktoum international airport (dwc)",
"searchVolume": "20K+",
"searchVolumeText": "20K+ searches",
"increasePercentage": "600%",
"started": "6 hours ago",
"status": "Active",
"trendBreakdown": ["dubai international airport"],
"trendBreakdownMoreCount": 0
}
],
"trendsCount": 5,
"filters": {
"geo": "Dubai",
"timeRange": "Past 7 days",
"category": "All categories",
"trendType": "All trends",
"sortBy": "By relevance",
"updatedAtText": "Updated Jun 2, 2:56 PM"
},
"pagination": {
"currentPage": 1,
"itemsPerPage": 25,
"totalItems": 25,
"hasNextPage": false,
"hasPreviousPage": false
}
}