Skip to content

BeginnerUtilities & ToolsJavaScript

Run this module

cd "News Fetching"
node "fetchNews.js"

View source on GitHub


Google News Fetcher

This utility provides a Google News headline scraper using the google-news-json package. It no longer requires any API keys, making it ideal for beginners who want to experiment with news-driven trading ideas or sentiment analysis without signing up for external services.

Quick Start

cd "UTILS - News Fetching"
npm install
node fetchNews.js

Follow the interactive prompts to: - enter a company name or keyword (e.g., AAPL, stock market, inflation) - choose a locale (default en-US) - specify how many articles to retrieve (default 10)

Features

  • Keyword-driven Google News search
  • Locale support (language-country format such as en-US, fr-FR)
  • Configurable number of headlines to display
  • Beginner-friendly comments and console guidance

Files

  • fetchNews.js – interactive CLI script powered by google-news-json
  • package.json – dependency list (google-news-json only)

Notes

  • Results are scraped from Google News RSS feeds. Availability may vary by region and topic.
  • Google may rate-limit excessive requests. Keep usage reasonable.
  • Extend the script by saving article data to CSV/JSON, or by integrating with the sentiment analysis utility in UTILS - Sentiment Analysis on News/.
  • Beginner Python walkthroughs in Documentation/Programs/level1_fundamentals.py
  • Sentiment analysis workflow in UTILS - Sentiment Analysis on News/

License

MIT


Continue in Utilities & Tools

  • Core Utilities

    This folder contains core mathematical and date/time utilities that form the foundation for quantitative finance calculations.

  • Currency Converter

    This utility does NOT use any external APIs. All exchange rates are entered manually for learning and experimentation.

  • Data Processing

    This folder contains utilities for data processing, validation, and manipulation in financial applications.

  • Economic Calendar

    This utility does NOT use any external APIs. All data is managed locally for learning and experimentation.

  • Historical Data

    A Node.js script that fetches historical bars (OHLCV data) for stocks or crypto from the Alpaca Market Data API. It prompts interactively for the symbol type, symbol, timeframe, and date range, then prints the results as JSON.

  • Logging

    A pair of minimal, dependency-light logging utilities implemented in both Python and JavaScript. Each supports adding, reading, editing, and deleting log entries through an interactive command-line menu. All entries are persisted to a plain-text log.txt file in the working directory.

Browse all modules Learning paths