Example Requests

These examples show how to send Google News API requests with query, pagination, and raw HTML options.

In this example, we send a simple Google News request searching for articles about AI.

The request specifies:

  • search query (q)

  • language and country targeting (hl, gl)

Request

curl -X GET "https://serp-api.netnut.io/search?engine=google_news&q=ai&hl=en&gl=us" \
  -U "username:password"

Example Response

Example shape — your actual jobId, timestamps, and article data will vary.

{
  "url": "https://www.google.com/search?gl=US&hl=en&q=ai&tbm=nws",
  "general": {
    "searchEngine": "google_news",
    "resultsCount": 13600000,
    "searchTime": 0.76,
    "language": "en",
    "device": "desktop",
    "searchType": "text",
    "pageTitle": "ai - Google Search",
    "timestamp": "2026-04-19T14:13:12.868546494Z",
    "render": false
  },
  "input": {
    "originalUrl": "https://www.google.com/search?gl=US&hl=en&q=ai&tbm=nws",
    "jobId": "36344139-9f78-44f3-8d0c-f0d9f7e2d8ea"
  },
  "newsResults": [
    {
      "title": "Should you really trust health advice from an AI chatbot?",
      "source": "BBC",
      "timeSince": "15 hours ago",
      "link": "https://www.bbc.com/news/articles/clyepyy82kxo",
      "image": "data:image/jpeg;base64,...",
      "description": "So should we trust the likes of ChatGPT, Gemini and Grok? Is using them any different to an old-fashioned internet search?",
      "rank": 1
    },
    {
      "title": "There's an 'art' to writing AI prompts for personal finance, MIT professor says",
      "source": "CNBC",
      "timeSince": "24 hours ago",
      "link": "https://www.cnbc.com/2026/04/18/ai-prompts-personal-finance-advice.html",
      "image": "data:image/jpeg;base64,...",
      "description": "Many people are turning to artificial intelligence for personal finance advice.",
      "rank": 2
    }
  ],
  "pagination": {
    "nextPageLink": "https://www.google.com/search?q=ai&tbm=nws&start=10",
    "nextPageStart": 10,
    "currentPage": 1,
    "nextPage": 2,
    "otherPages": {
      "2": "https://www.google.com/search?q=ai&tbm=nws&start=10",
      "3": "https://www.google.com/search?q=ai&tbm=nws&start=20"
    }
  },
  "pagesProcessed": 1
}

In this response:

  • url is the final Google News search URL used to retrieve the results.

  • general contains metadata about the request, such as language, device, page title, and timestamp.

  • input contains the original request URL and the internal jobId.

  • newsResults contains the parsed news article results.

  • each article object includes fields such as title, source, timeSince, link, image, description, and rank.


Paginated Request

In this example, we retrieve the second page of results by setting start=10.

This is useful for collecting more than the default 10 results returned per page.

Request

Example Response

Example shape — shortened for readability.

In this response:

  • start=10 retrieves the second page of results.

  • pagination now includes both prevPageLink and nextPageLink since the response is not on the first page.


Request with rawHtml=1

In this example, we request the normal parsed JSON response and the raw HTML returned from Google News.

This mode is useful when you want the structured article data while also keeping access to the original page source for debugging, validation, or custom parsing.

Request

Example Response

Example shape — shortened for readability. Your actual response may include more article results and a much longer HTML string.

In this response, the response includes the regular parsed JSON fields:

  • url

  • general

  • input

  • newsResults

  • pagination

In addition, it includes:

  • html — the raw HTML source of the Google News results page

This mode is useful for:

  • validating parsed results against the original source

  • storing both parsed data and page source

  • custom downstream extraction workflows


Request with rawHtml=2

In this example, we request only the raw HTML of the Google News results page.

This mode is useful when you do not need the parsed JSON response and only want the page source.

Request

Example Response

In this response:

  • the API returns only the raw HTML.

  • no parsed JSON fields such as general, input, or newsResults are returned.

This mode is useful for:

  • custom parsers

  • raw source collection

  • debugging page output without parsed normalization

Last updated