The Google Trends API provides real-time access to Google Trends data, offering insights into the popularity of search terms over time and across regions.

Get Your API Key

Sign in at hasdata.com, go to your account settings, and copy your API key. All requests must include your key in the x-api-key header.

Make Your First Request

curl --request GET \
  --url 'https://api.hasdata.com/scrape/google-trends/search?q=Coffee' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <your-api-key>'

API Parameters

ParameterDefault ValueRequiredDescription
qCoffeeYesSpecify the search term for which you want to retrieve trends data.
geo-NoSpecifies the location for the search. Defaults to Worldwide if not set or empty.
region-NoUsed to get more specific results when using “Interest by region” data type. Other data types do not accept this parameter. The default value depends on the geo location that is set.

Available options:
- country: Country
- region: Subregion
- dma: Metro
- city: City

Note: Not all region options will return results for every geo location.
dataType-NoDefines the type of search to perform.

Available options:
- timeseries: Interest over time (default). Accepts both single and multiple queries per search.
- geoMap: Interest by region. Accepts both single and multiple queries per search.
- relatedTopics: Related topics. Accepts only single query per search.
- relatedQueries: Related queries. Accepts only single query per search.
tz-NoDefines a time zone offset in minutes. The default value is 420 (Pacific Daylight Time (PDT): UTC-7). The valid range for this parameter is from -1439 to 1439.

To calculate the tz value for a specific time zone, you can use the time difference between UTC +0 and the desired time zone.

Examples:
- 420: Pacific Daylight Time (PDT)
- 60: Central European Time (CET)
- -540: Japan Standard Time
cat-NoCategory of the search term. The default value is 0 (“All categories”).
gprop-NoSorts results by a specific property. The default property is Web Search (applied when the gprop parameter is not set or empty).

Available options:
- images: Image Search
- news: News Search
- froogle: Google Shopping
- youtube: YouTube Search
date-NoDefines a date range for the search. Available options:

- now 1-H: Past hour
- now 4-H: Past 4 hours
- now 1-d: Past day
- now 7-d: Past 7 days
- today 1-m: Past 30 days
- today 3-m: Past 90 days
- today 12-m: Past 12 months
- today 5-y: Past 5 years
- all: 2004 - present

You can also specify a custom date range using one of the following formats:

- yyyy-mm-dd yyyy-mm-dd - (e.g. 2021-10-15 2022-05-25) for dates from 2004 to present.
- yyyy-mm-ddThh yyyy-mm-ddThh - (e.g. 2022-05-19T10 2022-05-24T22) for dates with hours within a week range. The hours will be calculated based on the tz (time zone) parameter.