How to Get NIFTY 50 and Other Index Historical Data via API
GET /v1/indices lists the indices we carry, each with a category. GET /v1/indices/{name}/prices returns daily open, high, low and close for one index, optionally bounded by from and to. Index names contain spaces, so URL-encode them.
curl -H "X-API-Key: bsk_live_..." \
"https://bharatstockapi.com/v1/indices/NIFTY%2050/prices?from=2026-08-01"import httpx
API = "https://bharatstockapi.com"
HEADERS = {"X-API-Key": "bsk_live_..."} # your key from the dashboard
r = httpx.get(f"{API}/v1/indices/NIFTY 50/prices", headers=HEADERS,
params={"from": "2026-08-01"}) # httpx encodes the space
r.raise_for_status()
for row in r.json()["data"]:
print(row["trade_date"], row["close"])These are end-of-day levels. Free keys see the last year. Concepts: NIFTY 50 and what an index is.