Google News Search API
키워드와 맞는 Google 뉴스 결과를 돌려줍니다. 헤드라인과 매체명, 썸네일, 기사 URL, UTC 기준 정확한 발행 시각이 담깁니다.
GET /v1/google_news/searchGoogle News Search API는 언제 쓰나요
국가와 언어, 기간, 특정 언론사 도메인으로 좁혀 가며 어떤 주제의 보도를 훑을 때 사용하세요.
API 레퍼런스 영문 원문
Returns a unified NewsArticleList of the top Google News results for a keyword, right now: headline, source outlet, thumbnail, article URL, and absolute UTC publish time (a text snippet may be present on some results). Ranked results land in one list: rank is the 1-based position of the row in the list you were served, on every source, and placement distinguishes a Top Stories block when present. source is the outlet name where the provider supplies one and the article's domain otherwise; domain is always the hostname. The keyword supports quoted phrases and boolean operators (AND, OR, NOT). Localize with location_name/location_code/location_coordinate + language_code (non-Latin scripts supported). Filter by recency with time_range, by an exact date window with from/to (YYYY-MM-DD or Unix timestamp; overrides time_range when present), or by outlet with publisher (a bare domain like bbc.com). publisher/from/to cannot be combined with location_coordinate or time_range=hour (clear 400, never billed). There is no pagination beyond depth. This surface returns at most 100 articles per query (default 10). For the full article body, scrape the returned url. Served live from Google News: an ordinary synchronous request.
69개 플랫폼을 병렬로 검색합니다
Search API로 무엇을 할 수 있을까요
Search 엔드포인트가 통합 스키마와 계산 필드를 담은 Google News 데이터를 한 번의 요청으로 보내드려요. 스크래핑 인프라를 직접 만들거나 유지할 필요가 없어요.
요청 예시
# GET /v1/google_news/search: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
# --max-time 38: this endpoint's measured p99 latency x 1.5.
# --retry 3: retries timeouts, 429 and 5xx, honoring Retry-After.
# -o response.json keeps only the final attempt's body.
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
IDEMPOTENCY_KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
curl -sS --max-time 38 --retry 3 -o response.json \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
"https://www.socialcrawl.dev/v1/google_news/search?keyword=openai&depth=20&language_code=en&time_range=day&publisher=bbc.com&from=2026-07-01&to=2026-07-15" && cat response.json# GET /v1/google_news/search: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
import os
import random
import time
import uuid
import requests
API_KEY = os.environ.get("SOCIALCRAWL_API_KEY", "YOUR_API_KEY")
TIMEOUT_S = 38 # this endpoint's measured p99 latency x 1.5.
MAX_RETRIES = 3
URL = "https://www.socialcrawl.dev/v1/google_news/search"
def backoff(attempt):
# Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
return 2 ** attempt * (0.5 + random.random() / 2)
def socialcrawl(params):
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
idempotency_key = str(uuid.uuid4())
for attempt in range(MAX_RETRIES + 1):
try:
res = requests.get(
URL,
params=params,
headers={"x-api-key": API_KEY, "Idempotency-Key": idempotency_key},
timeout=TIMEOUT_S,
)
body = res.json()
except (requests.RequestException, ValueError):
# A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if attempt == MAX_RETRIES:
raise
time.sleep(backoff(attempt))
continue
if body["success"]:
return body
error = body["error"]
# Branch on error["type"], never on the message text.
if error["type"] == "RESOURCE_NOT_FOUND":
return None # refunded: nothing to read
retry_after = res.headers.get("Retry-After")
# SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
permanent = error["type"] == "SERVICE_UNAVAILABLE" and retry_after is None
if not error.get("retryable") or permanent or attempt == MAX_RETRIES:
raise RuntimeError(f"{error['type']}: {error['message']} (request_id {body['request_id']})")
# Retry-After (seconds) wins; otherwise back off.
time.sleep(float(retry_after) if retry_after else backoff(attempt))
params = {
"keyword": "openai",
"depth": "20",
"language_code": "en",
"time_range": "day",
"publisher": "bbc.com",
"from": "2026-07-01",
"to": "2026-07-15",
}
body = socialcrawl(params)
if body is not None:
print(body["data"])// GET /v1/google_news/search: 1 credit per call. Cache hits are free and failed calls are refunded.
// Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
const API_KEY = process.env.SOCIALCRAWL_API_KEY ?? "YOUR_API_KEY";
const TIMEOUT_MS = 38_000; // this endpoint's measured p99 latency x 1.5.
const MAX_RETRIES = 3;
type Page = { next_cursor: string | null; has_more: boolean };
type SocialCrawlResponse =
| { success: true; data: any; pagination?: Page; credits_used: number; request_id: string }
| { success: false; error: { type: string; message: string; retryable: boolean }; request_id: string };
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
// Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
const backoffMs = (attempt: number) => 2 ** attempt * 1000 * (0.5 + Math.random() / 2);
async function socialcrawl(url: URL) {
// One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
const idempotencyKey = crypto.randomUUID();
for (let attempt = 0; ; attempt++) {
let res: Response;
let body: SocialCrawlResponse;
try {
res = await fetch(url, {
headers: {
"x-api-key": API_KEY,
"Idempotency-Key": idempotencyKey,
},
signal: AbortSignal.timeout(TIMEOUT_MS),
});
body = (await res.json()) as SocialCrawlResponse;
} catch (error) {
// A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if (attempt >= MAX_RETRIES) throw error;
await sleep(backoffMs(attempt));
continue;
}
if (body.success) return body;
// Branch on error.type, never on the message text.
if (body.error.type === "RESOURCE_NOT_FOUND") return null; // refunded: nothing to read
const retryAfter = res.headers.get("Retry-After");
// SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
const permanent = body.error.type === "SERVICE_UNAVAILABLE" && retryAfter === null;
if (!body.error.retryable || permanent || attempt >= MAX_RETRIES) {
throw new Error(`${body.error.type}: ${body.error.message} (request_id ${body.request_id})`);
}
// Retry-After (seconds) wins; otherwise back off.
await sleep(retryAfter ? Number(retryAfter) * 1000 : backoffMs(attempt));
}
}
const url = new URL("https://www.socialcrawl.dev/v1/google_news/search");
url.searchParams.set("keyword", "openai");
url.searchParams.set("depth", "20");
url.searchParams.set("language_code", "en");
url.searchParams.set("time_range", "day");
url.searchParams.set("publisher", "bbc.com");
url.searchParams.set("from", "2026-07-01");
url.searchParams.set("to", "2026-07-15");
const body = await socialcrawl(url);
if (body) console.log(body.data);파라미터
| 파라미터 | 필수 | 설명 |
|---|---|---|
| keyword | 예 | Search query (e.g. 'openai'). Supports any language; pass the matching language_code. Advanced operators (site:, intitle:, cache:, …) are not supported. |
| depth | 아니오 | Number of articles to retrieve (default 10, multiples of 10, max 100). The response is cut to exactly this many. No pagination beyond depth. |
| location_code | 아니오 | Google location code (e.g. 2840 = United States: the codes are 2000 + the ISO 3166 numeric code, so small integers are not valid and are rejected). Use one of location_code / location_name / location_coordinate. |
| location_name | 아니오 | Google location name (e.g. 'South Korea'). |
| location_coordinate | 아니오 | GPS target as 'latitude,longitude,radius_mm' (e.g. '40.7128,-74.0060,200') for local-news radius queries. |
| language_code | 아니오 | Google language code (e.g. 'en', 'ko'). Default 'en'. Without a location, en and es get the US edition and most other languages their home edition (bn = Bangladesh, ko = South Korea). Region codes such as pt-BR, zh-TW or zh-Hans are accepted and pick that edition. |
| time_range | 아니오 | Only return articles published within this window: hour, day, week, month, or year. Ignored when from/to is present. Resolution is a calendar DAY on the primary source, so `day` means 'since yesterday', not the last 24 hours; only `hour` is a true rolling window, and it is served by the fallback. (hour | day | week | month | year) |
| publisher | 아니오 | Limit results to a single outlet's domain (e.g. 'bbc.com'). Bare domain only, no scheme, no path. Not combinable with location_coordinate or time_range=hour. |
| from | 아니오 | Start of an exact publish-date window, as YYYY-MM-DD or a Unix timestamp. Overrides time_range. Not combinable with location_coordinate or time_range=hour. |
| to | 아니오 | End of the publish-date window (inclusive), as YYYY-MM-DD or a Unix timestamp. Defaults to now when only from is set. |
| since | 아니오 | Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following `next_cursor`, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`. |
| until | 아니오 | Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`. |
Google News Search API는 무엇을 돌려주나요
모든 응답은 하나의 통합 스키마를 따라요. 크레딧을 쓰기 전에 어떤 필드가 돌아오는지, 실제 응답 본문 그대로 확인해 보세요.
응답 예시 보기
{
"success": true,
"platform": "google_news",
"endpoint": "/v1/google_news/search",
"data": {
"items": [
{
"article": {
"id": "gn_2bb22cdb",
"title": "Parents warned not to publicly share children’s images amid AI abuse risks",
"url": "https://www.bbc.com/news/articles/cd7wj7d0jzzo",
"source": "BBC",
"domain": "www.bbc.com",
"snippet": null,
"image_url": "https://ichef.bbci.co.uk/news/480/cpsprodpb/fef8/live/2a1f8cf0-76f2-11f1-b9cc-bd5880081b3f.jpg.webp",
"published_at": "2026-07-03T07:00:00Z",
"rank": 1,
"placement": "news_search"
}
},
{
"article": {
"id": "gn_ef3fe380",
"title": "See if you can spot an AI deepfake with our test",
"url": "https://www.bbc.com/news/articles/c9d2wgvg55jo",
"source": "BBC",
"domain": "www.bbc.com",
"snippet": null,
"image_url": "https://ichef.bbci.co.uk/news/480/cpsprodpb/6cc3/live/e3048a10-7b7d-11f1-9510-1546718f668b.jpg.webp",
"published_at": "2026-07-11T07:00:00Z",
"rank": 2,
"placement": "news_search"
}
}
],
"total": 20,
"dropped": 0
},
"credits_used": 1,
"request_id": "req_example000000",
"cached": false,
"pagination": {
"next_cursor": null,
"has_more": false,
"page_size": 20
},
"credits_remaining": 9999,
"source": "captured",
"captured_at": "2026-10-02T12:46:48.902Z",
"redacted": true
}통합 응답 구조를 보여 주는 실제 샘플이에요. 필드 값은 조회한 대상에 따라 달라져요.
Google News Search API는 어떻게 동작하나요
API 키와 함께 GET 요청을 보내면, 통합 스키마와 계산 필드를 담은 깔끔한 JSON이 돌아와요.
메서드
GET
응답 형식
JSON
소셜 미디어 데이터를 몇 초 만에 수집하는 방법
개발자를 위한 가장 빠른 소셜 미디어 스크래핑 API. 월간 활성 사용자 100억 명 이상을 포괄하는 69개 플랫폼에서 프로필, 게시물, 댓글, 분석 데이터를 수집하세요.
모든 플랫폼을 하나의 스키마로
동일한 응답 구조로 69개 플랫폼을 조회하세요. 연동은 한 번이면 충분합니다.
단순 수집을 넘어 계산된 필드 제공
엔드포인트가 해당 지표를 지원하고 계산에 필요한 원본 값이 있을 때, 정규화된 레코드에 engagement_rate, estimated_reach, content_category, language를 함께 담아 바로 활용할 수 있습니다.
코드 한 줄 쓰기 전에, 데이터부터
Visual Data Explorer에 URL만 붙여넣으면 결과 카드와 정형화된 테이블, CSV 내보내기를 바로 사용할 수 있습니다.
import requests
response = requests.get(
'https://www.socialcrawl.dev/v1/tiktok/profile',
params={'handle': 'charlidamelio'},
headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json(){
"success": true,
"platform": "tiktok",
"data": {
"author": {
"username": "charlidamelio",
"followers": 152400000
},
"engagement": {
"likes": 12400000000,
"engagement_rate": 0.087
},
"metadata": {
"language": "en",
"content_category": "lifestyle"
}
}
}자주 묻는 질문
API, 요금제, 기능에 대한 질문과 답변입니다.
문의하기구글 뉴스 결과는 API로 어떻게 받나요?
구글 뉴스 검색 API는 어떤 필드를 주나요?
구글 뉴스를 최신순으로 필터링하려면 어떻게 하나요?
가져올 기사 수를 조절할 수 있나요?
구글 뉴스 검색 API 요금은 얼마인가요?
AI에게 SocialCrawl을 물어보세요
Google News Search 데이터, 가져올 준비 되셨어요?
API 키 받고 60초 안에 Google News 데이터를 받아 가세요.
