Google Trends API endpoint
Returns the top-level Google Trends categories as id and name pairs, such as 0 for All and 20 for Sports. These are the ids accepted by the Trending Now category filter.
/google/trends/categories| Field | Filled in, of 26 checked | Values in the sample |
|---|---|---|
| id | 26 | |
| name | 26 | “All” and 25 other values |
| 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/categories" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"categories": [
{
"id": 0,
"name": "All"
},
{
"id": 20,
"name": "Sports"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/trends.trendsCategoriesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | trends.TrendsCategoriesResponse | No | ||||
| data.categories | array | No | Supported Trends categories, each with an ID and name. | |||
| data.categories[].id | integer | No | 0 | Trends category ID. Pass it as `category`. | ||
| data.categories[].name | string | No | All | Category name, such as `All`. | ||
| 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/categories" \
-H "x-api-key: $CRAWLORA_API_KEY"