Google Trends API endpoint
Returns the list of location codes that Google Trends supports, such as `US`, `HK` and `GB`, in `locations`. The Explore endpoints also accept `WORLDWIDE`, which appears in the list. It takes no parameters.
/google/trends/locations| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/google/trends/locations" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"locations": [
"WORLDWIDE",
"US",
"HK",
"GB"
]
}
}Request schema
No body schema
Response schema
#/definitions/trends.trendsLocationsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | trends.TrendsLocationsResponse | No | ||||
| data.locations | array | No | Supported location codes, such as `US`. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/google/trends/locations" \
-H "x-api-key: $CRAWLORA_API_KEY"