API description

Google News API, which is a straightforward REST API, you may look through over 250,000 news sources, both current and archived. You may also aggregate and arrange today's most talked-about news stories in accordance with Google News's rating with the help of this news API. You can also use filters and a keyword search to sift through all the articles.

You get access to more than 250,000 different news sources, both current and archival, when you utilize the Google News API, which is a standard REST API. This gives you the ability to search across many time periods. You will be able to gather and organize the most recent and widely talked articles of news in accordance with the rating that is provided by Google News with the assistance of this news API. In addition to making use of the filters, you can also do a search for a certain term in order to organize and sift through all of the articles.

post responses

POST

curl --request POST \
 --url 'https://google-news-api1.p.rapidapi.com/search?language=' \
 --header 'Authorization: ' \
 --header 'X-RapidAPI-Host: google-news-api1.p.rapidapi.com' \
 --header 'X-RapidAPI-Key: 53d4b4e663mshf282e91d4c98a41p1742ffjsn77a9feb47b96' \
 --data '{}'

POST
/v1/ava/endpoint/ids

import axios from "axios";const options = {
 method: 'POST',
 url: 'https://google-news-api1.p.rapidapi.com/search',
 params: {language: ''},
 headers: {
   'X-RapidAPI-Key': '53d4b4e663mshf282e91d4c98a41p1742ffjsn77a9feb47b96',
   'X-RapidAPI-Host': 'google-news-api1.p.rapidapi.com',
   Authorization: ''
 },
 data: '{}'
};axios.request(options).then(function (response) {
 console.log(response.data);
}).catch(function (error) {
 console.error(error);
});

RESPONSE

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

{ "success": true, "news": { "total": 584, "news": [ { "title": "Kanye West to Buy Parler, Joining Crowd of Right-Wing Social Media - The New York Times", "link": "https://www.nytimes.com/2022/10/17/business/kanye-west-parler.html", "description": "The social media service announced the deal days after Twitter and Instagram restricted the rapper and entrepreneur’s accounts for violating their terms.", "source": "The New York Times", "date": "2022-10-17T18:23:27.000Z", "props": { "url": "https://www.nytimes.com/2022/10/17/business/kanye-west-parler.html", "type": "article", "title": "Kanye West to Buy Parler, Joining Crowd of Right-Wing Social Media", "image": "https://static01.nyt.com/images/2022/10/17/world/17xp-parler/17xp-parler-facebookJumbo.jpg", "image:alt": "“In a world where conservative opinions are considered to be controversial, we have to make sure we have the right to freely express ourselves,” Kanye West, known as Ye, said in a statement about the Parler deal.", "description": "The social media service announced the deal days after Twitter and Instagram restricted the rapper and entrepreneur’s accounts for violating their terms." }, "language": "EN", "created_at": "2022-10-17T18:41:34.306Z" }, { "title": "British Pound and Bond Prices Rise as Jeremy Hunt Accelerates Tax Plans - The New York Times", "link": "https://www.nytimes.com/2022/10/17/business/uk-markets-pound-gilts.html", "description": "Jeremy Hunt, Britain’s new top finance official, said he was scrapping policies that had spurred turmoil in the markets. But the economy still faces stubborn problems.", "source": "The New York Times", "date": "2022-10-17T18:09:14.000Z", "props": { "url": "https://www.nytimes.com/2022/10/17/business/uk-markets-pound-gilts.html", "type": "article", "title": "U.K. Markets Rise as New Chancellor Axes Truss’s Tax and Spending Plans", "image": "https://static01.nyt.com/images/2022/10/17/multimedia/17uk-markets-1-b354/17uk-markets-1-b354-facebookJumbo.jpg", "image:alt": "The Bank of England, in London. The central bank said Monday that it had measures in place to support liquidity in the bond market.", "description": "Jeremy Hunt, Britain’s new top finance official, said he was scrapping policies that had spurred turmoil in the markets. But the economy still faces stubborn problems." }, "language": "EN", "created_at": "2022-10-17T18:38:01.735Z" }, { "title": "Monkeypox cases in US fall, hit lowest level since June: CDC - ABC News", "link": "https://abcnews.go.com/Health/monkeypox-cases-us-fall-hit-lowest-level-june/story?id=91620724", "description": "Data from the CDC shows that the 7-day average of monkeypox cases in the United States has fallen to 60, the lowest levels recorded since late June.", "source": "ABC News", "date": "2022-10-17T18:06:14.000Z", "props": { "site_name": "ABC News", "url": "https://abcnews.go.com/Health/monkeypox-cases-us-fall-hit-lowest-level-june/story?id=91620724", "title": "Monkeypox cases in US fall, hit lowest level since June: CDC", "description": "Data from the CDC shows that the 7-day average of monkeypox cases in the United States has fallen to 60, the lowest levels recorded since late June.", "image": "https://s.abcnews.com/images/Health/monkeypox-file-ap-ml-220902_1662131091107_hpMain_16x9_992.jpg", "type": "article", "locale": "en_US" }, "language": "EN", "created_at": "2022-10-17T18:44:15.237Z" } ], "next_cursor": "eyJkYXRlIjoxNjY2MDI5OTc0MDAwLCJfaWQiOiJTNnRDNTRNQm9XUHZzcVZOd1c0RyJ9" } }

GET responses

Test mode secret keys have the prefix Alternatively, you can use for granular permissions.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

GET

curl --request GET \  --url 'https://google-news-api1.p.rapidapi.com/search?language=' \  --header 'Authorization: ' \  --header 'X-RapidAPI-Host: google-news-api1.p.rapidapi.com' \  --header 'X-RapidAPI-Key: 53d4b4e663mshf282e91d4c98a41p1742ffjsn77a9feb47b96'

POST
/v1/ava/endpoint/ids

import axios from "axios";
const options = {  method: 'GET',  url: 'https://google-news-api1.p.rapidapi.com/search',  params: {language: ''},  headers: {    'X-RapidAPI-Key': '53d4b4e663mshf282e91d4c98a41p1742ffjsn77a9feb47b96',    'X-RapidAPI-Host': 'google-news-api1.p.rapidapi.com',    Authorization: ''  }};
axios.request(options).then(function (response) {  console.log(response.data);}).catch(function (error) {  console.error(error);});

error handling

POST
/v1/ava/endpoint/ids

{  "success": false,  "messsage": "ERROR.INVALID_LANGUAGE_CODE"}

RESULTS

{  "access-control-allow-credentials": "true",
 "access-control-allow-origin": "*",
 "alt-svc": "h3=\":443\"; ma=86400,
h3-29=\":443\"; ma=86400",
 "cf-cache-status": "DYNAMIC",
 "cf-ray": "75dacb9a19b9f665-NRT",
 "content-length": "58",
 "content-type": "application/json; charset=utf-8",
 "date": "Fri, 21 Oct 2022 14:48:40 GMT",
 "etag": "W/\"3a-KTpPCoebhl8yZHgdTigqOgkOuyg\"",
 "nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
 "report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=H%2B8xXDpWkDeg773eY3%2F%2BCB4cP6Y%2BogzCHdnhiq1rWQSt2gD2Gmm1YQcmqHCueAyG8SY%2BETdjn9YsZl4J%2BjRs3E14QT1nbBMePIwuXTJGkNvbwFK18JdJCrOPKC6p2J9gqTZtaY%2FNdow%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}",  "server": "RapidAPI-1.2.8",  "x-powered-by": "Express",  "x-rapidapi-region": "AWS - ap-northeast-1",
 "x-rapidapi-version": "1.2.8"}

Required parameters

Attributes
  • language string

    required


    Supported by 10 languages.

    Language request codes:

    TR, EN, FR, DE,  IT, ZH, ES, RU, KO, PT

Optional parameters

Attributes
  • q string


    The search term or terms used to locate the article.\\"AND\\" or \\"OR\\" may be placed between the keywords.

    If you wish to group the keywords, you may include them in parenthesis.

    For instance: (cats and dogs) OR (fish)

    If you wish to omit articles by term, you can do so by prefixing the keyword with a (-) sign.

    Example: cats -dogs
    (This will return articles featuring cats but exclude those with the term \\"dog.\\"

  • from string


    \\"from\\" when used defines the date of items published after the specified date.

    Format:
    ISO date standart format is used.
    YYYY-MM-DDTHH:mm:ss

    Example:
    2022-10-17T18:41:34.306Z

  • to string


    \\"to\\" when used defines the date of items published before the specified date.

    Format:
    ISO date standart format is used.
    YYYY-MM-DDTHH:mm:ss

    Example:
    2022-10-17T18:41:34.306Z

  • required_props string


    Required props are delimited by commas.

    Each property must have a name.

    If one of the property names is missing from the article, that property is excluded.

    Example:title, image

  • sort string


    You can arrange the articles systematically in groups; separate according to type, class, etc.

    Sorting refers to ordering articles in an increasing or decreasing manner according to some linear relationship among the article items.

    You can order the articles and arrange them in a sequence ordered by category with similar properties.

    Expected values:

    date:asc
    date:desc

    _score:asc
    _score:desc

  • limit string


    With \\"limit,\\" you can specify the number of articles required per request.

    Maximum limit is set to 100 articles per request.

  • cursor string


    This defines the returned value of the \\"next_cursor\\".

    It allows you to navigate to next article list.