banner_ad

Api'S FOR STOCK

Others 3088 views 1 replies

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


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
29 May 2026
Company Secretary - Part time

Shaswat initial support private limited

Ahmedabad

CS

View Details
Company
16 May 2026
Audit clerk

mgirt & co

Bengaluru

CA Inter

View Details
Company
18 May 2026
MIS Executive

Primarc Pecan Retail Limited

Mumbai

B.Com

View Details
Company
ARTICLESHIP 14 May 2026
CA ARTICLE

PRAVEEN GARG & CO

Faridabad

CA Foundation

View Details
Company
19 May 2026
Accountant

ca kunjan

Mumbai

CA Inter

View Details
Company
ARTICLESHIP 15 May 2026
Audit Assistant / Article Trainee / Intern

SSGS and Associates

Chennai

CA Inter

View Details
Company
ARTICLESHIP 31 May 2026
Article Assistant

KPRS And Associates

New Delhi

CA Inter

View Details
Company
04 June 2026
Semi Qualified CA

Goyal Puneet & Associates

New Delhi

CA Final

View Details