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.
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 '{}'
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);
});
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.
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.
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'
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);});
{ "success": false, "messsage": "ERROR.INVALID_LANGUAGE_CODE"}
{ "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"}
Supported by 10 languages.
Language request codes:
TR, EN, FR, DE, IT, ZH, ES, RU, KO, PT
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\\" 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\\" 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 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
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
With \\"limit,\\" you can specify the number of articles required per request.
Maximum limit is set to 100 articles per request.
This defines the returned value of the \\"next_cursor\\".
It allows you to navigate to next article list.