How to Create RSS Feeds for Google Search Results
With a news widget you give your website visitors value without having to constantly update the content. Google News is great for that, as it is very up to date and brimming with the latest news from publications from all over the world.
Not just the q parameter
allintext
"The allintext: query term requires each document in the search results to contain all of the words in the search query in the body of the document. The query should be formatted as allintext: followed by the words in your search query.
If your search query includes the allintext: query term, Google will only check the body text of documents for the words in your search query, ignoring links in those documents, document titles and document URLs."
intitle
"The intitle: query term restricts search results to documents that contain a particular word in the document title. The search query should be formatted as intitle:WORD with no space between the intitle: query term and the following word."
allintitle
"The allintitle: query term restricts search results to documents that contain all of the query words in the document title. To use the allintitle: query term, include "allintitle:" at the start of your search query.
Note: Putting allintitle: at the beginning of a search query is equivalent to putting intitle: in front of each word in the search query."
inurl
"The inurl: query term restricts search results to documents that contain a particular word in the document URL. The search query should be formatted as inurl:WORD with no space between the inurl: query term and the following word"
allinurl
The allinurl: query term restricts search results to documents that contain all of the query words in the document URL. To use the allinurl: query term, include allinurl: at the start of your search query.
For example https://news.google.com/rss/search?q=intitle:AAPL+when:1h&hl=en-US&gl=US&ceid=US:en
Advanced search with a time range
before & after parameters will allow you to search by date. Unfortunately, you can narrow down your search only by day (not time allowed). So, if there are more than 100 articles that match your query you will not be able to find them.
For example, if we want to find articles about Boeing for the first of July, 2020:
https://news.google.com/rss/search?q=Boeing+after:2020-06-01+before:2020-06-02&ceid=US:en&hl=en-US&gl=US
The query part: q=Boeing+after:2020-06-01+before:2020-06-02
q parameter advanced options
1. Boolean OR Search [OR] - the default behavior for Google News RSS is to put AND between each term you put into q parameter. So, Elon Musk is actually Elon AND Musk if you want to search for at least one should match you should use OR parameter. For example, to search for articles that mention SpaceX or Boeing:
https://news.google.com/rss/search?q=SpaceX%20OR%20Boeing&ceid=US:en&hl=en-US&gl=US
q param: q=SpaceX%20OR%20Boeing (q=SpaceX OR Boeing)
"Hidden" Topics
Yes, there are "hidden" topics. If you already tried to insert the "BUSINESS" url from the section above in your browser, you might have noticed that it is being forwarded to another URL:
https://news.google.com/rss/topics/CAAqKggKIiRDQkFTRlFvSUwyMHZNRGx6TVdZU0JXVnVMVlZUR2dKVlV5Z0FQAQ?hl=en-US&gl=US&ceid=US:en
To break it down:
the base part: https://news.google.com/rss
a different topic part: /topics/
mysterious topic hash: CAAqKggKIiRDQkFTRlFvSUwyMHZNRGx6TVdZU0JXVnVMVlZUR2dKVlV5Z0FQAQ
parameters (only the country-language): ?hl=en-US&gl=US&ceid=US:en
links 1) https://feed.mikle.com/support/google-news-rss/
links 2) https://rss.app/rss-feed/google-news-rss-feed
links 3) https://rsscircus.com/en/url-format-for-google-news-rss-feed/
base https://news.google.com/rss/search?um=1&hl=en-US&q=rick+perry&gl=US&ceid=US:en
Example (for US):
WORLD
NATION
BUSINESS
TECHNOLOGY
ENTERTAINMENT
SPORTS
SCIENCE
HEALTH
https://news.google.com/news/headlines/section/topic/BUSINESS?ned=us&hl=en
But, if you query other country, the topic will change.
Example (Colombia):
WORLD.es_co
NATION.es_co
BUSINESS.es_co
TECHNOLOGY.es_co
ENTERTAINMENT.es_co
SPORTS.es_co
SCIENCE.es_co
HEALTH.es_co
https://news.google.com/news/rss/headlines/section/topic/BUSINESS.es_co/Econom%C3%ADa?ned=es_co&hl=es
Convert Google Doc to Docx using Google Script
https://gist.github.com/mhawksey/3007293
site generator FetchRSS http://fetchrss.com/
How to Find RSS Feeds on the Web
google.feeds.findFeeds(
https://ctrlq.org/rss/#
Detailed look at Google.feeds.Feed.class
http://www.javascriptkit.com/dhtmltutors/googleajaxfeed2.shtml
https://news.google.com/rss/search?hl=ru&gl=RU&q=%D0%B0%D0%B2%D1%82%D0%BE+%D0%BC%D0%B8%D1%80&ceid=RU:ru
