Search
The following query parameters control Google’s interpretation of keywords. Although
as_epqmay be attractive for some use cases, it breaks sorting by date (scoring=n) when output is “rss” or “atom”, so stick with q for consistent sorting. Update: It seems the as_* parameters don’t work when output is “rss” or “atom”.q=TERMSretrieve results with all of the terms. Alias:as_qas_epq=TERMSretrieve results with the exact phraseas_oq=TERMSretrieve results with at least one of the wordsas_eq=TERMSretrieve results without the termsas_qdr=dTERMSretrieve results within specified number of days example &as_qdr=d1 results within one dayas_qdr=wTERMSretrieve results within specified number of weeks example &as_qdr=w1 results within one weekas_qdr=yTERMSretrieve results within specified number of years example &as_qdr=y1 results within one yearas_occt=SECTIONretrieve results where my terms occur…anyanywhere in the articletitlein the headline of the article (same as using “allintitle:” inq)bodyin the body of the article (same as using “allintext:” inq)urlin the URL of the article (same as using “allinurl:” inq)
Filter
The following query parameters filter results by Google News edition, topic, location, date, news source or author.
ned=EDITIONlimits results to a specific edition. Possible values: editionstopic=TOPIClimits results to a specific topic. Possible values: topicsgeo=LOCATIONlimits results to a specific locationdetect_metro_areadetermines location based on IP- a city, state, country, or US zip code
as_drrb=qretrieves articles added by Google News…as_qdr=aanytimeas_qdr=hlast houras_qdr=dlast dayas_qdr=wpast weekas_qdr=mpast monthas_qdr=ypast year
as_drrb=bretrieves articles added by Google News between…as_minm=NUMminimum month. Possible values: [1, 12]as_mind=NUMminimum day. Possible values: [1, 31]as_maxm=NUMmaximum month. Possible values: [1, 12]as_maxd=NUMmaximum day. Possible values: [1, 31]
as_nsrc=SOURCElimits results to a specific news source (same as using “source:” inq)as_nloc=LOCATIONlimits results to news sources from a specific location (same as using “location:” inq)as_authorlimits results to a specific author (same as using “author:” inq)
The
as_ddrb family of parameters is occasionally set using the tbs parameter when using the web interface. You do not need to learn the tbs syntax. Note that as_nloc and geo are not synonymous.Boost
I’m not confident that these parameters do anything when
output is “rss” or “atom”, but here they are for completeness.gl=COUNTRYboosts search results from a specific country of origin. Possible values:country codesgll=LATITUDE,LONGITUDEboosts search results near that point. Latitude and longitude must be integer microdegrees. In otherwords, multiply each number by a million and round to the nearest integer.gr=REGIONboosts search results from a specific region. Possible values: province codesgm=METROboosts search results from a specific metropolitan area. Possible values: metro codesgpc=ZIPCODEboosts search results from a specific zip code.glmust be “us”.gcs=CITYboosts search results from a specific city. Possible values: city names in theUnited States and worldwide
Order
scoring=ORDERsorts search results. Default: “r”. Alias: “as_scoring”- "r" by relevance
- "n" by date (newest first)
- "d" by date (newest first) with duplicates
- "o" by date (oldest first)
Paginate
num=NUMretrieves NUM results. Default: 10. Possible values: ifqpresent [1,100], otherwise [1, 30]start=OFFSETretrieves results starting from OFFSET. NUM plus OFFSET must be less than 1000, otherwise you will get zero results. Ignored ifoutputis “rss” or “atom”. Default: 0. Requiresq.
Output
output=FORMATsets the output formatrssretrieves RSS feedatomretrieves Atom feed
hl=LANGUAGEsets host language. Default: “us”. Possible values: languageshdlOnly=1displays headlines onlyqsid=IDused in combination withcf=q. Update: This feature has been removed.
In older versions of Google News, it was possible to change the output of the web interface using a
cf parameters. It no longer seems to work, but it is here for completeness. Note that when output is set to “rss” or “atom”, this parameter is in fact ignored.cf=CODEallretrieve any contentqretrieve only quotes. Requiresqsid. Update: This feature has been removed.iretrieve only imagesbretrieve only blogs
Google tracking
Google uses parameters to track how users are using the web interface, which may include
aq,authuser, btnmeta_news_search, edchanged, client, rls, oi, oq, resnum, sa, source,sourceid, swrnum, tab. You don’t need to worry about these, unless you want to bias Google’s internal statistics on user behavior.Google Search
If using the web interface, performing a keyword search from Google News will redirect you to a Google Search page. The
tbm=nws query parameter informs Google to display news results only.Undocumented
I haven’t yet figured out what these do, but their impact seems minimal. If you have a clue, please mention it in the comments!
pzis usually set to 1. Default: 1. Possible values: [0, 1]ictPossible values: “ln”, “itn0”, “tnv0”csid
Deprecated
The following parameters work only on the deprecated Google News Search API.
v=1.0sets the API version. Possible values: “1.0”rsz=SIZEsets results sizesmallretrieves four resultslargeretrieves eight results
useripsets user’s IP as an abuse counter-mesurecallbackruns JavaScript callbackcontextsets callback contextkeysets API key
Examples:
To create RSS for US top stories:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss
To create RSS for Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&topic=tc
Or
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&topicsid=en_us:tc&ict=tnv3
To create RSS for keyword search (google) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=Google&topicsid=en_us:tc&ict=tnv3
To create RSS for keyword search (AT&T) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=AT%26T&topicsid=en_us:tc&ict=tnv5
To create RSS for keyword (google) and sort output by newest:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&scoring=n&q=google&output=rss
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss
To create RSS for Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&topic=tc
Or
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&topicsid=en_us:tc&ict=tnv3
To create RSS for keyword search (google) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=Google&topicsid=en_us:tc&ict=tnv3
To create RSS for keyword search (AT&T) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=AT%26T&topicsid=en_us:tc&ict=tnv5
To create RSS for keyword (google) and sort output by newest:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&scoring=n&q=google&output=rss