Google News

This document provides information about the Google News API and the available parameters.

The Google News API enables retrieval of Google News search results and returns structured JSON output.

It supports news search queries with filters such as language, geographic location, and pagination.

API Setup

Endpoint

https://serp-api.netnut.io/search

Authentication

Use HTTP Basic Authentication:

Authorization: Basic <base64(username:password)>

Where <base64(username:password)> is the Base64-encoded string of your NetNut credentials.

Request Format

The request is sent as a GET request. All parameters are passed directly in the URL query string.

Example Request

https://serp-api.netnut.io/search?engine=google_news&q=ai&hl=en&gl=us&start=20&rawHtml=1

Request Parameters

Field
Type
Description
Parameter Type

engine

string

Search engine to use. For this product, use google_news.

Required

q

string

Search query or topic for the news search.

Required

hl

string

Language of the Google News results. Example: en.

Optional

gl

string

Geographic location for the search results. Example: us.

Optional

start

integer

Pagination offset. Use multiples of 10 to retrieve subsequent pages. Example: 10, 20.

Optional

rawHtml

integer

Controls whether raw HTML is returned. 1 = return parsed JSON + HTML, 2 = return HTML only.

Optional

Code Examples

Response Format

The Google News API returns structured JSON.

No HTML is returned by default. When rawHtml=1, the response includes both the parsed JSON and the raw HTML. When rawHtml=2, the response returns only the raw HTML.

Example JSON Response

Last updated