Google Trends API
Google Trends에서 과거 및 현재의 검색 인기도 데이터를 가져옵니다. engine=google_trends를 설정하고, q에 하나 이상의 검색어를 전달하며, 선택적으로 geo, date, cat으로 요청 범위를 지정할 수 있습니다.
Endpoint
섹션 제목: “Endpoint” GET https://serp.shifter.io/v1?engine=google_trends&api_key=YOUR_API_KEY
Parameters
섹션 제목: “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | 사용자의 SERP API 키 |
engine | string | yes | google_trends여야 합니다 |
q | string | yes | 검색어입니다. 여러 검색어는 쉼표로 구분할 수 있습니다 |
geo | string | no | 위치 코드입니다. 기본값은 worldwide입니다. geo 파라미터 옵션 목록을 참조하세요 |
region | string | no | country, city, subregion, 또는 metro 중 하나입니다. compared_breakdown_by_region에 적용됩니다 |
date | string | no | YYYY-MM-DD YYYY-MM-DD 범위이거나, now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 5-y, all 중 하나입니다 |
cat | string | no | 카테고리 ID입니다. 카테고리 목록을 참조하세요 |
Example request
섹션 제목: “Example request”curl "https://serp.shifter.io/v1?engine=google_trends&api_key=YOUR_API_KEY&geo=US&q=american%20football&date=2021-01-01%202022-01-01"import requests
params = { "engine": "google_trends", "api_key": "YOUR_API_KEY", "geo": "US", "q": "american football", "date": "2021-01-01 2022-01-01",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google_trends', api_key: 'YOUR_API_KEY', geo: 'US', q: 'american football', date: '2021-01-01 2022-01-01',});const data = await (await fetch(url)).json();Example response
섹션 제목: “Example response”{ "search_parameters": { "engine": "google_trends", "q": "american football", "geo": "US", "date": "2021-01-01 2022-01-01" }, "interest_over_time": { "timeline_data": [ { "date": "Jan 3 - 9, 2021", "timestamp": "1609632000", "values": [ { "query": "american football", "value": "100", "extracted_value": 100 } ] } ], "averages": [ { "query": "american football", "value": 68 } ] }, "interest_by_region": [ { "geo": "US-FL", "location": "Florida", "value": "100" } ], "related_queries": { "top": [ { "query": "nfl scores", "value": "100" } ], "rising": [ { "query": "nfl playoffs", "value": "Breakout" } ] }}