Api'S FOR STOCK

Hi

 

Im working on installing API's to retrieve stock data from NSE into spreadsheets. I've tried several but not working because they are all foreign API's for their stocks. Is there any API which works in India, free to use and easy to install and run?

 

Reg

Replies (1)

You're on the right track — many APIs out there (like Yahoo Finance, Alpha Vantage, IEX Cloud) mainly serve US/global markets, and retrieving NSE (India) stock data is tricky due to restrictions.

But yes, there are a few India-based APIs (some free, some limited) that can help you pull NSE stock data into spreadsheets.


βœ… Best APIs for NSE (India) Stock Data

πŸ”Ή 1. NSE India (Official Website) – Unofficial API

While NSE doesn't officially offer a public API, developers use web-scraping or unofficial endpoints.

Example Endpoint:

 
https://www.nseindia.com/api/quote-equity?symbol=INFY

❗ You'll need to set custom headers (like user-agent) and use it via Python, Apps Script, etc.

πŸ”§ How to Use:

  • Write a Google Apps Script (for Google Sheets) or Python scriptt

  • Include headers to mimic a browser request

β›” Limitations:

  • Can break anytime (not officially supported)

  • Rate-limited

  • NSE blocks bots aggressively


πŸ”Ή 2. Groww / Zerodha Kite / Upstox APIs (For Trading + Data)

These are broker-backed APIs — need account & token.

Platform Access Type Notes
Zerodha Kite Connect Paid β‚Ή2000/month for access, very powerful
Upstox API Free/Paid Good documentation
Groww API Beta/invite-based Use with Groww account

βœ… Includes live prices, historical data, orders, etc.
⚠ Requires you to be a customer and go through API token setup.


πŸ”Ή 3. RapidAPI – Unofficial NSE API

Some developers have hosted NSE stock APIs on RapidAPI.

Example:

  • NSE Stock API – returns quotes, option chains, etc.

  • Needs API key (free tier usually available)


πŸ”Ή 4. Value Research / Screener.in (For Fundamentals)

While they don't offer real-time data:

  • Screener.in allows export to Excel

  • Great for financials, P&L, balance sheet, ratios

Use it for analysis, not price tracking.


πŸ”Ή 5. Google Sheets Add-ons (Limited Support)

  • =GOOGLEFINANCE("NSE:INFY") used to work, but now inconsistent for Indian stocks.

  • You can try:

    • MoneyControl Scraper

    • Yahoo Finance (via Apps Script) — also limited for Indian stocks


βœ… Recommendation (Free & Practical)

If you want free + spreadsheet integration, try this:

πŸ“Œ Method: Google Sheets + Apps Script + NSE Unofficial API

  1. Go to Google Sheets > Extensions > Apps Script

  2. Paste this code:

 
function getNSEPrice(symbol) { var url = "https://www.nseindia.com/api/quote-equity?symbol=" + symbol; var options = { "method": "get", "headers": { "User-Agent": "Mozilla/5.0" } }; var response = UrlFetchApp.fetch(url, options); var json = JSON.parse(response.getContentText()); return json["priceInfo"]["lastPrice"]; }
  1. Save it, then use:

 
=getNSEPrice("INFY")

in your sheet.

⚠ You may need to run it manually first to authorize the scriptt.


🧠 Summary

API Type Source Free? Best For
Unofficial NSE nseindia.com βœ… Basic live prices
Broker APIs Zerodha, Upstox ❌ Live trading + data
Screener / ValueResearch Screener.in βœ… Financials & ratios
RapidAPI Community APIs βœ… (limited) Options & quotes
GoogleFinance Google Sheets ❌ (Inconsistent) Hit or miss for NSE

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Related Topics :

Loading
Company
ARTICLESHIP 28 September 2026
Junior Accountant

J S P M & Associates LLP

Pune

B.Com

View Details
Company
17 September 2026
Chartered Accountant

Dass Gupta & Associates

Gurgaon

CA

View Details
Company
Featured 11 September 2026
Audit Executive

RBSM Corporate Advisors Private Limited

Pune

CA

View Details
Company
09 September 2026
SENIOR AUDITOR & ACCOUNTS MANAGER

Anupam Parashar & Co.

Ghaziabad

CA Final

View Details
Company
ARTICLESHIP 16 September 2026
Article Assistant

MANUJ SHARMA AND COMPANY

Noida

CA Inter

View Details
Company
16 September 2026
Internal Audit - Team Lead

Consulting & Beyond

Chennai

CA

View Details
Company
30 September 2026
Senior Accountant

Codeboard Technology

Chennai

B.Com

View Details
Company
ARTICLESHIP 07 September 2026
Article/ Paid Assistant

Murali and Sumeet Chartered Accountant

Bengaluru

CA Foundation

View Details