How can I get Google JSON news output?

I tried using the Google channel for the JSON converter as follows: http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http%3A%2F%2Fnews.google.com%2Fnews%3Foutput% 3Drss% 26num% 3D8

The only problem is that only a maximum of 4 results can be returned. If I go directly to http://news.google.com/news?output=rss&num=8 , then there will be 8 results. But if I convert it to JSON, there are only 4.

Is there any other way to get Google News results in JSON format?

+6
source share
2 answers
+9
source

you can use rsz parameter

RSZ = 4

This argument supplies an integer from 1-8, indicating the number of results returned to the page. eg.

  $url="https://ajax.googleapis.com/ajax/services/search/news?v=1.0&rsz=8&q=Tarun%20Gupta"; 
+3
source

Source: https://habr.com/ru/post/907709/


All Articles