Google Trends Compared Breakdown By Region API
When a Google Trends search contains compared breakdown by region chart results, they are parsed and exist within the compared_breakdown_by_region
array in the JSON output. Compared breakdown by region can contain geo
, coordinates
, location
, max_value_index
and values
array which contains query
, value
, and extracted_value
.
Compared breakdown by region chart accepts only multiple queries per search.
API Parameters
region
Optional
Parameter is used for getting more specific results when using 'Compared breakdown by region' and 'Interest by region' data_type charts. Other data_type charts do not accept region parameter. The default value depends on the geo location that is set. Available options:COUNTRY
- CountryREGION
- SubregionDMA
- MetroCITY
- City
Not all region options will return results for every geo location.
API Examples
Example with q: coffee,milk,bread,pasta,steak
{
"compared_breakdown_by_region": [
{
"geo": "SG",
"location": "Singapore",
"max_value_index": 0,
"values": [
{
"query": "coffee",
"value": "43%",
"extracted_value": 43
},
{
"query": "milk",
"value": "25%",
"extracted_value": 25
},
{
"query": "bread",
"value": "16%",
"extracted_value": 16
},
...
]
},
{
"geo": "IT",
"location": "Italy",
"max_value_index": 3,
"values": [
{
"query": "coffee",
"value": "5%",
"extracted_value": 5
},
{
"query": "milk",
"value": "3%",
"extracted_value": 3
},
{
"query": "bread",
"value": "2%",
"extracted_value": 2
},
...
]
},
{
"geo": "AU",
"location": "Australia",
"max_value_index": 0,
"values": [
{
"query": "coffee",
"value": "38%",
"extracted_value": 38
},
{
"query": "milk",
"value": "21%",
"extracted_value": 21
},
{
"query": "bread",
"value": "17%",
"extracted_value": 17
},
...
]
},
...
]
}
Example with q: coffee,milk,bread,pasta,steak
and region: CITY
{
"compared_breakdown_by_region": [
{
"coordinates": {
"lat": 53.768138,
"lng": -0.600799
},
"location": "South Cave",
"max_value_index": 1,
"values": [
{
"query": "coffee",
"value": "25%",
"extracted_value": 25
},
{
"query": "pizza",
"value": "40%",
"extracted_value": 40
},
{
"query": "milk",
"value": "13%",
"extracted_value": 13
},
...
]
},
{
"coordinates": {
"lat": 50.415497,
"lng": -5.073719
},
"location": "Newquay",
"max_value_index": 1,
"values": [
{
"query": "coffee",
"value": "27%",
"extracted_value": 27
},
{
"query": "pizza",
"value": "40%",
"extracted_value": 40
},
{
"query": "milk",
"value": "14%",
"extracted_value": 14
},
...
]
},
{
"coordinates": {
"lat": 54.7582068,
"lng": -5.7115538
},
"location": "Whitehead",
"max_value_index": 1,
"values": [
{
"query": "coffee",
"value": "30%",
"extracted_value": 30
},
{
"query": "pizza",
"value": "36%",
"extracted_value": 36
},
{
"query": "milk",
"value": "12%",
"extracted_value": 12
},
...
]
},
...
]
}