# News Search

The `google_search` source is designed to retrieve Google Search results (SERPs). This sub-page specifically presents data related to Google News Search. To explore other result types, read here: [**Web Search**](https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/search/broken-reference/README.md), [**Image Search**](https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/search/broken-reference/README.md).

{% hint style="warning" %}
To scrape Google News search, include the `context:udm` parameter with value set to `12` or `context:tbm` parameter with the value set to `nws`.
{% endhint %}

{% hint style="info" %}
Explore output [**data dictionary**](#data-dictionary) for each News SERP feature, offering a brief description, screenshot, parsed JSON code snippet, and a table defining each parsed field. Navigate through the details using the right-side navigation or scrolling down the page.
{% endhint %}

## Request samples

In the examples below, we make a request to obtain News search result pages for the search term `adidas`.

### udm

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_search",
        "query": "adidas",
        "parse": true,
        "context": [
            {
                "key": "udm",
                "value": "12"
            }
        ]
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'google_search',
    'query': 'adidas',
    'parse': True,
    'context': [
        {'key': 'udm', 'value': '12'},
    ],
}

# Get response.
response = requests.post(
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "google_search",
    query: "adidas",
    parse: true,
    context: [
        { key: "udm", value: "12" },
    ],
};

const options = {
    hostname: "realtime.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="HTTP" %}

```http
source=google_search&query=adidas&parse=true&context[0][key]=udm&context[0][value]=12&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'google_search',
    'query' => 'adidas',
    'parse' => true,
    'context' => [
        [
            'key' => 'udm',
            'value' => '12',
        ]
    ]
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");


$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "USERNAME"
	const Password = "PASSWORD"

	payload := map[string]interface{}{
		"source": "google_search",
		"query":  "adidas",
		"parse":  true,
		"context": []map[string]interface{}{
			{"key": "udm", "value": "12"},
		},
	}

	jsonValue, _ := json.Marshal(payload)

	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://realtime.oxylabs.io/v1/queries",
		bytes.NewBuffer(jsonValue),
	)

	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)

	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "google_search",
                query = "adidas",
                parse = true,
                context = new dynamic [] {
                    new { key = "udm", value = "12" },
                }
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "google_search");
        jsonObject.put("query", "adidas");
        jsonObject.put("parse", true);
        jsonObject.put("context", new JSONArray()
                .put(new JSONObject()
                        .put("key", "udm")
                        .put("value", "12"))
        );

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google_search",
    "query": "adidas",
    "parse": true,
    "context": [
        {
            "key": "udm",
            "value": "12"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### tbm

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_search",
        "query": "adidas",
        "parse": true,
        "context": [
            {
                "key": "tbm",
                "value": "nws"
            }
        ]
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'google_search',
    'query': 'adidas',
    'parse': True,
    'context': [
        {'key': 'tbm', 'value': 'nws'},
    ],
}

# Get response.
response = requests.post(
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "google_search",
    query: "adidas",
    parse: true,
    context: [
        { key: "tbm", value: "nws" },
    ],
};

const options = {
    hostname: "realtime.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="HTTP" %}

```http
source=google_search&query=adidas&parse=true&context[0][key]=tbm&context[0][value]=nws&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'google_search',
    'query' => 'adidas',
    'parse' => true,
    'context' => [
        [
            'key' => 'tbm',
            'value' => 'nws',
        ]
    ]
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");


$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "USERNAME"
	const Password = "PASSWORD"

	payload := map[string]interface{}{
		"source": "google_search",
		"query":  "adidas",
		"parse":  true,
		"context": []map[string]interface{}{
			{"key": "tbm", "value": "nws"},
		},
	}

	jsonValue, _ := json.Marshal(payload)

	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://realtime.oxylabs.io/v1/queries",
		bytes.NewBuffer(jsonValue),
	)

	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)

	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "google_search",
                query = "adidas",
                parse = true,
                context = new dynamic [] {
                    new { key = "tbm", value = "nws" },
                }
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "google_search");
        jsonObject.put("query", "adidas");
        jsonObject.put("parse", true);
        jsonObject.put("context", new JSONArray()
                .put(new JSONObject()
                        .put("key", "tbm")
                        .put("value", "nws"))
        );

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google_search",
    "query": "adidas",
    "parse": true,
    "context": [
        {
            "key": "tbm",
            "value": "nws"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

We use synchronous [**Realtime**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/realtime) integration method in our examples. If you would like to use [**Proxy Endpoint**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/proxy-endpoint) or asynchronous [**Push-Pull**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/push-pull) integration, refer to the [**integration methods**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods) section.

## Request parameter values

### Generic

Basic setup and customization options for scraping Google News search results.

<table><thead><tr><th width="222">Parameter</th><th width="350.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong>source</strong></mark></td><td>Sets the scraper.</td><td><code>google_search</code></td></tr><tr><td><mark style="background-color:green;"><strong>query</strong></mark></td><td>The keyword or phrase to search for.</td><td>-</td></tr><tr><td><mark style="background-color:orange;"><strong>context:</strong></mark><br><mark style="background-color:orange;"><strong>udm</strong></mark></td><td>To get News search results, set value to <mark style="background-color:orange;"><strong>12</strong></mark>. Find other accepted values <a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FeoShpvYuZlb4hGpCIXNG%2Fudm_values%20(eu%2Bus).json?alt=media&#x26;token=a6b77fab-b170-478c-b06f-b8fbf7ab64c7"><strong>here</strong></a>.</td><td></td></tr><tr><td><mark style="background-color:orange;"><strong>context:</strong></mark><br><mark style="background-color:orange;"><strong>tbm</strong></mark></td><td>To get News search results, set value to <mark style="background-color:orange;"><strong>nws</strong></mark>. Other accepted values are: <code>app</code>, <code>blg</code>, <code>bks</code>, <code>dsc</code>, <code>isch</code>, <code>pts</code>, <code>plcs</code>, <code>rcp</code>, <code>lcl</code></td><td>-</td></tr><tr><td><code>render</code></td><td>Enables JavaScript rendering when set to <code>html</code>. <a href="../../../features/js-rendering-and-browser-control/javascript-rendering"><strong>More info</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>parse</code></td><td>Returns parsed data when set to <code>true</code>. Explore output <a href="#output-data-dictionary"><strong>data dictionary</strong></a>.</td><td><code>false</code></td></tr><tr><td><code>callback_url</code></td><td>URL to your callback endpoint. <a href="../../../../integration-methods/push-pull#callback"><strong>More info</strong></a>.</td><td>-</td></tr><tr><td><code>user_agent_type</code></td><td>Device type and browser. The full list can be found <a href="../../../features/http-context-and-job-management/user-agent-type"><strong>here</strong></a>.</td><td><code>desktop</code></td></tr></tbody></table>

&#x20;   \- mandatory parameter

\- `udm` and `tbm` context parameters cannot be used together in a single scraping request; **please select one of them**. Using both simultaneously may lead to conflicts or unexpected behavior.

#### Google Advanced Search Operators

When scraping, you might find it useful to combine Google advanced search operators with your query. It enables you to customize the scope of the search, ensuring that the results are more relevant and focused. Explore these special commands [**here**](https://ahrefs.com/blog/google-advanced-search-operators/) and [**here**](https://www.semrush.com/kb/831-how-to-use-google-advanced-search-operators). See an example below.

```json
{
    "source": "google_search",
    "query": "iphone 15 launch inurl:apple",
}
```

### Localization

Adapt search results to specific geographical locations and languages.

<table><thead><tr><th width="222">Parameter</th><th width="350.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>geo_location</code></td><td>The geographical location that the result should be adapted for. Using this parameter correctly is extremely important to get the right data. For more information, read about our suggested <code>geo_location</code> parameter structures <a href="../../../../features/localization/serp-localization#google"><strong>here</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>locale</code></td><td><code>Accept-Language</code> header value which changes your Google search page web interface language. <a href="../../../../features/localization/domain-locale-results-language#locale-1"><strong>More info</strong></a>.</td><td>-</td></tr></tbody></table>

### Pagination

Controls for managing the pagination and retrieval of search results.

<table><thead><tr><th width="222">Parameter</th><th width="350.3333333333333">Description</th><th width="167">Default Value</th></tr></thead><tbody><tr><td><code>start_page</code></td><td>Starting page number.</td><td><code>1</code></td></tr><tr><td><code>pages</code></td><td>Number of pages to retrieve.</td><td><code>1</code></td></tr><tr><td><code>limit</code></td><td>Number of results to retrieve in each page.</td><td><code>10</code></td></tr><tr><td><p><code>context</code>:</p><p><code>limit_per_page</code></p></td><td>If you want to scrape multiple pages with the same IP address, include a JSON array and specify the page numbers using the <code>page</code> key. You must also indicate the number of organic results on each page by adding a <code>limit</code> key. <a href="#limit-per-page"><strong>See example</strong></a><strong>.</strong></td><td>-</td></tr></tbody></table>

#### Limit per page

To use this feature, include a JSON array with JSON objects containing the following data:

<table><thead><tr><th width="142">Parameter</th><th width="446.3333333333333">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>page</code></td><td>The number of the page you would like to scrape. Any integer value greater than <code>0</code> will work</td><td><code>1</code></td></tr><tr><td><code>limit</code></td><td>The number of results on the page in question. Any integer value between <code>1</code> and <code>100</code> (inclusive) will work.</td><td><code>90</code></td></tr></tbody></table>

#### Request sample

```json
{
    "source": "google_search",
    "query": "adidas",
    "parse": true,
    "context": [
        {
            "key": "limit_per_page",
            "value": [
                {"page": 1, "limit": 10},
                {"page": 2, "limit": 90}
                    ]
        }]
}
```

### Filtering

Options to filter and refine search results based on various criteria.

<table><thead><tr><th width="245">Parameter</th><th width="350.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>context</code>:<code>safe_search</code></td><td>Safe search. Set to <code>true</code> to enable it.</td><td><code>false</code></td></tr><tr><td><code>context</code>:<br><code>tbs</code></td><td><code>tbs</code> parameter. This parameter is like a container for more obscure google parameters, like limiting/sorting results by date as well as other filters some of which depend on the <code>tbm</code> parameter (e.g. <code>tbs=app_os:1</code> is only available with <code>tbm</code> value <code>app</code>). More info <a href="https://stenevang.wordpress.com/2013/02/22/google-advanced-power-search-url-request-parameters/"><strong>here</strong></a>.</td><td>-</td></tr></tbody></table>

### Other

Additional advanced settings and controls for specialized requirements.

<table><thead><tr><th width="222">Parameter</th><th width="350.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>context</code>:<br><code>nfpr</code></td><td><code>true</code> will turn off spelling auto-correction</td><td><code>false</code></td></tr></tbody></table>

### Context parameters

All context parameters should be added to the `context` array as objects with `key` and `value` pairs, e.g.:

```json
...
"context": [
    {
        "key": "filter",
        "value": "0"
    }
]
...
```

## Structured data

SERP Scraper API is capable of extracting either an HTML or JSON object that contains Google search results, offering structured data on various elements of the results page.

<details>

<summary><code>google_search</code> news structured output</summary>

```json
{
    "results": [
        {
            "content": {
                "url": "https://www.google.com/search?q=adidas&tbm=nws&uule=w+CAIQICINdW5pdGVkIHN0YXRlcw&gl=us&hl=en",
                "page": 1,
                "results": {
                    "main": [
                        {
                            "url": "https://www.cnn.com/2022/05/06/business/under-armour-stock-adidas-nike/index.html",
                            "desc": "Tripped-up supply chains and a coronavirus surge in China are causing \nheadaches for top athletic brands.",
                            "title": "Wall Street is fed up with Under Armour, Nike and Adidas",
                            "source": "CNN",
                            "pos_overall": 1,
                            "relative_publish_date": "2 days ago"
                        },
                        ...
                        {
                            "url": "https://www.cnbc.com/2022/05/06/dsw-tests-layout-to-spotlight-brands-like-adidas-crocs-birkenstock.html",
                            "desc": "DSW is trying out a new store look and layout at a location opening this \nweekend in Houston, in an attempt to focus customers' attention on...",
                            "title": "DSW is testing a store layout that puts the spotlight on brands like \nAdidas, Crocs and Birkenstock",
                            "source": "CNBC",
                            "pos_overall": 10,
                            "relative_publish_date": "2 days ago"
                        }
                    ],
                    "total_results_count": 57300000
                },
                "parse_status_code": 12000
            },
            "created_at": "2022-05-09 07:25:03",
            "updated_at": "2022-05-09 07:25:07",
            "page": 1,
            "url": "https://www.google.com/search?q=adidas&tbm=nws&uule=w+CAIQICINdW5pdGVkIHN0YXRlcw&gl=us&hl=en",
            "job_id": "6929330379711060993",
            "status_code": 200,
            "parser_type": "v2"
        }
    ]
}
```

</details>

{% hint style="info" %}
We only parse news search results for **desktop** searches.
{% endhint %}

## Output data dictionary

#### HTML example

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FSxmNbXjudpsJ4VcregnQ%2Fgoogle_news_search.png?alt=media&#x26;token=0453c806-368e-459e-ae54-78b434cbc250" alt=""><figcaption></figcaption></figure>

#### JSON structure

The Google News Search structured output includes fields like `URL`, `page`, `results`, and others. The table below presents a detailed list of each SERP feature we parse, along with its description and data type. The table also includes some metadata.

{% hint style="info" %}
The number of items and fields for a specific result type may vary depending on the search query.
{% endhint %}

<table><thead><tr><th width="265">Key</th><th width="368.3333333333333">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>url</code></td><td>The URL of the Google search page.</td><td>string</td></tr><tr><td><code>results</code></td><td>A dictionary containing the results of the search.</td><td>array</td></tr><tr><td><code>results.main</code></td><td>A list of unpaid news results with their respective details.</td><td>array</td></tr><tr><td><code>results.additional</code></td><td>A list of trending articles with their respective details.</td><td>object</td></tr><tr><td><code>results.total_results_count</code></td><td>The total number of results found for the search query.</td><td>array</td></tr><tr><td><code>parse_status_code</code></td><td>The status code of the parsing job. You can see the parser status codes described <a href="https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/search/broken-reference/README.md"><strong>here</strong></a>.</td><td>integer</td></tr><tr><td><code>created_at</code></td><td>The timestamp when the scraping job was created.</td><td>timestamp</td></tr><tr><td><code>updated_at</code></td><td>The timestamp when the scraping job was finished.</td><td>timestamp</td></tr><tr><td><code>page</code></td><td>Page number relative to the Google SERP pagination.</td><td>integer</td></tr><tr><td><code>job_id</code></td><td>The ID of the job associated with the scraping job.</td><td>string</td></tr><tr><td><code>status_code</code></td><td>The status code of the scraping job. You can see the scraper status codes described <a href="https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/search/broken-reference/README.md"><strong>here</strong></a>.</td><td>integer</td></tr></tbody></table>

{% hint style="info" %}
In the following sections, parsed JSON code snippets are shortened where more than one item for the result type is available.
{% endhint %}

### Main

Displays a list of unpaid news results, providing relevant details for each article.

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FPubsRUBP8Jq7MTMBax9g%2Fgoogle_news_search_3.png?alt=media&#x26;token=a36bcefb-fc14-4024-899d-517350b61fdf" alt=""><figcaption></figcaption></figure>

```json
...
"main": [
    {
        "url": "https://www.yahoo.com/lifestyle/tiger-woods-nikes-epic-partnership-015311819.html",
        "desc": "That there could ever be a world in which Tiger Woods wasn't sponsored by \nNike seemed...",
        "title": "How Tiger Woods and Nike's Epic Partnership Fell Apart",
        "source": "Yahoo",
        "pos_overall": 1,
        "relative_publish_date": "1 day ago"
    },
                       ...
},

...
```

<table><thead><tr><th width="260.3333333333333">Key (results.main)</th><th width="317">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>url</code></td><td>The URL to the full article.</td><td>string</td></tr><tr><td><code>desc</code></td><td>A short excerpt from the full article.</td><td>string</td></tr><tr><td><code>title</code></td><td>The title of the article.</td><td>string</td></tr><tr><td><code>source</code></td><td>The name of the website where the article is published.</td><td>string</td></tr><tr><td><code>pos_overall</code></td><td>Indicates the overall position of the result within the main results of News SERP.</td><td>integer</td></tr><tr><td><code>relative_publish_date</code></td><td>Describes how long ago the article was published.</td><td>string</td></tr></tbody></table>

### Additional

Presents a list of trending articles, accompanied by relevant details.

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FijqjTbDfWASz2pRsCwdr%2Fgoogle_news_search_2.png?alt=media&#x26;token=33ec1e0d-54dd-4d1d-bd08-e337fd3b2f2e" alt=""><figcaption></figcaption></figure>

```json
...
"additional": [
    {
        "items": [
            {
                "pos": 1,
                "url": "https://www.complex.com/sneakers/a/brendan-dunne/nike-book-1-colorways-haven-hike-rattlesnake",
                "title": "Nike Book 1 Colorways Haven Hike Rattlesnake",
                "source": "Complex",
                "relative_publish_date": "1 day ago"
            },
         ...
        ],
        "pos_overall": 2,
        "section_title": "Devin Booker confirms issues with Nike Book 1 launch"
    }
...
```

<table><thead><tr><th width="265.3333333333333">Key (results.additional)</th><th width="366">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>items</code></td><td>A list of articles with their respective details.</td><td>array</td></tr><tr><td><code>items.pos</code></td><td>A unique indicator denoting the article position in the list.</td><td>integer</td></tr><tr><td><code>items.url</code></td><td>The URL to the full article.</td><td>string</td></tr><tr><td><code>items.title</code></td><td>The title of the article.</td><td>string</td></tr><tr><td><code>items.source</code></td><td>The name of the website where the article is published.</td><td>string</td></tr><tr><td><code>items.relative_publish_date</code></td><td>Describes how long ago the article was published.</td><td>string</td></tr><tr><td><code>pos_overall</code></td><td>Indicates the overall position of the result within the additional results of News SERP.</td><td>integer</td></tr><tr><td><code>section_title</code></td><td>The name of the additional section.</td><td>string</td></tr></tbody></table>
