Skip to main content

Python client for Google News feed.

Project description

PyPI license


An easy-to-use python client for Google News feeds.

gnfetcher supports Python 2 as well as Python 3.


To install gnfetcher, simply,

$ pip install gnfetcher

To install and use gnfetcher CLI, follow instructions here CLI


Google News feeds use 3 basic filters:

  • Edition Limits results to a specific edition. There are more than 70 regional editions of Google News in many different languages. Each edition is specifically tailored with news for that audience.
  • Topic Limits results to a specific topic. There are several custom topics like sports, business, world, health, science, politics, etc.
  • Location Limits results to a specific location.

Other than these, you can also specify:

  • Language Provides results in specified language. 60+ languages are supported.
  • Query Provide results according to a specific query.


  • Create a gnfetcher object:

    >>> from gnfetcher import gnfetcher
    >>> client = gnfetcher()
  • Get current parameter settings

    >>> client.get_config()
    {'edition': 'United States (English)',
     'language': 'english',
     'loaction': None,
     'query': None,
     'topic': 'top stories'}
  • Get news feed

    >>> client.get_news()
    [{'img': '',
      'link': '',
      'title': "French citizens vote in an uncertain race that could determine Europe's future - Washington Post"},
     {'img': '',
      'link': '',
      'title': "Why people are marching for science: 'There is no Planet B' - Washington Post"},
     {'img': '',
      'link': '',
      'title': "Nearing 100 days, Trump's approval at record lows but his base is holding - Washington Post"}
  • Changing paramteres

    >>> client.edition = 'India (Hindi)'
    >>> client.topic = 'sports'
    >>> client.language = 'hindi'
    >>> client.get_news()
    [{'img': '',
      'link': '',
      'title': 'वॉर्न की IPL टीम में भारतीयों का बोलबाला, धोनी को सौंपी कप्तानी - आज तक'},
     {'img': '',
      'link': '',
      'title': 'प्यार का करारनामा, इंटरनेशनल बैडमिंटन प्लेयर ज्वाला गुट्टा के हाथ पर नजर आया! - Patrika'}
  • Get news by query

    >>> client.query = 'cricket'
    >>> client.get_news()
    [{'img': '',
      'link': '',
      'title': 'West Indies v Pakistan, 1st Test, Kingston, 2nd day April 22, 2017 -'},
     {'img': '',
      'link': '',
      'title': 'Cricket: China bowled out for 28 in World League qualifier -'},
     {'img': '',
      'link': '',
      'title': 'Full Cricket Score, IPL 2017, T20, Mumbai Indians vs Delhi Daredevils: MI beat DD by 14 runs - Hindustan Times'}
  • Get news by location

    >>> client.loaction = 'delhi'
    >>> client.get_news()
    [{'img': '',
      'link': '',
      'title': 'MCD polls: Cops wrap Delhi in multi-layer security blanket - Times of India'},
     {'img': '',
      'link': '',
      'title': "MCD polls 2017: Heritage not on any party's agenda - Financial Express"},
     {'img': '',
      'link': '',
      'title': 'Car owner booked for Kashmere Gate accident - Times of India - Times of India'}
  • Get list of available editions, languages and topics

    >>> client.editions
    ['Germany', 'Poland', 'Morocco', 'Colombia', 'India (Telugu)', 'Australia', 'Hungary', 'India (Malayalam)',
    'United Arab Emirates', 'Lebanon', 'Serbia', 'Canada (English)', 'China', 'United States (English)',
    'Nigeria', 'Austria', 'Kenya', 'Peru', 'Italy', 'Ghana', 'Ukraine (Russian)', 'Belgium (French)', 'Vietnam',
    'South Africa', 'Ethiopia', 'Lithuania', 'Philippines', 'Brazil', 'Saudi Arabia', 'India (Hindi)', 'India (Tamil)',
    'United States (Spanish)', 'Latvia', 'Singapore', 'Norway', 'Sweden', 'Canada (French)', 'Egypt', 'Japan',
    'Arab world', 'Ukraine (Ukranian)', 'Netherlands', 'Hong Kong', 'Romania', 'United Kingdom', 'Slovakia',
    'Czech Republic', 'Chile', 'Indonesia', 'France', 'Bangladesh', 'Taiwan', 'Tanzania', 'Argentina', 'Greece',
    'Mexico', 'Pakistan', 'Bulgaria', 'Senegal', 'Zimbabwe', 'Belgium (Dutch)', 'Uganda', 'Turkey', 'Portugal',
    'Slovenia', 'Namibia', 'Cuba', 'New Zealand', 'Russia', 'India (English)', 'Botswana', 'Venezuela', 'Israel (Hebrew)',
    'Thailand', 'Switzerland', 'Israel (English)', 'Ireland', 'Malaysia']
    >>> client.topics
    ['business', 'politics', 'top stories', 'technology', 'world', 'sports', 'entertainment', 'national']
    >>> client.languages
    ['tamil', 'kannada', 'norwegian', 'swedish', 'bulgarian', 'arabic', 'hindi', 'catalan', 'georgian', 'latvian',
    'albanian', 'japanese', 'english', 'german', 'lithuanian', 'chinese simplified', 'polish', 'czech', 'macedonian',
    'yiddish', 'turkish', 'dutch', 'urdu', 'serbian', 'basque', 'thai', 'hungarian', 'danish', 'galician', 'latin',
    'chinese traditional', 'vietnamese', 'portuguese', 'welsh', 'croatian', 'bengali', 'finnish', 'icelandic',
    'azerbaijani', 'swahili', 'malay', 'korean', 'slovak', 'russian', 'irish', 'spanish', 'belarusian', 'french',
    'estonian', 'indonesian', 'slovenian', 'italian', 'maltese', 'haitian creole', 'esperanto', 'ukrainian',
    'afrikaans', 'filipino', 'gujarati', 'hebrew', 'telugu', 'greek', 'persian', 'romanian']

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnfetcher-1.0.1.tar.gz (9.4 kB view hashes)

Uploaded source

Built Distribution

gnfetcher-1.0.1-py3-none-any.whl (11.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page