# India Stock Market (`apiguruu/india-stock-market-api`) Actor

moneycontrol api  ireda share price api , irfc share price api, tata power share price api nifty 50 api (Live Nifty 50, NSE & BSE) AI-ready with MCP support cheap.for better api structure visit here : { https://rapidapi.com/matepapava123/api/india-stock-market-moneycontrol-live-api }

- **URL**: https://apify.com/apiguruu/india-stock-market-api.md
- **Developed by:** [apiguru](https://apify.com/apiguruu) (community)
- **Categories:** News, Automation, AI
- **Stats:** 136 total users, 8 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## India Stock Market Data — NSE, BSE, Mutual Funds, IPO, FII/DII

Complete Indian stock market scraper. Covers **5000+ NSE/BSE stocks**, **30+ indices**, **10000+ mutual fund schemes**, FII/FPI daily activity, upcoming IPOs, corporate actions, derivatives, and financial news.

Each actor run executes **one action** with its own set of parameters. Results are pushed to the Apify dataset as flat rows — one row per stock/candle/article — ready to export as CSV, Excel, or JSON.

***

### Actions

| Action | What it returns | Key inputs |
|--------|-----------------|------------|
| `stock_quote` | Live price + 30 metrics (PE, PB, 52-wk, market cap) | `symbol` |
| `stock_search` | Find any stock by name, ticker, or ISIN | `query` |
| `stock_chart` | Historical OHLCV candles (1 min → monthly) | `symbol`, `resolution`, `days` |
| `delivery` | Delivery volume, delivery %, 1-wk & 1-mo averages | `symbol` |
| `technicals` | Pivot levels, SMA, EMA, buy/sell signals | `symbol`, `duration` |
| `analyst_rating` | Buy/Sell/Hold consensus from 30+ analysts | `symbol` |
| `price_target` | Analyst consensus price target (high/mean/low) | `symbol` |
| `index_details` | Full index stats (Nifty 50, Sensex, Bank Nifty…) | `indexId` |
| `index_constituents` | All stocks in an index with live prices | `indexId` |
| `index_chart` | Index time-series (intraday to 5-year) | `indexId`, `chartRange` |
| `market_gainers` | Top gaining stocks today | `indexId`, `limit` |
| `market_losers` | Top losing stocks today | `indexId`, `limit` |
| `market_active` | Most traded stocks by volume | `indexId`, `limit` |
| `financials` | Income statement, balance sheet, cash flow, ratios | `symbol` or `scId`, `statement` |
| `shareholding` | Promoter, FII, DII, public holding pattern | `symbol` or `scId` |
| `peers` | Peer comparison with key metrics | `symbol` or `scId` |
| `mf_search` | Search mutual fund schemes by name | `query` |
| `mf_nav` | Latest NAV with fund details | `schemeCode` |
| `mf_history` | Historical NAV data (paginated) | `schemeCode`, `page`, `limit` |
| `ipo_upcoming` | Open and upcoming IPOs | *(none)* |
| `ipo_listed` | Recently listed IPOs with performance | *(none)* |
| `fii_dii` | FII/FPI daily equity + debt buy/sell (NSDL) | *(none)* |
| `corporate_actions` | Dividends, splits, bonuses, rights, buybacks | `actionType`, `page`, `limit` |
| `commodity_quote` | MCX futures price (Gold, Silver, Crude Oil) | `symbol`, `expiry` |
| `futures` | Active futures contracts with open interest | `symbol` |
| `options_chain` | Full call/put options chain | `symbol`, `expiry`, `optionType` |
| `oi_trends` | F\&O OI buildup (active buying, short covering…) | `oiCategory`, `oiExpiry` |
| `oi_change` | Strike-wise Put/Call OI change chart | `oiScId`, `oiExpiry` |
| `news` | Financial news headlines by category | `newsCategory`, `page`, `limit` |

***

### Section 1 — Stock / Symbol

#### Get a live stock quote

```json
{
  "action": "stock_quote",
  "symbol": "RELIANCE"
}
```

**Output (one row):**

```json
{
  "_action": "stock_quote",
  "_status": "success",
  "symbol": "RELIANCE",
  "price": 2850.45,
  "change": 12.30,
  "percentchange": "0.43",
  "open": 2840.00,
  "high": 2865.00,
  "low": 2830.10,
  "volume": "4521890",
  "pe": 28.4,
  "pb": 2.1,
  "52_week_high": 3025.00,
  "52_week_low": 2205.50
}
```

#### Search for a stock by name or ISIN

```json
{
  "action": "stock_search",
  "query": "HDFC Bank"
}
```

**Output (one row per match):**

```json
{
  "_action": "stock_search",
  "_status": "success",
  "sc_id": "HDF01",
  "stock_name": "HDFC Bank Ltd",
  "nse_ticker": "HDFCBANK",
  "bse_code": "500180",
  "sector": "Banks - Private Sector",
  "isin": "INE040A01034"
}
```

#### Historical OHLCV chart

```json
{
  "action": "stock_chart",
  "symbol": "TCS",
  "resolution": "1d",
  "days": 30
}
```

**Output (one row per candle):**

```json
{
  "_action": "stock_chart",
  "_status": "success",
  "symbol": "TCS",
  "resolution": "1d",
  "timestamp": 1719878400,
  "open": 3820.0,
  "high": 3855.0,
  "low": 3810.0,
  "close": 3841.0,
  "volume": 892340
}
```

***

### Section 2 — Chart & Technical Analysis

#### Delivery volume (institutional conviction metric)

```json
{
  "action": "delivery",
  "symbol": "TCS"
}
```

#### Technical analysis signals

```json
{
  "action": "technicals",
  "symbol": "HDFCBANK",
  "duration": "D"
}
```

#### Analyst buy/sell/hold ratings

```json
{
  "action": "analyst_rating",
  "symbol": "INFY"
}
```

**Output:**

```json
{
  "_action": "analyst_rating",
  "_status": "success",
  "buy": 28,
  "sell": 3,
  "hold": 7,
  "analystCount": 38
}
```

#### Consensus price target

```json
{
  "action": "price_target",
  "symbol": "WIPRO"
}
```

**Output:**

```json
{
  "_action": "price_target",
  "_status": "success",
  "high_target": 620.0,
  "mean_target": 550.0,
  "low_target": 480.0
}
```

***

### Section 3 — Index & Market Stats

Use `indexId` to identify the index:

| ID | Index | ID | Index |
|----|-------|----|-------|
| 9 | Nifty 50 | 4 | BSE Sensex |
| 23 | Nifty Bank | 27 | Midcap 100 |
| 52 | Nifty Auto | 47 | Fin Services |
| 113 | Smallcap 50 | 28 | Nifty 100 |
| 17 | BSE IT | 34 | Nifty Realty |
| 53 | Nifty Pharma | 116 | Nifty Energy |

#### Top gainers in Nifty 50

```json
{
  "action": "market_gainers",
  "indexId": "9",
  "limit": 10
}
```

#### Index chart (1 month)

```json
{
  "action": "index_chart",
  "indexId": "9",
  "chartRange": "1m"
}
```

***

### Section 4 — Fundamentals

Use `symbol` (auto-resolved for top 30 stocks) or `scId` from `stock_search`.

#### Quarterly income statement

```json
{
  "action": "financials",
  "symbol": "HDFCBANK",
  "statement": "income",
  "statementType": "standalone"
}
```

`statement` options: `income` | `balance-sheet` | `cash-flow` | `ratios`

#### Shareholding pattern

```json
{
  "action": "shareholding",
  "symbol": "RELIANCE"
}
```

#### Peer comparison

```json
{
  "action": "peers",
  "symbol": "TCS"
}
```

***

### Section 5 — Mutual Funds

#### Find a fund (get scheme code)

```json
{
  "action": "mf_search",
  "query": "axis bluechip"
}
```

**Output (one row per fund):**

```json
{
  "_action": "mf_search",
  "_status": "success",
  "scheme_code": 119551,
  "scheme_name": "Axis Bluechip Fund - Growth"
}
```

#### Latest NAV

```json
{
  "action": "mf_nav",
  "schemeCode": 119551
}
```

#### Historical NAV (paginated)

```json
{
  "action": "mf_history",
  "schemeCode": 119551,
  "page": 1,
  "limit": 30
}
```

***

### Section 6 — Derivatives & F\&O

#### Options chain (Nifty calls, nearest expiry)

```json
{
  "action": "options_chain",
  "symbol": "NIFTY",
  "expiry": "2026-07-31",
  "optionType": "CE"
}
```

#### Active futures contracts

```json
{
  "action": "futures",
  "symbol": "BANKNIFTY"
}
```

#### MCX commodity quote

```json
{
  "action": "commodity_quote",
  "symbol": "GOLD",
  "expiry": "2026-08-05"
}
```

***

### Section 7 — OI Analysis

#### OI buildup trends (bullish stocks)

```json
{
  "action": "oi_trends",
  "oiCategory": "bullish",
  "oiExpiry": "ALL",
  "limit": 10
}
```

#### Strike-wise OI change for Nifty

```json
{
  "action": "oi_change",
  "oiScId": "in;NSX",
  "oiExpiry": "2026-07-31",
  "oiAssetType": "I",
  "oiType": "INTRA",
  "oiCount": 13
}
```

***

### Section 8 — News, IPO & Corporate Actions

#### Financial news

```json
{
  "action": "news",
  "newsCategory": "markets",
  "page": 1,
  "limit": 20
}
```

`newsCategory` options: `top` | `business` | `markets` | `stocks` | `mutual_funds` | `ipo` | `economy` | `commodities` | `personal_finance`

#### Upcoming dividends

```json
{
  "action": "corporate_actions",
  "actionType": "dividend",
  "limit": 50
}
```

#### Upcoming IPOs

```json
{
  "action": "ipo_upcoming"
}
```

#### FII/DII daily activity

```json
{
  "action": "fii_dii"
}
```

**Output (one row per segment):**

```json
{
  "_action": "fii_dii",
  "_status": "success",
  "_section": "cash_market",
  "date": "16-Jul-2026",
  "category": "Equity",
  "route": "Stock Exchange",
  "gross_purchase_cr": 12450.3,
  "gross_sales_cr": 10980.1,
  "net_investment_cr": 1470.2,
  "fpi_direction": "BUY"
}
```

***

### Export Formats

Results are pushed as flat rows — one row per stock/candle/article — so CSV and Excel exports work without `[object Object]` cells.

#### Download from Apify Console

After the actor run → click **Export** → choose CSV / Excel / JSON / XML.

#### Download via API

```
## CSV
GET https://api.apify.com/v2/datasets/{datasetId}/items?format=csv

## Excel
GET https://api.apify.com/v2/datasets/{datasetId}/items?format=xlsx

## JSON
GET https://api.apify.com/v2/datasets/{datasetId}/items?format=json
```

***

### Popular Tickers (auto-resolved)

These NSE tickers work directly with `symbol` — no `scId` lookup needed:

`RELIANCE` `HDFCBANK` `TCS` `INFY` `SBIN` `ICICIBANK` `BHARTIARTL` `LT` `KOTAKBANK` `BAJFINANCE` `HINDUNILVR` `ITC` `AXISBANK` `WIPRO` `MARUTI` `TATAMOTORS` `SUNPHARMA` `ADANIENT` `TITAN` `ASIANPAINT` `HCLTECH` `BAJAJFINSV` `NESTLEIND` `POWERGRID` `NTPC` `TATASTEEL` `ULTRACEMCO` `ONGC` `TECHM` `JSWSTEEL`

For any other stock, run `stock_search` first to find its `sc_id`.

***

### Notes

- Market hours: Mon–Fri 9:15 AM – 3:30 PM IST
- FII/DII data updates after 6 PM IST daily
- Corporate actions sourced from BSE India (official)
- Mutual fund NAV updates by 11 PM IST
- `symbol` accepts NSE tickers and auto-resolves to internal Moneycontrol IDs for the top 30 stocks
- For less common stocks, use `stock_search` to find the `scId`, then pass it directly

### REST API

For a dedicated REST API with instant responses (no actor runs needed), see:

**[India Stock Market — MoneyControl Live API on RapidAPI](https://rapidapi.com/matepapava123/api/india-stock-market-moneycontrol-live-api)**

# Actor input Schema

## `action` (type: `string`):

What data to fetch. Each action has its own dedicated section below — fill in only the section that matches your choice.

## `symbol` (type: `string`):

NSE ticker — e.g. RELIANCE, HDFCBANK, TCS, INFY, SBIN. Auto-resolves to Moneycontrol internal ID. For commodity\_quote use MCX name (GOLD, SILVER, CRUDEOIL). For futures/options use F\&O symbol (NIFTY, BANKNIFTY). Used for: stock\_quote, stock\_chart, delivery, technicals, analyst\_rating, price\_target, commodity\_quote, futures, options\_chain.

## `exchange` (type: `string`):

NSE or BSE. Used for stock\_quote.

## `query` (type: `string`):

Search term for stock\_search (company name, ticker, or ISIN) or mf\_search (fund name like 'HDFC top 100'). Used for: stock\_search, mf\_search.

## `resolution` (type: `string`):

Candle interval for stock\_chart. Intraday: 1/5/15/30/60 (minutes). Daily/weekly/monthly: 1d/1w/1M. Used for: stock\_chart.

## `days` (type: `integer`):

Number of past calendar days to fetch (1–365). Used for: stock\_chart.

## `indexId` (type: `string`):

Moneycontrol index ID. Common values: 9=Nifty 50, 4=Sensex, 23=Bank Nifty, 27=Midcap 100, 52=Nifty Auto, 47=Fin Services, 113=Smallcap 50, 28=Nifty 100, 17=BSE-IT, 34=Realty. Used for: index\_details, index\_constituents, index\_chart, market\_gainers, market\_losers, market\_active.

## `chartRange` (type: `string`):

Time range for index\_chart. Used for: index\_chart.

## `scId` (type: `string`):

Internal Moneycontrol ID (e.g. RI for Reliance, HDF01 for HDFC Bank, TCS, IT for Infosys). Required for financials, shareholding, peers. Optional override for delivery/technicals/analyst\_rating/price\_target — use if NSE ticker auto-resolution fails. Find via stock\_search.

## `statement` (type: `string`):

Which financial statement to fetch. Used for: financials.

## `statementType` (type: `string`):

Standalone = single entity. Consolidated = includes subsidiaries. Used for: financials.

## `duration` (type: `string`):

Timeframe for technical analysis signals. Used for: delivery, technicals, analyst\_rating, price\_target.

## `schemeCode` (type: `integer`):

AMFI scheme code. Get it by running mf\_search first. Example: 119551 = Axis Bluechip Fund. Used for: mf\_nav, mf\_history.

## `expiry` (type: `string`):

Contract expiry date. Required for commodity\_quote and options\_chain. Check MCX/NSE calendar for valid dates. Used for: commodity\_quote, options\_chain.

## `optionType` (type: `string`):

CE = Call option, PE = Put option. Used for: options\_chain.

## `oiCategory` (type: `string`):

Filter OI buildup trends. Used for: oi\_trends.

## `oiExpiry` (type: `string`):

For oi\_trends: use 'ALL' to include all expiries or a specific date. For oi\_change: YYYY-MM-DD date is required. Used for: oi\_trends, oi\_change.

## `oiScId` (type: `string`):

Symbol identifier for oi\_change. Use 'in;NSX' for Nifty, 'in;SEN' for Sensex, or a stock sc\_id. Used for: oi\_change.

## `oiAssetType` (type: `string`):

I = Index, S = Stock. Used for: oi\_change.

## `oiType` (type: `string`):

INTRA = intraday OI changes, HIST = daily historical OI. Used for: oi\_change.

## `oiCount` (type: `integer`):

Number of strikes around ATM (at-the-money) to include. Range: 5–50. Used for: oi\_change.

## `newsCategory` (type: `string`):

Category of financial news to fetch. Used for: news.

## `actionType` (type: `string`):

Filter corporate actions by type. Used for: corporate\_actions.

## `page` (type: `integer`):

Page number for paginated results (1-based). Used for: mf\_history, corporate\_actions, news.

## `limit` (type: `integer`):

Maximum number of items to return (1–100). Used for: market\_gainers, market\_losers, market\_active, index\_constituents, mf\_history, corporate\_actions, news, oi\_trends.

## Actor input object example

```json
{
  "action": "stock_quote",
  "symbol": "RELIANCE",
  "exchange": "nse",
  "query": "HDFC",
  "resolution": "1d",
  "days": 30,
  "indexId": "9",
  "chartRange": "1m",
  "statement": "income",
  "statementType": "standalone",
  "duration": "D",
  "schemeCode": 119551,
  "optionType": "CE",
  "oiCategory": "all",
  "oiExpiry": "ALL",
  "oiScId": "in;NSX",
  "oiAssetType": "I",
  "oiType": "INTRA",
  "oiCount": 13,
  "newsCategory": "top",
  "actionType": "all",
  "page": 1,
  "limit": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Stock market data results stored in the default dataset

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbol": "RELIANCE",
    "query": "HDFC",
    "indexId": "9",
    "scId": "",
    "schemeCode": 119551,
    "expiry": "",
    "oiExpiry": "ALL",
    "oiScId": "in;NSX"
};

// Run the Actor and wait for it to finish
const run = await client.actor("apiguruu/india-stock-market-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "symbol": "RELIANCE",
    "query": "HDFC",
    "indexId": "9",
    "scId": "",
    "schemeCode": 119551,
    "expiry": "",
    "oiExpiry": "ALL",
    "oiScId": "in;NSX",
}

# Run the Actor and wait for it to finish
run = client.actor("apiguruu/india-stock-market-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbol": "RELIANCE",
  "query": "HDFC",
  "indexId": "9",
  "scId": "",
  "schemeCode": 119551,
  "expiry": "",
  "oiExpiry": "ALL",
  "oiScId": "in;NSX"
}' |
apify call apiguruu/india-stock-market-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apiguruu/india-stock-market-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RFROoiI0TEjcPb7AQ/builds/CdVxcAyVk6ngogaYn/openapi.json
