- GuruFinance Insights
- Posts
- 📰 How to Get Historic Stock News for Free with Python: A Step-by-Step Guide
📰 How to Get Historic Stock News for Free with Python: A Step-by-Step Guide
Big Tech Has Spent Billions Acquiring AI Smart Home Startups
The pattern is clear: when innovative companies successfully integrate AI into everyday products, tech giants pay billions to acquire them.
Google paid $3.2B for Nest.
Amazon spent $1.2B on Ring.
Generac spent $770M on EcoBee.
Now, a new AI-powered smart home company is following their exact path to acquisition—but is still available to everyday investors at just $1.90 per share.
With proprietary technology that connects window coverings to all major AI ecosystems, this startup has achieved what big tech wants most: seamless AI integration into daily home life.
Over 10 patents, 200% year-over-year growth, and a forecast to 5x revenue this year — this company is moving fast to seize the smart home opportunity.
The acquisition pattern is predictable. The opportunity to get in before it happens is not.
Past performance is not indicative of future results. Email may contain forward-looking statements. See US Offering for details. Informational purposes only.
🚀 Your Investing Journey Just Got Better: Premium Subscriptions Are Here! 🚀
It’s been 4 months since we launched our premium subscription plans at GuruFinance Insights, and the results have been phenomenal! Now, we’re making it even better for you to take your investing game to the next level. Whether you’re just starting out or you’re a seasoned trader, our updated plans are designed to give you the tools, insights, and support you need to succeed.
Here’s what you’ll get as a premium member:
Exclusive Trading Strategies: Unlock proven methods to maximize your returns.
In-Depth Research Analysis: Stay ahead with insights from the latest market trends.
Ad-Free Experience: Focus on what matters most—your investments.
Monthly AMA Sessions: Get your questions answered by top industry experts.
Coding Tutorials: Learn how to automate your trading strategies like a pro.
Masterclasses & One-on-One Consultations: Elevate your skills with personalized guidance.
Our three tailored plans—Starter Investor, Pro Trader, and Elite Investor—are designed to fit your unique needs and goals. Whether you’re looking for foundational tools or advanced strategies, we’ve got you covered.
Don’t wait any longer to transform your investment strategy. The last 4 months have shown just how powerful these tools can be—now it’s your turn to experience the difference.

Ever felt frustrated by paywalled financial news services that charge hundreds of dollars for stock market insights? What if I told you that with just a few lines of Python code, you could build your own news aggregation tool that fetches real-time stock news… for free?
Smarter Investing Starts with Smarter News
The Daily Upside helps 1M+ investors cut through the noise with expert insights. Get clear, concise, actually useful financial news. Smarter investing starts in your inbox—subscribe free.
Breaking Through Information Barriers
As a data enthusiast and budget-conscious investor, I was tired of:
Paying hefty subscription fees for financial news platforms
Missing out on timely market insights
Feeling like good information was locked behind expensive gates
That’s when I decided to create my own solution: a stock news scraper that pulls articles from Google News across multiple sectors.
Why This Matters? 🤔
Historic stock news is invaluable for traders, analysts, and researchers. It helps in:
Understanding market sentiment 📈
Evaluating company performance 🏢
Making informed investment decisions 💡
But the challenge is finding free and reliable sources. Let’s resolve this issue with code! 💻✨
Step 1: Setting Up Your Environment 🛠️
First, install the necessary Python libraries:
!pip install feedparser pandas -q
import feedparser
import pandas as pd
from datetime import datetime, timedelta
from urllib.parse import quote_plus
import ipywidgets as widgets
from IPython.display import display, clear_output, HTML
from IPython.display import Javascript
These libraries will help us parse RSS feeds and handle data efficiently.
Step 2: Define Your Stock Universe 🌍
Let’s create a dictionary of popular stocks categorized by sectors:
def get_popular_stocks():
return {
"Technology": {
"Apple": "AAPL",
"Microsoft": "MSFT",
"Amazon": "AMZN",
"Alphabet (Google)": "GOOGL",
"Nvidia": "NVDA"
},
# Add other sectors like Finance, Retail, etc.
}
This ensures you can easily fetch news for companies like Apple 🍎 or Microsoft 🖥️.

Step 3: Fetch Historic News Articles 📜
The real magic happens here! Using Google News RSS feed, you can retrieve articles based on company names up to 90 days of news:
def get_stock_news(company_name, ticker, days=90):
end_date = datetime.now()
start_date = end_date - timedelta(days=days)
query = quote_plus(f'{company_name} OR {ticker} after:{start_date.strftime("%Y-%m-%d")} before:{end_date.strftime("%Y-%m-%d")}')
rss_url = f'https://news.google.com/rss/search?q={query}&hl=en-US&gl=US&ceid=US:en'
feed = feedparser.parse(rss_url)
news_items = []
for entry in feed.entries[:100]: # Hardcoded max 100 articles
try:
news_items.append({
'date': entry.get('published', 'N/A'),
'title': entry.title,
'url': entry.link,
'source': entry.get('source', {}).get('title', 'N/A'),
'company': company_name,
'ticker': ticker
})
except:
continue
df = pd.DataFrame(news_items)
if not df.empty:
df['date'] = pd.to_datetime(df['date'])
return df
This function fetches up to 100 articles based on the company name or ticker within a specified date range from Google RSS feed📅.
Key Features:
Extended Date Range: The
days
parameter now defaults to 90, allowing retrieval of news articles from the past three months.Dynamic Query: Leverages Google News RSS feeds, fetching articles based on stock tickers or company names.
Efficient Parsing: Limits results to 100 articles per query for performance optimization.
Data Output: Returns a clean DataFrame containing article details such as date, title, URL, source, company name, and ticker.
Step 4: Build an Interactive UI 🎨
Want to make it user-friendly? Create a simple interface using ipywidgets
:
def create_stock_news_ui():
stocks = get_popular_stocks()
result_df = pd.DataFrame()
# Initialize with Technology stocks
initial_category = "Technology"
initial_stocks = [(f"{k} ({v})", (k, v)) for k, v in stocks[initial_category].items()]
# Category dropdown
category_dropdown = widgets.Dropdown(
options=list(stocks.keys()),
value=initial_category,
description='Category:',
disabled=False
)
# Stock selection - changed to Dropdown for single selection
stock_dropdown = widgets.Dropdown(
options=initial_stocks,
description='Stock:',
disabled=False,
layout={'width': '500px'}
)
This interface lets users select stocks and fetch news interactively 🔧

Step 5: Save Results as CSV 📂
Export your fetched data for further analysis:
def download_csv(df):
filename = f"stock_news_{datetime.now().strftime('%Y%m%d_%H%M')}.csv"
df.to_csv(filename, index=False)
Now you can save your data locally and analyze it anytime! ✅
Step 6: Test It Out
Run Google Colab Notebook and start fetching historic stock news for free. Whether you’re analyzing Tesla 🚗 or Amazon 🛒, this solution has covered you!

Final Thoughts 💭
This workflow is a game-changer for anyone looking to access historic stock news without breaking the bank 💵. With Python’s power and Google News RSS feed 🌐, you can unlock valuable insights effortlessly.