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, Image Search.
To scrape Google News search, you must include the context:tbm
parameter with the value set to nws
.
Explore 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.
Query parameters
Parameter | Description | Default Value |
---|---|---|
source | Data source. More info. |
|
| Domain localization for Google. The full list of available domains can be found here. |
|
query | UTF-encoded keyword. | - |
| Starting page number. |
|
| Number of pages to retrieve. |
|
| Number of results to retrieve in each page. |
|
|
| - |
| 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 | - |
| Device type and browser. The full list can be found here. |
|
| Enables JavaScript rendering. More info. | |
| URL to your callback endpoint. More info. | - |
|
| - |
context: tbm | It stands for | - |
| If you want to scrape multiple pages with the same IP address, include a JSON array and specify the page numbers using the | - |
|
|
|
| Safe search. Set to |
|
|
| - |
- required parameter
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 and here. See an example below.
Code examples
In the example below, we make a request to obtain News search result pages for the search term adidas
on the google.nl
domain.
The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.
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.
We only parse news search results for desktop searches.
Data dictionary
HTML example
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.
The number of items and fields for a specific result type may vary depending on the search query.
Key | Description | Type |
---|---|---|
| The URL of the Google search page. | string |
| A dictionary containing the results of the search. | array |
| A list of unpaid news results with their respective details. | array |
| A list of trending articles with their respective details. | object |
| The total number of results found for the search query. | array |
| The status code of the parsing job. You can see the parser status codes described here. | integer |
| The timestamp when the scraping job was created. | timestamp |
| The timestamp when the scraping job was finished. | timestamp |
| Page number relative to the Google SERP pagination. | integer |
| The ID of the job associated with the scraping job. | string |
| The status code of the scraping job. You can see the scraper status codes described here. | integer |
In the following sections, parsed JSON code snippets are shortened where more than one item for the result type is available.
Main
Displays a list of unpaid news results, providing relevant details for each article.
Key (results.main) | Description | Type |
---|---|---|
| The URL to the full article. | string |
| A short excerpt from the full article. | string |
| The title of the article. | string |
| The name of the website where the article is published. | string |
| Indicates the overall position of the result within the main results of News SERP. | integer |
| Describes how long ago the article was published. | string |
Additional
Presents a list of trending articles, accompanied by relevant details.
Key (results.additional) | Description | Type |
---|---|---|
| A list of articles with their respective details. | array |
| A unique indicator denoting the article position in the list. | integer |
| The URL to the full article. | string |
| The title of the article. | string |
| The name of the website where the article is published. | string |
| Describes how long ago the article was published. | string |
| Indicates the overall position of the result within the additional results of News SERP. | integer |
| The name of the additional section. | string |
Last updated