I use nasdaq datalink for most data. Still gotta source chart candles if you need that. Both nasdaq and nyse have FTP servers. Been a minute since I was snooping around. If memory serves tho. I believe one of them might have daily candles you can download. SEC also has an API with a good bit of data that's free. I scrape all three. Usually I grab the earnings calendar from nasdaq, then I scrape the SEC for each tickers CIK number. I use the CIK number to then automate filing scrapes when I need them... Pretty much all you need to start is sourced for free straight from the horses mouth. Only time you gotta start contemplating paying is when you start wanting shorter time frames than daily for your charts. Atleast that's been my experience. Any sort of TA you can apply to your own charts and use Matplotlib I'm sure I am missing a few nuanced bits here and there, but should be enough to get moving. 🤷♂️ Edit: The more posts I see like these. The more happy I am that I was a bit mischief curious..? 🤔 as a kid. I'm sure there are actual dev tools for these sorts of things, but the other day. I caught myself using burpsuite to figure out how to automate packet creation for another site i wanted to grab data from without paying for an api key. (And without using selenium/another headless browser) Finished up crafting the script and thought to myself. "There has to be specific developer tools that accomplish this exact same task in a more... straight forward??(idk if I'm phrasing this right...🤷♂️) kind of way... The site I was working on. I kept thinking. Ik they gotta be getting this info from somewhere else.. where is that... 🤔.. Idk. I'm at a point after doing sysadmin/netadmin/security/mspEngineer type work.. moving over to the development side. It's obviously different work, but the cross over in the tools used is fun. Obviously read about it, but actually doing it myself.. idk.... dopamine 😋 Answer from Lopsided_Fan_9150 on reddit.com
Reddit
reddit.com › r/algotrading › where can i find a free api with stock data for python?
r/algotrading on Reddit: Where can I find a free API with stock data for python?
November 17, 2024 -
I've been looking around for good APIs I can implement into different code to experiment with and so far the only good free one I found was Yahoo finance, however it's pretty limited but I can't find any other free ones, any suggestions?
Top answer 1 of 12
23
I use nasdaq datalink for most data. Still gotta source chart candles if you need that. Both nasdaq and nyse have FTP servers. Been a minute since I was snooping around. If memory serves tho. I believe one of them might have daily candles you can download. SEC also has an API with a good bit of data that's free. I scrape all three. Usually I grab the earnings calendar from nasdaq, then I scrape the SEC for each tickers CIK number. I use the CIK number to then automate filing scrapes when I need them... Pretty much all you need to start is sourced for free straight from the horses mouth. Only time you gotta start contemplating paying is when you start wanting shorter time frames than daily for your charts. Atleast that's been my experience. Any sort of TA you can apply to your own charts and use Matplotlib I'm sure I am missing a few nuanced bits here and there, but should be enough to get moving. 🤷♂️ Edit: The more posts I see like these. The more happy I am that I was a bit mischief curious..? 🤔 as a kid. I'm sure there are actual dev tools for these sorts of things, but the other day. I caught myself using burpsuite to figure out how to automate packet creation for another site i wanted to grab data from without paying for an api key. (And without using selenium/another headless browser) Finished up crafting the script and thought to myself. "There has to be specific developer tools that accomplish this exact same task in a more... straight forward??(idk if I'm phrasing this right...🤷♂️) kind of way... The site I was working on. I kept thinking. Ik they gotta be getting this info from somewhere else.. where is that... 🤔.. Idk. I'm at a point after doing sysadmin/netadmin/security/mspEngineer type work.. moving over to the development side. It's obviously different work, but the cross over in the tools used is fun. Obviously read about it, but actually doing it myself.. idk.... dopamine 😋
2 of 12
18
Search module on reddit works perfectly ! You will find plenty
Finnhub
finnhub.io
Finnhub Stock APIs - Real-time stock prices, Company fundamentals, Estimates, and Alternative data.
Finnhub - Free APIs for realtime stock, forex, and cryptocurrency. Company fundamentals, Economic data, and Alternative data.
rest - Python API to access Stock Market information - Stack Overflow
I would like to know if there is a place from where I can download metadata of a given stock. I was studying sometime back about REST API and I though I could maybe use something like this: stock_c... More on stackoverflow.com
How to get stock fundamentals data with Python
https://www.youtube.com/parttimelarry · It covers popular services and libraries like Alpaca, Robinhood Private API, TD Ameritrade option prices, Yahoo Finance, TradingView alerts, backtesting, and a lot more More on news.ycombinator.com
Where can I find a free API with stock data for python?
I use nasdaq datalink for most data. Still gotta source chart candles if you need that. Both nasdaq and nyse have FTP servers. Been a minute since I was snooping around. If memory serves tho. I believe one of them might have daily candles you can download. SEC also has an API with a good bit of data that's free. I scrape all three. Usually I grab the earnings calendar from nasdaq, then I scrape the SEC for each tickers CIK number. I use the CIK number to then automate filing scrapes when I need them... Pretty much all you need to start is sourced for free straight from the horses mouth. Only time you gotta start contemplating paying is when you start wanting shorter time frames than daily for your charts. Atleast that's been my experience. Any sort of TA you can apply to your own charts and use Matplotlib I'm sure I am missing a few nuanced bits here and there, but should be enough to get moving. 🤷♂️ Edit: The more posts I see like these. The more happy I am that I was a bit mischief curious..? 🤔 as a kid. I'm sure there are actual dev tools for these sorts of things, but the other day. I caught myself using burpsuite to figure out how to automate packet creation for another site i wanted to grab data from without paying for an api key. (And without using selenium/another headless browser) Finished up crafting the script and thought to myself. "There has to be specific developer tools that accomplish this exact same task in a more... straight forward??(idk if I'm phrasing this right...🤷♂️) kind of way... The site I was working on. I kept thinking. Ik they gotta be getting this info from somewhere else.. where is that... 🤔.. Idk. I'm at a point after doing sysadmin/netadmin/security/mspEngineer type work.. moving over to the development side. It's obviously different work, but the cross over in the tools used is fun. Obviously read about it, but actually doing it myself.. idk.... dopamine 😋 More on reddit.com
Is there any free stock market API that allows publishing on a website?
Hi there, I design financial-based web apps that perform all kinds of stock market functions and analysis. My first question is, what do you want to build and why? Would you like to monetize your work somehow via advertising or subscriptions, etc.? I only ask because unless you are using stock data on your own computer and not making it available to others via an app or a website, you are really not going to find anything legally for free. I pay for several services and I can say that the biggest advantage to that is that you can rely on your data to be working most all of the time. If you are using a free "hack" you never know when everything will just shut off and if you need reliability, you should really pay for a feed. Anyway, hit me up if you want to chat about your project, goals and so forth. I've helped numerous people over the years set up their own, customized SaaS businesses revolving around financial dashboards, etc. Cheers! More on reddit.com
Videos
03:39
How to Track Stock Prices Using Python | Real-Time Stock Monitoring ...
17:49
Automating Stock Data with Python and Google Sheets - YouTube
03:53
Scrape stock price data with Python - YouTube
11:33
Getting Stock Data With Python | API Tutorial Series | TwelveData ...
08:16
✅How to Extract Stock Data with Python and a Free API (Step ...
05:08
Free Stock Price API for Python - Too Good to be True? - YouTube
Massive
massive.com
Stock Market API | Massive
Stock API with real-time and historical tick data, unlimited usage via REST or WebSockets, standardized JSON and CSV formats. Instant access free tier.
GitHub
github.com › ranaroussi › yfinance
GitHub - ranaroussi/yfinance: Download market data from Yahoo! Finance's API · GitHub
yfinance offers a Pythonic way to fetch financial & market data from Yahoo!Ⓡ finance. ... Yahoo!, Y!Finance, and Yahoo! finance are registered trademarks of Yahoo, Inc. yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes.
Starred by 24.7K users
Forked by 3.4K users
Languages Python
Top answer 1 of 2
5
There is a free API provided by Yahoo that contains up to date data related with several tickets. You can see the API details here. One example to extract metadata from a ticket would be:
import yfinance as yf
stock_obj = yf.Ticker("GME")
# Here are some fixs on the JSON it returns
validated = str(stock_obj.info).replace("'","\"").replace("None", "\"NULL\"").replace("False", "\"FALSE\"").replace("True", "\"TRUE\"")
# Parsing the JSON here
meta_obj = json.loads(validated)
# Some of the short fields
print("sharesShort: "+str( meta_obj['sharesShort']))
print("shortRatio: "+str( meta_obj['shortRatio']))
print("shortPercentOfFloat: "+str( meta_obj['shortPercentOfFloat']))
The output for the ticket you are interested in would be:
sharesShort: 61782730
shortRatio: 2.81
shortPercentOfFloat: 2.2642
2 of 2
1
You can use the free Yahoo Finance API and their most popular Python library yfinance. Link: https://pypi.org/project/yfinance/
Sample Code:
import yfinance as yf
GME_data = yf.Ticker("GME")
# get stock info
GME_data.info
Other than that you can also use many other API. You can search in RapidAPI and search "Stock".
Medium
blog.dataengineerthings.org › best-stock-market-api-for-python-developers-2026-43680cf9c1a2
Best Stock Market API for Python Developers (2026) | by Kevin Meneses González | Jul, 2026 | Data Engineer Things
4 days ago - ❓ Is there a free stock market API for Python? ✅ Yes. EODHD, Alpha Vantage, and yfinance all offer free access.
Finage
finage.co.uk › blog › best-stock-market-apis-for-python-realtime-data,-charts-trading--681e5ddb3a5709e03acf8857
Best Stock Market APIs for Python: Real-Time Data, Charts & Trading | Finage Blog
Here are some key Python tools to help you access and manage stock market data efficiently: The requests library is the most popular way to make HTTP requests in Python. You can easily fetch real-time stock prices, historical data, and financial news from Finage’s API by making GET requests and parsing the JSON responses.
Alpha Vantage
alphavantage.co
Free Stock APIs in JSON & Excel | Alpha Vantage
Alpha Vantage offers free stock APIs in JSON and CSV formats for realtime and historical stock market data, options, forex, commodity, cryptocurrency feeds and over 50 technical indicators. Global market news API and sentiment scores powered by AI and machine learning.
Hacker News
news.ycombinator.com › item
How to get stock fundamentals data with Python | Hacker News
May 15, 2020 - https://www.youtube.com/parttimelarry · It covers popular services and libraries like Alpaca, Robinhood Private API, TD Ameritrade option prices, Yahoo Finance, TradingView alerts, backtesting, and a lot more
Finnhub
finnhub.io › docs › api
API Documentation | Finnhub - Free APIs for realtime stock, forex, and cryptocurrency. Company fundamentals, economic data, and alternative data.
Finnhub - Free APIs for realtime stock, forex, and cryptocurrency. Company fundamentals, Economic data, and Alternative data.
Medium
medium.com › @jsteinb › python-build-a-program-to-retrieve-and-graph-live-stock-market-data-311d9ca1b7d3
Python: Build a Program to Retrieve and Graph Live Stock Market Data | by Jordan Steinberg | Medium
February 21, 2025 - This will allow us to query yahoo finance api for our desired data. stock=input("Enter a stock symbol: ") print(stock) Running the above lines of code will ensure that python recognizes the stock variable and the output should be whatever ticker symbol you put in. The first line will prompt you to enter a stock symbol. The print statement verifies that the variable ‘stock’ has been registered. III. Retrieve Market Data for our Desired Stock