API Documentation

Google News

ScrapeIN Google News API Response Description

Google News Scraper API is a tool that allows users to extract news data from Google News search results in a structured format. The API returns a HTML or JSON object that contains the search results and additional metadata about the search or CSV.

HTML

JSON Example

{
    "request_info": {
        "success": true,
        "topup_credits_remaining": 34279,
        "credits_used_this_request": 1
    },
    "search_parameters": {
        "q": "elon Musk",
        "location": "United States",
        "num": "10",
        "output": "json",
        "search_type": "news",
        "engine": "google"
    },
    "search_metadata": {
        "created_at": "2023-03-30T15:32:19.441Z",
        "processed_at": "2023-03-30T15:33:35.085Z",
        "total_time_taken": 75.64,
        "engine_url": "https://www.google.com/search?q=elon+Musk&uule=w+CAIQICINVW5pdGVkIFN0YXRlcw&gl=us&hl=en&tbm=nws&num=10",
        "html_url": "https://app.scrapein.app/api/v1/google/news/?q=elon+Musk&location=United+States&num=10&output=html&api_key={API-KEY}&search_type=news&engine=google",
        "json_url": "https://app.scrapein.app/api/v1/google/news/?q=elon+Musk&location=United+States&num=10&output=json&api_key={API-KEY}&search_type=news&engine=google",
        "location_auto_message": "We have automatically set the 'google_domain', 'gl' and 'hl' parameters to match the supplied location of 'United States'. You can stop this behaviour by setting the 'location_auto' parameter to 'false'."
    },
    "search_information": {
        "original_query_yields_zero_results": false,
        "total_results": 267000,
        "time_taken_displayed": 0.55,
        "query_displayed": "elon Musk"
    },
    "top_stories": [
        {
            "link": "https://www.cnn.com/2023/03/29/media/elon-musk-twitter-promises-reliable-sources/index.html",
            "title": "Here are 9 Twitter promises that Elon Musk has failed to deliver on as 'chief Twit'",
            "visible_initially": true,
            "source": "CNN",
            "date": "12 hours ago",
            "date_utc": "2023-03-30T03:33:34.914Z",
            "block_position": 2,
            "thumbnail": "data:image/jpeg;base64,<Base64 image data>"
            "video": true,
            "live": false
        },
      {...},
        {
            "link": "https://www.theverge.com/2023/3/28/23659842/twitter-boost-elon-musk-dril-mrbeast-algorithm-accounts",
            "title": "Twitter is secretly boosting Elon Musk, Dril, and MrBeast for some reason",
            "visible_initially": true,
            "source": "The Verge",
            "date": "2 days ago",
            "date_utc": "2023-03-28T15:33:34.918Z",
            "block_position": 2,
            "thumbnail": "data:image/jpeg;base64,<Base64 image data>"
            "video": false,
            "live": false
        }
    ],
    "top_stories_extra": {
        "more_news_link": "https://www.google.com/search?q=elon+Musk&uule=w+CAIQICINVW5pdGVkIFN0YXRlcw&gl=us&hl=en&tbm=nws&num=10&story=GkUIpQEaIAoTc3RvcnlfbGFiZWxfcGFydGlhbBIJRWxvbiBNdXNrGh4KE3N0b3J5X2xhYmVsX3BhcnRpYWwSB1R3aXR0ZXIyMAomzfLq09fZ47XmAavrv6KMwoDzigGB1Ofg_PnsrnXo-5Wc--Wz9TcQu7Pz-wYYBVgC&fcs=AGY3Bfs3LK_tIpliBrqD4USixLfiyF1WCw&sa=X&ved=2ahUKEwiC0JyG_YP-AhXPYcAKHaHiDnsQ7IUHegQIBxAF"
    },
    "pagination": {
        "current": 1,
        "next": "https://www.google.com/search?q=elon+Musk&gl=us&hl=en&tbm=nws&ei=zaslZMK1Oc_DgQahxbvYBw&start=10&sa=N&ved=2ahUKEwiC0JyG_YP-AhXPYcAKHaHiDnsQ8NMDegQIBBAY",
        "other_pages": [
            {
                "page": 2,
                "link": "https://www.google.com/search?q=elon+Musk&gl=us&hl=en&tbm=nws&ei=zaslZMK1Oc_DgQahxbvYBw&start=10&sa=N&ved=2ahUKEwiC0JyG_YP-AhXPYcAKHaHiDnsQ8tMDegQIBBAG"
            }
            ...
            {
                "page": 10,
                "link": "https://www.google.com/search?q=elon+Musk&gl=us&hl=en&tbm=nws&ei=zaslZMK1Oc_DgQahxbvYBw&start=20&sa=N&ved=2ahUKEwiC0JyG_YP-AhXPYcAKHaHiDnsQ8tMDegQIBBAI"
            }
        ],
        "api_pagination": {
            "next": "https://app.scrapein.app/api/v1/google/news/?q=elon%20Musk&location=United%20States&output=json&api_key={API-KEY}&search_type=news&id=req0&page=2",
            "other_pages": [
                {
                    "page": 2,
                    "link": "https://app.scrapein.app/api/v1/google/news/?q=elon%20Musk&location=United%20States&output=json&api_key={API-KEY}&search_type=news&id=req0&page=2"
                }
                ...
                {
                    "page": 10,
                    "link": "https://app.scrapein.app/api/v1/google/news/?q=elon%20Musk&location=United%20States&output=json&api_key={API-KEY}&search_type=news&id=req0&page=10"
                }
            ]
        }
    },
    "news_results": [
        {
            "position": 1,
            "title": "Here are 9 Twitter promises that Elon Musk has failed to deliver on as 'chief Twit'",
            "link": "https://www.cnn.com/2023/03/29/media/elon-musk-twitter-promises-reliable-sources/index.html",
            "domain": "www.cnn.com",
            "source": "CNN",
            "date": "12 hours ago",
            "date_utc": "2023-03-30T03:33:35.015Z",
            "thumbnail": "data:image/jpeg;base64,<Base64 image data>"
        }
        ...
        {
            "position": 18,
            "title": "Elon Musk sounds the alarm on real estate, warning a spike in defaults on mortgages and commercial loans could hammer banks",
            "link": "https://finance.yahoo.com/news/elon-musk-sounds-alarm-real-103503297.html",
            "domain": "finance.yahoo.com",
            "source": "Yahoo Finance",
            "date": "3 days ago",
            "date_utc": "2023-03-27T15:33:35.045Z",
            "snippet": "The turmoil in the banking sector could spread to the housing and commercial real estate markets, Elon Musk has warned.",
            "thumbnail": "data:image/jpeg;base64,<Base64 image data>"
        }
    ]
}

JSON Structure

The JSON structure returned by the Google News Scraper API includes required elements, such as request_info, search_parameters, search_metadata, search_information, pagination, as described in the Results SERP Google API section, as well as those specific to Google News, which are described below.

top_stories - Google Top Stories

top_stories

top_stories and top_stories_extra

The top_stories - contains a list of the top news stories for the search query.

  • link - the URL of the news story.
  • title - the title of the news story.
  • visible_initially - boolean value indicating whether the news story is visible initially.
  • source - the source of the news story.
  • date - the date the news story was published.
  • date_utc - the date the news story was published in UTC format.
  • block_position - the position of the news story within the search results.
  • thumbnail - a base64-encoded thumbnail image for the news story.
  • video - boolean value indicating whether the news story contains a video.
  • live - boolean value indicating whether the news story is live.

top_stories_extra - Google Top Stories Extra

The top_stories_extra - contains additional information about the top news stories.

  • more_news_link - the URL of a page containing more news stories related to the search query.

news_results - Google News Results

news_results

news_results

The news_results parameter is an array containing information about news articles related to the search query. Each element in the array represents a single news article and includes the following attributes:

  • position: the position of the news article in the search results.
  • title: the title of the news article.
  • link: the URL of the news article.
  • domain: the domain of the website hosting the news article.
  • source: the source of the news article (e.g., the name of the news outlet).
  • date: the date on which the news article was published, as a human-readable string.
  • date_utc: the date on which the news article was published, in UTC format.
  • snippet: a short summary or excerpt from the news article.
  • thumbnail: a thumbnail image associated with the news article (encoded as Base64 data).