Google Search API
Google Search API를 사용하면 웹 검색을 수행하고 구조화된 결과를 받을 수 있습니다. 여러 검색 유형, 지역 타겟팅, 기기 에뮬레이션 및 두 가지 결과 심층 모드를 지원합니다.
엔드포인트
Bash
POST https://api.scavio.dev/api/v1/google헤더
| 헤더 | 값 | 필수 |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | 예 |
Content-Type | application/json | 예 |
요청 본문
| 매개변수 | 타입 | 기본값 | 설명 |
|---|---|---|---|
query | string | -- | 필수. 검색어 (1-500자). |
search_type | string | classic | 다음 중 하나: classic, news, maps, images, lens |
country_code | string | -- | ISO 3166-1 alpha-2 국가 코드 (예: us, gb, de). 전체 목록 보기. |
language | string | -- | ISO 639-1 언어 코드 (예: en, fr, es) |
page | number | 1 | 결과 페이지 번호 (1부터 시작) |
device | string | desktop | desktop 또는 mobile. 뉴스 검색은desktop만 지원합니다. |
nfpr | boolean | false | true로 설정하면 검색어 자동 수정을 비활성화합니다. |
light_request | boolean | 생략됨 (라이트) | 생략하면 라이트 모드 (1 크레딧). false로 설정하면 지식 그래프, 관련 검색 등을 포함한 전체 결과 (2 크레딧)를 얻습니다. |
크레딧 비용
| 시나리오 | 크레딧 |
|---|---|
light_request 생략 또는 전송되지 않음 | 1 |
{"light_request": false} | 2 |
최소 예제
curl -X POST 'https://api.scavio.dev/api/v1/google' \
-H 'Authorization: Bearer sk_live_your_key' \
-H 'Content-Type: application/json' \
-d '{"query": "Scavio search API"}'전체 예제 (모든 매개변수 포함)
curl -X POST 'https://api.scavio.dev/api/v1/google' \
-H 'Authorization: Bearer sk_live_your_key' \
-H 'Content-Type: application/json' \
-d '{
"query": "AI startups funding",
"search_type": "news",
"country_code": "us",
"language": "en",
"page": 1,
"device": "desktop",
"nfpr": false,
"light_request": false
}'제약 사항
search_type이news인 경우device는desktop만 허용됩니다.mobile을 보내면 400 오류가 반환됩니다.- 잘못된
search_type값 (예:shopping,ai_mode)은 400 유효성 검사 오류를 반환합니다. device는desktop또는mobile만 허용합니다.tablet은 지원되지 않습니다.
응답 형식
모든 성공적인 응답은 JSON 객체를 반환합니다. 일부 필드는 항상 존재하는 반면, 다른 필드는 비어 있지 않을 때만 나타납니다 (일반적으로 전체 모드에서).
핵심 필드 (항상 존재)
| 필드 | 타입 | 설명 |
|---|---|---|
results | array | 자연 검색 결과 객체 배열 |
results[].title | string | 검색 결과 페이지의 제목 |
results[].url | string | 결과의 전체 URL |
results[].content | string | 페이지의 스니펫 또는 메타 설명 |
results[].position | number | 결과에서의 위치 (1부터 시작) |
query | string | 실행된 검색어 |
page | number | 반환된 페이지 번호 |
country_code | string | 검색에 사용된 국가 코드 |
language | string | 검색에 사용된 언어 코드 |
response_time | number | 서버 측 응답 시간 (밀리초) |
credits_used | number | 소비된 크레딧 수 (1 또는 2) |
credits_remaining | number | 현재 결제 기간에 남은 크레딧 |
선택적 필드 (비어 있지 않을 때 나타남)
이들은 일반적으로 전체 모드 ({"light_request": false})에서 반환되지만, 데이터가 있을 경우 라이트 모드에서도 나타날 수 있습니다.
| 필드 | 타입 | 설명 |
|---|---|---|
top_stories | array | 최고 기사 캐러셀 항목 |
news_results | array | title, link, source, snippet, date, relative_date, domain, position이 포함된 뉴스 기사 |
knowledge_graph | object | title, subtitle, factoids 배열이 포함된 지식 패널 |
questions | array | "함께 묻는 질문": question 및 answer |
related_searches | array | 관련 검색어: 각각 query, link, type, position |
total_results | number | 검색어의 예상 총 결과 수 |
search_url | string | 해당 검색어의 원래 검색 엔진 URL |
라이트 모드 응답 예제
JSON
{
"results": [
{
"title": "Scavio - Search API for Developers",
"url": "https://scavio.dev",
"content": "One API to search every platform. Structured JSON results.",
"position": 1,
"displayed_url": "https://scavio.dev",
"domain": "scavio.dev",
"date": null,
"rich_snippet": {},
"sitelinks": []
}
],
"query": "Scavio search API",
"page": 1,
"country_code": "us",
"language": "en",
"response_time": 450,
"credits_used": 1,
"credits_remaining": 999
}전체 모드 응답 예제
JSON
{
"results": [
{
"title": "Scavio - Search API for Developers",
"url": "https://scavio.dev",
"content": "One API to search every platform. Structured JSON results.",
"position": 1,
"displayed_url": "https://scavio.dev",
"domain": "scavio.dev",
"date": null,
"rich_snippet": {},
"sitelinks": []
}
],
"query": "Scavio search API",
"page": 1,
"country_code": "us",
"language": "en",
"response_time": 620,
"total_results": 1250000,
"search_url": "https://www.google.com/search?q=...",
"knowledge_graph": {
"title": "Scavio",
"subtitle": "Search API Platform",
"factoids": [
{ "title": "Type", "content": "Developer API" }
]
},
"related_searches": [
{ "query": "scavio api pricing", "link": null, "type": null, "position": 0 },
{ "query": "scavio search api docs", "link": null, "type": null, "position": 1 }
],
"questions": [
{
"question": "What is Scavio?",
"answer": "Scavio is a multi-platform search API..."
}
],
"credits_used": 2,
"credits_remaining": 998
}뉴스 결과 예제
search_type이 news인 경우 news_results 필드가 채워집니다:
JSON
{
"news_results": [
{
"title": "AI Startups Raise Record Funding in Q1 2026",
"link": "https://example.com/ai-funding",
"source": "TechCrunch",
"snippet": "AI companies raised over $15B in Q1 2026...",
"date": "2026-03-31T20:00:00.000Z",
"relative_date": "2 hours ago",
"domain": "techcrunch.com",
"position": 1
}
]
}참고 사항
results배열은 관련성 순으로 정렬됩니다 (위치 1이 가장 관련성 높음).- 선택적 필드는 비어 있지 않을 때만 존재합니다. 접근하기 전에 항상 존재 여부를 확인하세요.
- 라이트 모드 (1 크레딧)는 핵심 결과를 반환합니다. 전체 모드 (2 크레딧)는 모든 선택적 필드를 포함할 수 있습니다.
관련 항목
- YouTube API -- 검색 및 메타데이터
- Amazon API -- 제품 검색 및 상세 정보
- 국가 코드 -- 지원되는 국가 코드
- 오류 -- 오류 코드 및 처리