hands-on lab

Leveraging the Yahoo Finance API to Retrieve and Visualize Financial Data

Up to 1h
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


If you are looking for a way to get and handle market data, the Yahoo Finance API is one of the best choices you can use. Yahoo Finance API allows you to retrieve thousands of market data related to loads of enterprises and different timing. One of the most interesting things is that it's completely free of charge if you perform less than 3.000 API calls each hour. Because of the quantity and quality of data you can retrieve, this is a very good limit. The Yahoo Finance API can be used by leveraging different libraries. One of the most commonly used is the Python yfinance library.

In this lab, you will leverage the Yahoo Finance API using the yfinance Python library, and you will visualize the market data using the plotly Python library.

Learning Objectives

Upon completion of this lab you will be able to:

  • Leverage the Yahoo Finance API through the yfinancy libary
  • Understand which market data are available to use
  • Plot relevant market data using the plotly library

Intended Audience

This lab is intended for:

  • Data scientists interested in a way to easily retrieve market data
  • Anyone interested in the financial world and that want to handle and visualize market data


To get most from this lab, you should be familiar with basic finance concepts. To get ready for it, you can complete the following labs:


February 27th, 2024 - Resolved a dependency issue when installing yfinance

About the author

Learning paths

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics

Lab steps

Starting the Yahoo Finance Jupyter Notebook