serpix

google-news-api

Google News API

The News tab of a Google search as structured JSON: which articles ranked for a query, who published them, and when. One credit per page.

Endpoint

GET/v1/news
bash
curl "https://api.serpix.io/v1/news?q=nvidia&hl=en&gl=us" \
  -H "Authorization: Bearer $SERPIX_API_KEY"

The same parameters are accepted as a JSON body on POST /v1/news:

post variant
curl -X POST "https://api.serpix.io/v1/news" \
  -H "Authorization: Bearer $SERPIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "nvidia", "hl": "en", "gl": "us"}'

Parameters

Parameters
fieldtypedescription
qrequiredstringThe search query. Google's operators work inside it.
glstringCountry to search as, two letters. Defaults to the country of location when one is set, otherwise us.
hlstringInterface language, two letters.
devicedesktop | mobileWhich layout Google serves.
pageinteger1-based page number. Page 2 is the next ten articles.
locationstringCity-level place the search is made from, like Austin. The canonical name it resolves to is echoed back as search_parameters.location_used.
time_rangeh | d | w | m | yOnly articles from the past hour, day, week, month, or year.

Operators

Google's search operators work inside q. To follow one outlet, put a site: on it:

one outlet
# one outlet
curl "https://api.serpix.io/v1/news?q=nvidia+site:reuters.com" \
  -H "Authorization: Bearer $SERPIX_API_KEY"

Rejected parameters

Unknown parameters are never silently ignored. A request carrying one is rejected with 422 before any search runs, so a typo can't bill you for results you didn't ask for. Parameters from other SERP APIs get a pointed message naming the equivalent here:

Rejected aliases
fieldtypedescription
topic422Not supported. This endpoint answers a query.
publication422Put it in the query: q=nvidia site:reuters.com.
story_token422Not supported.
ceid422Use gl and hl.
when422Use time_range.
num422One page of about ten articles per request. Paginate with page.
start422Use page, a 1-based page number, instead of a result offset.
tbm422Not needed. This endpoint is the News tab.
google_domain422Searches run on google.com. Set the country and language with gl and hl.
api_key422Authenticate with the Authorization: Bearer header.
422 · rejected parameter
HTTP/1.1 422 Unprocessable Entity

{
  "detail": "`topic` is not supported: not supported — this endpoint answers a query, not a feed"
}

Response

A search returns one JSON object: two envelope objects that are always present, then the articles. A field Google didn't serve is omitted entirely, never null, never [].

Top level
fieldtypedescription
search_metadataobjectRequest id, status, timing, parser version, and the exact Google URL fetched.
search_parametersobjectThe vantage point this capture was taken from, so it can be run again the same way.
news_resultsarrayThe articles, in the order Google ranked them.
paginationobjectThe current page and the URL of the next one.
GET /v1/news?q=nvidia
{
  "search_metadata": {
    "id": "srx_6-Z531iRST1L67tZ",
    "status": "success",
    "created_at": "2026-08-13T14:22:07Z",
    "took_ms": 794,
    "parser_version": "2026.08.19",
    "google_url": "https://www.google.com/search?q=nvidia&tbm=nws&hl=en&gl=us"
  },
  "search_parameters": {
    "q": "nvidia",
    "gl": "us",
    "hl": "en",
    "device": "desktop",
    "page": 1
  },
  "news_results": [
    {
      "position": 1,
      "title": "Nvidia lines up $500 billion in financing as CEO Jensen Huang tells CNBC his chips are 'investable asset'",
      "link": "https://www.cnbc.com/2026/08/10/nvidia-wall-street-asset-managers-500-billion-ai-push.html",
      "source": "CNBC",
      "date": "2 days ago"
    },
    {
      "position": 2,
      "title": "India's Larsen and Toubro secures AI data centre order worth up to $1.57 billion",
      "link": "https://www.reuters.com/world/india/indias-larsen-toubro-secures-order-build-ai-factory-nvidia-2026-08-13/",
      "source": "Reuters",
      "snippet": "India's Larsen and Toubro on Thursday said it had secured an order worth up to 150 billion rupees ($1.57 billion) from a US-based cloud...",
      "date": "8 hours ago"
    }
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.google.com/search?q=nvidia&tbm=nws&hl=en&gl=us&start=10"
  }
}

Articles

One entry per ranked article. link is the publisher's own URL, not a Google redirect, so it can be fetched or stored directly.

NewsArticle
fieldtypedescription
positionintegerRank on this page, starting at 1.
titlestringThe headline, as displayed.
linkstringThe article on the publisher's site.
sourcestringThe publisher, as the card names it.
snippetstringThe article's description. Present on a standalone article, absent on one Google has grouped into a story cluster.
datestringHow long ago it was published, as displayed (2 days ago, 21 minutes ago).

Pagination

Ask for page 2 with page=2. next is absent on the last page.

NewsPagination
fieldtypedescription
currentintegerThe page this response is for.
nextstringGoogle's URL for the following page. Absent on the last page.

Nothing matched

A query Google has no articles for returns 200 with news_results absent. It is a real answer and it is charged as one.

200 · no articles
{
  "search_metadata": { "id": "srx_9pQ2mK4vTn8x", "status": "success", "...": "..." },
  "search_parameters": { "q": "zzqxwv nonexistent", "gl": "us", "hl": "en", "device": "desktop", "page": 1 },
  "pagination": { "current": 1 }
}

Envelope

SearchMetadata
fieldtypedescription
idstringRequest id. Quote it in support.
statusstringAlways success on a 200.
created_atstringWhen the search ran, ISO 8601 UTC.
took_msintegerTotal time for the fetch and parse.
parser_versionstringThe parser build that produced this response.
google_urlstringThe exact URL fetched.
html_urlstringArchived raw HTML for this search, when archiving is on.
json_urlstringArchived JSON for this search, when archiving is on.
NewsParameters
fieldtypedescription
qstringThe query that was searched.
glstringThe country actually used, after defaults were applied.
hlstringThe interface language used.
devicestringThe layout requested.
pageintegerThe page requested.
location_requestedstringThe place name as you sent it.
location_usedstringThe canonical place it resolved to.

Errors

You are charged for results, not for failures. A blocked page, a transport error, or a page we captured but could not read all cost nothing.

Status codes
fieldtypedescription
200chargedArticles returned, or Google matched none.
402freeNot enough credits. Nothing was fetched.
422freeThe request was rejected before any search ran.
502freeThe page was captured but could not be read.
503freeGoogle blocked the capture. Retry, a different session is used.
502 · charged nothing
HTTP/1.1 502 Bad Gateway
X-Serpix-Credits-Charged: 0

{
  "error": { "code": "search_failed", "message": "the page could not be parsed" }
}