# Index constituents API

> Which companies are in Nifty 50, Bank Nifty, Nifty 500 and 28 more NSE indices, and which indices a stock is in.

The member lists of 31 NSE indices (broad, sector and thematic) as NSE Indices Ltd publishes them, refreshed weekly, each member with its industry, ISIN and logo address. Weights are not published here.

Base URL `https://api.dharun.dev`. No API key needed for most endpoints; a free key (https://api.dharun.dev/keys) raises the limits, and the model endpoints marked below will need one. Answers are JSON, `{ "data": ..., "meta": { ... } }`, and errors are `{ "error": { "code", "message" } }` with a matching HTTP status. Rate limit: 600 units a minute per address without a key, 3000 per key; the `RateLimit-*` headers say what is left.

## List indices, or the indices of a stock

`GET /v1/indices`

Parameters:

- `symbol` (query): An NSE symbol or ISIN: only the indices it is in.

Example: https://api.dharun.dev/v1/indices?symbol=HDFCBANK&utm_medium=docs-md

Response, with lists and long text shortened:

```json
{
  "data": [
    {
      "id": "nifty-500",
      "name": "Nifty 500",
      "count": 501
    },
    {
      "id": "nifty-largemidcap-250",
      "name": "Nifty LargeMidcap 250",
      "count": 250
    },
    {
      "id": "nifty-200",
      "name": "Nifty 200",
      "count": 200
    }
  ],
  "meta": {
    "total": 7,
    "source": {
      "name": "NSE index constituents",
      "url": "https://www.niftyindices.com/",
      "licence": "Published by NSE Indices Limited; reused under this project's data rule, credited",
      "version": "17ed6e4a39d9",
      "retrieved": "2026-11-11T09:32:14Z",
      "attribution": "Index constituents as published by NSE Indices Limited (niftyindices.com). Nifty is a trademark of NSE Indices Limited."
    }
  }
}
```

## Constituents of an index

`GET /v1/indices/{id}`

Parameters:

- `id` (path, required): Such as nifty-50, nifty-bank, nifty-it, nifty-midcap-150.
- `industry` (query): Only members in this industry, as the list names it.

Example: https://api.dharun.dev/v1/indices/nifty-bank?utm_medium=docs-md

Response, with lists and long text shortened:

```json
{
  "data": {
    "id": "nifty-bank",
    "name": "Nifty Bank",
    "count": 14,
    "members": [
      {
        "symbol": "AUBANK",
        "company": "AU Small Finance Bank Ltd.",
        "industry": "Financial Services",
        "series": "EQ",
        "isin": "INE949L01017",
        "logo": "https://api.dharun.dev/v1/logos/AUBANK"
      },
      {
        "symbol": "AXISBANK",
        "company": "Axis Bank Ltd.",
        "industry": "Financial Services",
        "series": "EQ",
        "isin": "INE238A01034",
        "logo": "https://api.dharun.dev/v1/logos/AXISBANK"
      },
      {
        "symbol": "BANKBARODA",
        "company": "Bank of Baroda",
        "industry": "Financial Services",
        "series": "EQ",
        "isin": "INE028A01039",
        "logo": "https://api.dharun.dev/v1/logos/BANKBARODA"
      }
    ]
  },
  "meta": {
    "source": {
      "name": "NSE index constituents",
      "url": "https://www.niftyindices.com/",
      "licence": "Published by NSE Indices Limited; reused under this project's data rule, credited",
      "version": "17ed6e4a39d9",
      "retrieved": "2026-11-11T09:32:14Z",
      "attribution": "Index constituents as published by NSE Indices Limited (niftyindices.com). Nifty is a trademark of NSE Indices Limited."
    },
    "note": "Constituents as NSE Indices publishes them, without weights. Each member links to its logo."
  }
}
```

## Data source

- [NSE index constituents](https://www.niftyindices.com/), 17ed6e4a39d9, retrieved 2026-11-11T09:32:14Z. Licence: Published by NSE Indices Limited; reused under this project's data rule, credited. Index constituents as published by NSE Indices Limited (niftyindices.com). Nifty is a trademark of NSE Indices Limited.
