Scrape data from Yahoo Finance

If you are a savvy investor, it’s likely you follow the stock market on sites like Yahoo Finance.

Problem: To do a proper analysis of the data, you need to extract Yahoo Finance information into a spreadsheet. But are you still using copy/paste? No way! Let’s learn how to scrape Yahoo Finance with no technical knowledge.

Solution: Easily extract company information such as dividend, dividend yield, EPS, regular market price and many more from Yahoo Finance into a spreadsheet without any technical knowledge using our template to scrape Yahoo Finance and the ImportFromWeb add-on.

How it works

It uses the ImportFromWeb add-on that we built.

ImportFromWeb provides a simple function to extract data from any websites. You just need to find the urls of the pages you want to load and tell ImportFromWeb about the location of the elements you want to extract from those pages.

Copy the Yahoo Finance Scraper template

To properly set yourself up to extract thousands of data points from Yahoo Finance, the first thing you need to do is copy the template of our Yahoo Finance Scraper:

Copy the template

Install the add-on

Then, install the tool into your Google Sheets from the Google Workspace Marketplace following the step-by-step instructions indicated by the add-on. This is an easy process that just takes a minute and enables you to easily extract a high-volume of data from Yahoo Finance and most other websites.

From there, you can access the tool by clicking “Add-ons” and activating ImportFromWeb within the spreadsheet.

In the first tab, you will see a message ‘✓ You’re all set’ that indicates the add-on has been installed correctly and you’re ready to go!

Input the Stock Symbol into the Yahoo Finance Scraper

A stock symbol is a unique series of letters assigned to a security for trading purposes. Stocks listed on the New York Stock Exchange (NYSE) have four letters or less. Nasdaq-listed securities have up to five characters.

The only thing you need to know about the stock data you want to retrieve is the Stock Symbol. In Yahoo Finance the information about stocks is displayed in URLs such as this one:

In this example:

The Common URL to all market stocks:

The Stock Symbol: LIN

So, in the second tab of the Yahoo Finance Scraper, introduce as many stock values as you want, one per row, using this pattern: Common URL + STOCK SYMBOL

In a few seconds, you will see all the indicators for each stock value appear in the spreadsheet!

Yahoo Finance indicators you can extract with our scraper

When we say that you can extract hundreds of data points from Yahoo Finance with our scraper, we are serious! Here you have a list of the different data points you can retrieve.

Did you find this tool useful?

Has it helped you to create your own Finance dashboards? We’d love to hear all of your feedback so that we can keep providing the best information on web scraping.