Google 검색 API
Google 검색의 오가닉 결과, 광고, 관련 검색어, 지식 그래프 등을 가져옵니다. engine=google을 설정하고 검색어 문자열을 전달하면 캡차 및 봇 차단 보호를 우회한 구조화된 결과를 받을 수 있습니다.
Endpoint
섹션 제목: “Endpoint” GET https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY
Parameters
섹션 제목: “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | SERP API 키 |
engine | string | yes | google이어야 함 |
q | string | yes | 검색어 |
cookie | string | no | 요청에 사용할 커스텀 쿠키. URL 인코딩 필요 |
tbm | string | no | 검색 버티컬: isch(이미지), vid(동영상), nws(뉴스), shop(쇼핑) |
sort_by | string | no | 결과 정렬 기준: relevance 또는 date |
time_period | string | no | last_hour, last_day, last_week, last_month, last_year, 또는 custom |
time_period_min | string | no | time_period=custom일 때의 최소 날짜. 형식은 MM/DD/YYYY |
time_period_max | string | no | time_period=custom일 때의 최대 날짜. 형식은 MM/DD/YYYY |
flatten_results | int | no | 결과를 평탄화하려면 1, 아니면 0 |
empty_results | int | no | 빈 결과를 숨기려면 0, 표시하려면 1 |
device | string | no | desktop, mobile, 또는 tablet |
location | string | no | 지오타겟팅 위치 이름 |
google_domain | string | no | 사용할 Google 도메인 (예: google.co.uk) |
uule | string | no | Google 인코딩 위치 문자열 |
lr | string | no | 언어 제한, 형식 lang_xx |
hl | string | no | 인터페이스 언어 코드 |
gl | string | no | 국가 코드 |
start | int | no | 페이지네이션을 위한 결과 오프셋 |
num | int | no | 페이지당 결과 수 |
ijn | int | no | Google 이미지 페이지 번호 (페이지당 이미지 100개) |
safe | string | no | 세이프서치: active 또는 off |
filter | int | no | 유사 및 생략된 결과 필터: 1은 켜짐, 0은 꺼짐 |
nfpr | int | no | 자동 수정된 검색어를 제외하려면 1, 아니면 0 |
tbs | string | no | 고급 검색 매개변수 (특허, 날짜 등) |
ludocid | string | no | Google 비즈니스 프로필 CID (Place ID) |
lsig | int | no | 지식 그래프 지도 보기를 강제 실행 |
Example request
섹션 제목: “Example request”curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=history"import requests
params = { "engine": "google", "api_key": "YOUR_API_KEY", "q": "history",}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', api_key: 'YOUR_API_KEY', q: 'history',});const data = await (await fetch(url)).json();Example response
섹션 제목: “Example response”{ "search_metadata": { "id": "...", "status": "Success", "created_at": "2024-01-01T00:00:00Z" }, "search_parameters": { "engine": "google", "q": "history", "google_domain": "google.com", "device": "desktop" }, "search_information": { "total_results": 10500000000, "time_taken_displayed": 0.52 }, "organic_results": [ { "position": 1, "title": "History - Wikipedia", "link": "https://en.wikipedia.org/wiki/History", "displayed_link": "https://en.wikipedia.org > wiki > History", "snippet": "History is the systematic study of the past..." } ], "related_searches": [ { "query": "world history" } ], "pagination": { "current": 1, "next": "..." }}