4

I want to incorporate news on my website, but the main topics need to be "books" or "authors" and etc. Basically, I need to select custom topics like these two I mentioned or the name of an author.

But I can't figure out how to do that, since the documentation is really poor (or I can't find it).

What is the query parameter to add that?

I get this for the RSS currently:

http://news.google.com/news?pz=1&topic=n&output=rss
random
  • 9,774
  • 10
  • 66
  • 83
user2295471
  • 87
  • 2
  • 6

2 Answers2

3

To fetch and create Google News items from topics that are not the top listed (top headlines, world, business, nation, science and technology, elections, politics, entertainment, sports, health) you'll need to go to the Custom sections directory.

There, you search and load the topic you want to feed news from and grab the RSS link that appears at the bottom of the page.

For example, if you wanted to only fetch the Google News for the Literature topic, you will end up with a feed URL like this:

http://news.google.com/news/section?pz=1&cf=all&csid=725f40c3dd857970

Here is the topic ID you'll need (Literary in this example):

csid=725f40c3dd857970

Which can be found when you go via the Custom sections directory page.

If you wanted to do this via the Google News Search JavaScript API, don't, because you can't rely on it for much longer. It was shut down on as of 26 May 2011.

random
  • 9,774
  • 10
  • 66
  • 83
2

Your url is close. Try this:

http://news.google.com/news?pz=1&cf=all&q=SEARCH_TERM&output=rss

Just replace SEARCH_TERM with your query parameter.