Log in

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' -G
from 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-DU

Response shape

JSON response body. Field types may be null when the source page omits the value.

trends
array
Trending searches on the page, ordered by position.
trends[].position
integer
Rank of the trend within the page (1-based).
trends[].title
string
Trend query as it appears on the Google Trends page.
trends[].searchVolume
string
Abbreviated search volume for the trend (for example 20K+, 1M+).
trends[].searchVolumeText
string
Localized human-readable search-volume label (for example 20K+ searches).
trends[].increasePercentage
string
Recent increase in search interest, as shown on the page.
trends[].started
string
When the trend started rising, as a relative time string (for example 6 hours ago).
trends[].status
string
Trend status as shown by Google (typically Active or Lasted).
trends[].trendBreakdown
array<string>
Related sub-queries that Google groups under this trend.
trends[].trendBreakdownMoreCount
integer
Number of additional sub-queries beyond those listed in trendBreakdown.
trendsCount
integer
Total number of trends returned in trends.
filters
object
Filter state reflected by the page, decoded from the Google Trends URL.
filters.geo
string
Resolved geography label (country or sub-region) the trends are scoped to.
filters.timeRange
string
Time-range label the page is filtered by (for example Past 7 days).
filters.category
string
Category filter label (for example All categories).
filters.trendType
string
Trend-type filter label (for example All trends).
filters.sortBy
string
Sort-order label (for example By relevance, By search volume).
filters.updatedAtText
string
Localized label showing when the page was last updated by Google.
pagination
object
Pagination state for the current request.
pagination.currentPage
integer
Page index of the current response (1-based).
pagination.itemsPerPage
integer
Number of trends Google returns per page.
pagination.totalItems
integer
Total trends available across all pages for the current filters.
pagination.hasNextPage
boolean
true when more trends are available on a subsequent page.
pagination.hasPreviousPage
boolean
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
  }
}