SerpBase

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.

POSThttps://api.serpbase.dev/google/news/search
1 creditOpen in Playground

Example

BASH
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"}'
Response · real, shortened
{
  "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

qrequired
string
Search query string.
hl
string
Language code.
More

Defaults to en.

gl
string
Country code.
More

Defaults to us.

page
number
1-based page number.
More

Defaults to 1.

format
"json" | "markdown"
json (default) returns the parsed result.
More

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.

timeout
number
How many seconds you will wait, 1 to 30 (decimals allowed).
More

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.

query
string
Example: "semiconductor supply"

Source 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.

query
required
string

required

Normalized query from the request.

page
required
number

required

Current 1-based page number.

news
optional
NewsResult[]

When news results are parsed.

Google News results.

NewsResult Result item schema

rank
required
number

required

1-based place of the item within its own module (the 3rd organic result has rank 3).

position
optional
number (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.

title
required
string

required

Result title.

link
required
string

required

Primary link returned by the parser.

url
optional
string

Present for normalized result links.

Canonical target URL, usually the same value as link.

source_url
optional
string

Only when Google redirect/source URL is observed.

Original Google URL kept for debugging and provenance.

display_url
optional
string

When Google display text or a domain can be derived.

Display URL or source domain.

source
optional
string

When publisher text is parsed.

Publisher/source label.

time
optional
string

When Google exposes time text.

Raw published time text.

published_at
optional
string

Alias for parsed time when available.

Normalized published time alias.

snippet
optional
string

When a snippet is parsed.

Article summary snippet.

thumbnail_url
optional
string

When Google exposes a thumbnail.

Thumbnail URL.

thumbnail
optional
string

Alias 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 request
1020No credits leftTop up
1029Over your requests per secondWait Retry-After seconds
1502 · 1504The source could not be read this timeRetry
All status codes →