Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

How to Get Realtime Stock Data From Google

3 min read

Can you still get realtime stock data from Google? Not through an API. The free finance/info JSON endpoint described in this 2014 post no longer works; requests now redirect to an “unsupported” page. Today the practical Google option is the GOOGLEFINANCE function in Google Sheets (quotes may be delayed up to 20 minutes), and for live trading you need a broker or exchange-licensed feed. The original method and code are kept below for reference, followed by working alternatives.

Key takeaways
  • The Google Finance info API (finance/info?q=) used in 2014 is discontinued; it now redirects to google.com/finance/unsupported.
  • GOOGLEFINANCE in Google Sheets gives price, open, high, low, volume and more, but quotes can be delayed up to 20 minutes.
  • GOOGLEFINANCE data cannot be pulled through the Sheets API or Apps Script.
  • For live Indian market quotes in Python, use your broker API, for example through OpenAlgo’s quotes endpoint.

The Original Method (2014): Realtime Stock Data From Google

Sometime back we discussed about how to get Intraday backfill data from Google and this short article focus on how to get Realtime stock data from Google. Google provides realtime cash market/index/currency data for most of the markets in JSON format.

URL Format to Retrieve Realtime Quotes

http://www.google.com/finance/info?q=AAPL
http://www.google.com/finance/info?q=NSE:NIFTY

You can get multiple quotes in a single request by comma separating the symbols on q parameter.

OpenAlgo: one API for 35+ Indian brokers

FREE AND OPEN SOURCE

OpenAlgo: one API for 35+ Indian brokers

Self-hosted algo trading platform. Send orders from Python, AmiBroker, TradingView, Excel or a no-code flow through one consistent API.

  • Unified REST and WebSocket API
  • Works with AmiBroker, TradingView, ChartInk and Excel
  • Sandbox mode to test before going live
Get OpenAlgo →by Marketcalls
http://finance.google.com/finance/info?client=ig&q=NSE:NIFTY,NSE:RELIANCE

Sample JSON Output Format for Nifty Spot Index (India)

Google finance can return stock quotes using the JSON format, which can be read by programming languages like PHP, Python, Java etc.

// [ { "id": "207437" ,"t" : "NIFTY" ,"e" : "NSE" ,"l" : "7,329.65" ,"l_fix" : "7329.65" ,"l_cur" : "Rs.7,329.65" ,"s": "0" ,"ltt":"3:31PM GMT+5:30" ,"lt" : "May 28, 3:31PM GMT+5:30" ,"lt_dts" : "2014-05-28T15:31:28Z" ,"c" : "+11.65" ,"c_fix" : "11.65" ,"cp" : "0.16" ,"cp_fix" : "0.16" ,"ccol" : "chg" ,"pcls_fix" : "7318" } ]

Sample Python Code to Fetch Realtime Stock Data

Sample python code to fetch realtime stock data (Python 2, as originally published):

from urllib import urlopen
import json

def googleQuote(ticker):
    url = '%s%s' % ('http://www.google.com/finance/info?q=', ticker)
    doc = urlopen(url)
    content = doc.read()
    quote = json.loads(content[3:])
    quote = float(quote[0][u'l'])
    return quote

if __name__ == "__main__":
    ticker = 'GOOG'
    print googleQuote(ticker)

To fetch the data every 30th second here is the python code. The below code prints the Quote for Reliance stock on NSE every 30 seconds.

import urllib2
import json
import time

class GoogleFinanceAPI:
    def __init__(self):
        self.prefix = "http://finance.google.com/finance/info?client=ig&q="

    def get(self,symbol,exchange):
        url = self.prefix+"%s:%s"%(exchange,symbol)
        u = urllib2.urlopen(url)
        content = u.read()

        obj = json.loads(content[3:])
        return obj[0]

if __name__ == "__main__":
    c = GoogleFinanceAPI()

    while 1:
        quote = c.get("RELIANCE","NSE")
        print quote
        time.sleep(30)

Does the Google Finance API Still Work in 2026?

No. Google never offered this as an official, documented API, and it was switched off years ago. Checked in November 2026, a request to www.google.com/finance/info?q=NSE:NIFTY returns a redirect to google.com/finance/unsupported. Google Finance also stopped providing historical price downloads in March 2018, which is why tools like R’s quantmod marked their Google data source defunct (quantmod documentation). The same applies to the Google intraday backfill URLs used in older posts such as importing Google intraday and EOD NSE data into MetaTrader 4.

The code above is also Python 2 (urllib2, print quote), so it will not run on Python 3 even against a working endpoint.

Alternatives for Realtime Stock Data in 2026

OptionDelayBest forLimitations
GOOGLEFINANCE in Google SheetsUp to 20 minutesWatchlists, portfolio trackersNot for trading; no access via Sheets API or Apps Script
yfinance (Yahoo Finance, unofficial)Varies, often delayedResearch, backtests, quick scriptsUnofficial; can break when Yahoo changes its site
Broker APIs (directly or via OpenAlgo)LiveAlgo trading and live dashboardsNeeds a broker account; some brokers charge for data APIs
Authorised data vendorsLive or tickCharting platforms like AmiBrokerPaid subscription

Using GOOGLEFINANCE in Google Sheets

Type a formula such as =GOOGLEFINANCE("NSE:RELIANCE","price") in a cell. Other real-time attributes include priceopen, high, low, volume, tradetime and datadelay. Google states that quotes are not sourced from all markets, may be delayed up to 20 minutes and are not meant for trading (GOOGLEFINANCE help).

Updated Version (2026): Live Quotes in Python via OpenAlgo

This Python 3 version does the same job as the 30-second loop above, but reads quotes from your broker through a self-hosted OpenAlgo server. The /api/v1/quotes endpoint takes your API key, symbol and exchange and returns open, high, low, LTP, bid, ask, previous close, volume and OI (OpenAlgo quotes API).

import time
import requests

OPENALGO_URL = "http://127.0.0.1:5000/api/v1/quotes"
API_KEY = "your_openalgo_api_key"


def get_quote(symbol, exchange="NSE"):
    payload = {"apikey": API_KEY, "symbol": symbol, "exchange": exchange}
    r = requests.post(OPENALGO_URL, json=payload, timeout=10)
    r.raise_for_status()
    data = r.json()
    if data.get("status") != "success":
        raise RuntimeError(data)
    return data["data"]


if __name__ == "__main__":
    while True:
        q = get_quote("RELIANCE", "NSE")
        print(q["ltp"], q["bid"], q["ask"], q["volume"])
        time.sleep(30)

New to OpenAlgo? Start with the OpenAlgo introduction. If you only need delayed data for research, see the complete yfinance guide or Python libraries with historical data APIs.

Frequently Asked Questions

Is Google Finance data real time?

Not always. Google says GOOGLEFINANCE quotes may be delayed up to 20 minutes and are not sourced from all markets. Use the datadelay attribute to see the delay for a symbol.

Does Google Finance have an API?

Not a public one. The old finance/info endpoint is discontinued. The supported route is the GOOGLEFINANCE function inside Google Sheets.

Can I use Google Finance data for algo trading?

No. Google states the data is not for trading purposes, and the delay makes it unsuitable. Use a broker API or a licensed data vendor.

How do I get NSE realtime data in Python for free?

Most Indian brokers provide quote APIs to their clients, some free and some paid. OpenAlgo gives you one Python interface across supported brokers.

Python Elite membership

MEMBERSHIP

Python Elite membership

15 Python, AI and algo trading programs in one plan, including QuantFlow and AI Bootcamp live mentorship.

  • Python from fundamentals to trading apps
  • Backtesting, broker APIs and OpenAlgo
  • Live QuantFlow and AI Bootcamp sessions
View Python Elite →by Marketcalls

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

54 Replies to “How to Get Realtime Stock Data From Google”

  1. Thanks Rajandran sir for this useful info, but i want to know you that how can i add this on blogger blogspot please reply.

    1. @Ajay, You cannot add in your blogspot blog as it doesnt support custom programming like php, python. However if you hosted in your own server with little programming skills you can get the data.

  2. please sir, can you post how to get real time date of MT4 TO AMI Broker ? The two you published before not working, can you publish for window 7 please ?

    Thank you

  3. Sir ,plz tell abt free data provider for EIOD ,real time AND EOD data provider for mcx and nse

  4. Hi…How can I pull real time mcx commodity data just like you have done it for stocks.

    Thanks

  5. Hi Rajendran, Can I pull in Silver Mini Mcx data just like you have done it for stocks! Please let me know of your ideas
    Thanks

  6. Hi,
    Can we use this data for real time Algo trading ? Is it delayed data ? And how can I get historical (atleast 1 yrs) RT data to backtest my strategies ?

    Thanks and Regards,
    Pravin

  7. Pravin – For Algo Trading Live level 3 data is required which no data providers provide you can only take through exchange itself.

    Historical data can purchased from Exchanges it self.

  8. Hello Sir,
    I want to get only Last Traded Price & Last Traded Time ,Script.
    Is there any way to do it..

    With Regards
    Ganesh

      1. Sir,
        Thanx For Your Reply.
        I am Software Engineer. By Using VB.net , I Fetch RealTime Data as
        // [ { “id”: “3302534” ,”t” : “ABAN” ,”e” : “NSE” ,”l” : “759.60” ,”l_fix” : “759.60” ,”l_cur” : “Rs.759.60″ ,”s”: “0” ,”ltt”:”9:31AM GMT+5:30″ ,”lt” : “Sep 3, 9:31AM GMT+5:30″ ,”lt_dts” : “2014-09-03T09:31:48Z” ,”c” : “+9.00″ ,”c_fix” : “9.00” ,”cp” : “1.20” ,”cp_fix” : “1.20” ,”ccol” : “chg” ,”pcls_fix” : “750.6” } ,{ “id”: “11787956” ,”t” : ”

        Actually I need to fetch only t , L_Fix and lt DTs Parameter

        How to do It?
        With Regards
        Ganesh

  9. Hi,

    I am using above url to get real time data. I figured out all values except ”s”: “0” tag. Any idea what it stands for?

    Also, if we are using this url to get data for different markets, is there anyway to determine if markets are open or closed?

    Thanks.

    1. I figured out “s” tag, “s” stands for session possible values are “0” (zero) – normal market, “1” – pre-market and “2” – after hours.

      Still need to figure out, how to determine that market is closed … especially needed for markets where there is no pre-market or after hours trading

  10. Hi guys,
    some help required. I tried above script. when i run in python i am getting the following error.
    quote = c.get(“RELIANCE”, “NSE”)
    AttributeError: GoogleFinanceAPI instance has no attribute ‘get’

    Did i miss some thing. thanks in advance.
    srini

  11. How can I get stock symbols of google finance and yahoo finance for my code. ( E,g Google Finance NSE:RELIANCE ; Yahoo finance : yhoo

  12. How do I get data for few months
    For example if I want data for last 6 months .
    How should I modify the above command ?

  13. Hi,
    First of all thank you for such an informative site. My question is – how to get All 5000+ srcips on BSE and their last traded prices?
    This of course has to be in one shot every minute or so, not iteratively.

    Thank in advance.
    Regards,
    Anand.

  14. Kind attention Mr Lokesh Madan…..

    Dear sir, I am a practicing doctor and pretty much of a novice with regard to Algo trading in equity markets, though i have been trading since quite some time and have read about it quite a lot. I request your good-self to please suggest to me whether one could set up an independent algo trading co-located facility, if one were to have a broker’s license and what would be the approx costs.Any details about it is welcome.

  15. I use following code in my javascript and works perfectly fine.

    var googData = “http://finance.google.com/finance/info?client=ig&q=NSE:”+KEY.nseCode+””;
    $.get(googData, function(data){
    var jsonElement = data.replace(“//”,””).replace(“[“,””).replace(“]”,””);
    var jsonVar = JSON.parse(jsonElement);
    var instr = jsonVar.l;
    var pnum = instr.replace(“,”,””);
    var stPrice = parseInt(pnum);
    });

    -neo

    1. Hi What was the value substituted for KEY.nseCode. I want to get only last trade symbol voulme, StockExchange, earnings/share, divdend, AvgVol(3m). Any idea what is the google finance support for this requirement? Thanks in advance.

  16. How to get quote values like CLOSE,HIGH,LOW,OPEN,VOLUME realtime.What are the fullform of all the json keys. (example e = Exchange)

  17. Excelent work Rajandran, thanks a lot.

    I’m using it on php and it is working awesome, but I would like to get some other parameters like EPS and PERatio…is it possible to get them? Do you know how?

    Thanks a lot!!

  18. Dear Mr. Rajendran,
    Your work is very much interesting.
    I would like to integrate live chart OR end of the chart (NSE(FUTURE,CASH),MCX,SENSEX) in my web site. how to do it using iframe.
    Please help me.
    thanks in advance.

  19. Hi Rajandran, first of all, i would like to thank you for this post. I tried using above URLs but now i think it stopped working, so i tried using this link: https://www.google.com/finance/getprices?i=1&p=1d&f=d,o,h,l,c,v&df=cpct&x=NSE&q=VEDL,RELIANCE to get data of multiple stocks, but it returns merely this:

    EXCHANGE%3DNSE
    MARKET_OPEN_MINUTE=555
    MARKET_CLOSE_MINUTE=930
    INTERVAL=1
    COLUMNS=DATE,CLOSE,HIGH,LOW,OPEN,VOLUME
    DATA=

    Any solution on how do i retrieve data for multiple symbols?

      1. Hi Rajendran ,

        Programmatically when I tried it is not working .Was there any change in the URL parameters.

        Also Vedl/ IGL it is giving NYSE rates

        please verify and let us know .

        Regards,
        L

  20. HELLO,

    I NEED TO FILTER DATA IN REALTIME FROM GOOGLE FOR A PARTICULAR PRICE TREND FOR INTRADAY TRADE.

    COULD YOU PLEASE HELP HOW TO DO THAT

  21. You should used MarketXLS.
    They have regular updates and customer support.
    It cost a little but it would save you time.
    Hope it helps.

  22. This no longer works. Can you please check, is there any other way to capture the google online feed?

  23. Hi , These services are not in operation now, recently google has halted these services, Can any one please suggest any free/paid alternatives for this

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More