API reference · Search engines
Google News Search
Google News API: search Google News by keyword, country and language, and get each story's title, link, source, publish time, snippet and image as JSON.
Example
curl -X POST 'https://api.serpbase.dev/google/news/search' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"query":"semiconductor supply"}'{
"status": 0,
"credits_charged": 1,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_news_search",
"query": "semiconductor supply",
"news": [
{
"display_link": "www.photonics.com",
"display_url": "www.photonics.com",
"link": "https://www.photonics.com/Videos/Americas-Future-in-the-Semiconductor-Supply/p5/v1209",
"position": 1,
"published_at": "1 day ago",
"rank": 1,
"snippet": "A few years ago, chip shortages elevated semiconductors from an industry focus to a mainstream issue…",
"source": "Photonics Spectra",
"source_url": "https://www.google.com/goto?url=CAESkAEB6zswFS9aNci69N4BJmkMPL7tZQU1fNIELxsBqciv5d7pyJ8XDDv_iQSHpW5Z…",
"thumbnail": "data:image/webp;base64,UklGRjAFAABXRUJQVlA4ICQFAAAQGwCdASpcAFwAP2lw2m0zpDOzlcJwLQlAGc2bnfAcjmy+3g7x9…",
"thumbnail_url": "data:image/webp;base64,UklGRjAFAABXRUJQVlA4ICQFAAAQGwCdASpcAFwAP2lw2m0zpDOzlcJwLQlAGc2bnfAcjmy+3g7x9…",
"time": "1 day ago",
"title": "America’s Future in the Semiconductor Supply Chain – With Shankaran Janardhanan, GlobalFoundries",
"url": "https://www.photonics.com/Videos/Americas-Future-in-the-Semiconductor-Supply/p5/v1209"
},
{
"display_link": "id.usembassy.gov",
"display_url": "id.usembassy.gov",
"link": "https://id.usembassy.gov/u-s-department-of-state-hosts-regional-workshop-on-semiconductor-supply-cha…",
"position": 2,
"published_at": "6 days ago",
"rank": 2,
"snippet": "The U.S. Department of State hosted the Semiconductor Supply Chain Security Regional Workshop in Bal…",
"source": "U.S. Embassy & Consulates in Indonesia (.gov)",
"source_url": "https://www.google.com/goto?url=CAESqwEB6zswFZJCN2RCRDpDzvB_xD6KEt-kHZsRp1I9vrQEUCaUBC1peIvoCIlrKt-Z…",
"thumbnail": "data:image/webp;base64,UklGRpgEAABXRUJQVlA4IIwEAADQGQCdASpcAFwAP2ls2m0zpDOzljJwLQljAMq69vXa24+x+Y/Da…",
"thumbnail_url": "data:image/webp;base64,UklGRpgEAABXRUJQVlA4IIwEAADQGQCdASpcAFwAP2ls2m0zpDOzljJwLQljAMq69vXa24+x+Y/Da…",
"time": "6 days ago",
"title": "U.S. Department of State Hosts Regional Workshop on Semiconductor Supply Chain Security",
"url": "https://id.usembassy.gov/u-s-department-of-state-hosts-regional-workshop-on-semiconductor-supply-cha…"
}
],
"page": 1,
"search_type": "news"
}Parameters
qrequiredhlMore
Defaults to en.
glMore
Defaults to us.
pageMore
Defaults to 1.
formatMore
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
timeoutMore
Optional; without it the platform spends up to 30 seconds. With it, retries on other routes start earlier so an answer can still arrive inside your budget, and when the budget runs out the request ends with status 1504 and is not charged, instead of being cut off by your HTTP client. Keep your client's own timeout above this value.
querySource and time are parsed from compact Google metadata text, so clients should treat both as optional.
What comes back
Fields that are not on the page for a given request are left out rather than sent empty.
querystringrequired
Normalized query from the request.
pagenumberrequired
Current 1-based page number.
newsNewsResult[]When news results are parsed.
Google News results.
NewsResult Result item schema
ranknumberrequired
1-based place of the item within its own module (the 3rd organic result has rank 3).
positionnumber (integer)On every item and module of Google web search except the plain-text lists related_searches and people_also_search_for; elsewhere when available.
Where the item's module sits on the results page: its block number from the top (1 = first). Each organic result is one block and every other module one block, so all items of a module share its number. Use rank for the order within a module. On products that show a single list, position equals rank.
titlestringrequired
Result title.
linkstringrequired
Primary link returned by the parser.
urlstringPresent for normalized result links.
Canonical target URL, usually the same value as link.
source_urlstringOnly when Google redirect/source URL is observed.
Original Google URL kept for debugging and provenance.
display_urlstringWhen Google display text or a domain can be derived.
Display URL or source domain.
sourcestringWhen publisher text is parsed.
Publisher/source label.
timestringWhen Google exposes time text.
Raw published time text.
published_atstringAlias for parsed time when available.
Normalized published time alias.
snippetstringWhen a snippet is parsed.
Article summary snippet.
thumbnail_urlstringWhen Google exposes a thumbnail.
Thumbnail URL.
thumbnailstringAlias for thumbnail_url when available.
Normalized thumbnail alias.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry