Skip to content

Google News API

Query Google News and receive structured, real-time news headlines with source and timestamp.

Endpoint

POST https://serpforai.dev/api/v1/search
GET  https://serpforai.dev/api/v1/search

Authentication is a bearer header carrying your API key:

Authorization: Bearer <userKey>

Set t: "google_news". This is one of five Google vertical engines available on this API - see also Google Images, Google Shopping, Google Videos and Google Short Videos. For general web search use the SERP API.

Request parameters

POST requests send JSON; GET requests send the same fields as query parameters.

FieldTypeRequiredDefaultDescription
sstringyes-The search keyword
tstringyes-Must be google_news
dnumberno5000Maximum time the API may spend, in milliseconds
countrystringno-ISO 3166-1 alpha-2 country code (e.g. us)
htmlnumberno01 includes the raw result-page HTML alongside data, 0 omits it

There is no p (page) parameter for this engine.

Response

{
  "code": 0,
  "msg": "",
  "data": {
    "id": "q_...",
    "news_results": [
      {
        "position": 1,
        "title": "...",
        "source": { "name": "Example News" },
        "link": "https://...",
        "date": "3 hours ago",
        "iso_date": "2024-01-01T00:00:00.000Z",
        "snippet": "..."
      }
    ]
  }
}
FieldDescription
code0 means success; anything else is a failure
msgHuman readable failure reason, empty on success
data.idOpaque search-session id
data.news_results[]News rows - position, title, source.name, link, date, iso_date, snippet

Unlike bing/google, data here is an object, not a bare array - read data.news_results, not data directly. Prefer iso_date over the human-readable date string for sorting or freshness checks.

Example

curl -X POST https://serpforai.dev/api/v1/search \
  -H "Authorization: Bearer $SERPFORAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"s":"ai regulation","t":"google_news","country":"us"}'
import httpx

response = httpx.post(
    "https://serpforai.dev/api/v1/search",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"s": "ai regulation", "t": "google_news", "country": "us"},
    timeout=30,
)
payload = response.json()
for row in payload["data"]["news_results"]:
    print(row["title"], row["source"]["name"])