JustSERPDocs
Google

Google Trends

For a keyword (`q`), its related queries and topics; for a region with no keyword (`geo` alone), what is trending there now.

GET
/v1/google/trends

For a keyword (q), its related queries and topics; for a region with no keyword (geo alone), what is trending there now. An Explore page that found nothing is a valid answer with empty lists.

Under the document-form parameters (q with up to five keywords, data_type TIMESERIES, GEO_MAP, RELATED_QUERIES or RELATED_TOPICS, geo, time, cat, gprop, tz, region) the answer is the document with the block of the data_type (interest_over_time, interest_by_region, related_queries, related_topics). $1 request $2 date, or with geo alone, is the call above. What is trending now, in the document form, is /v1/google/trends/trending-now.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
q?|

The keyword. Sent: its related queries and topics. Left out: the region's trending searches.

geo?|

ISO 3166-1 alpha-2, or a sub-region (US-CA). Required without q.

date?string

Explore's time range, e.g. today 12-m, now 7-d.

hl?string

Leave at en.

Default"en"
data_type?string

Any case.

Default"TIMESERIES"
Value in"TIMESERIES""GEO_MAP""RELATED_TOPICS""RELATED_QUERIES"
time?string

now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all, or YYYY-MM-DD YYYY-MM-DD (YYYY-MM-DDTHH for hours).

Default"today 12-m"
cat?string

Google's category id. Alone (no q) it is that category's interest.

Default"0"
region?string

The resolution of GEO_MAP; default CITY with a geo, else COUNTRY.

Value in"COUNTRY""REGION""DMA""CITY"
gprop?string

Empty is web search.

Default""
Value in"""images""news""froogle""youtube"
tz?integer

Minutes from UTC.

Range-1439 <= value <= 1439
Default420

Response Body

The keyword's related queries and topics, or the region's trending searches; with the document-form parameters, the document.

application/json
  1. response

An Explore page that found nothing is a valid answer with empty lists.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

query?string|null
geo?string|null
trending_searches?array<>

The "Related queries" widget.

related_topics?array<>

The "Related topics" widget. Often empty.

total_results?integer
Example Request
curl -X GET 'https://api.justserp.com/v1/google/trends?q=pizza&geo=US&date=today+12-m'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "query": "string",  "geo": "string",  "trending_searches": [    {      "position": 0,      "query": "string",      "value": "string",      "is_breakout": true,      "growth_percent": 0,      "link": "string"    }  ],  "related_topics": [    {      "position": 0,      "query": "string",      "value": "string",      "is_breakout": true,      "growth_percent": 0,      "link": "string"    }  ],  "total_results": 0}