Instrument Searchโ
API to find instruments by name, symbol, or contract details. You can search across exchanges and filter by segment, instrument type, expiry, and ATM offset. Results are paginated.
When you do not need the full downloadable file, you can use this API instead of the Instrument JSON files. The response structure matches the BOD JSON instruments.
Key featuresโ
Free text โ Search by symbol name, strike price, or instrument type. The search is case-insensitive and supports partial matches on symbol, name, and short name.
Exchange and segment filters โ Narrow results to specific exchanges (
NSE,BSE,MCX) and segments (EQ,FO,CURR,COMM, etc.).Expiry filters โ Filter derivatives by expiry using keywords or specific dates:
Type Values Weekly keywords current_week,this_week,near_week,weekly,next_week,far_weekMonthly keywords current_month,this_month,near_month,monthly,next_month,far_monthSpecific date yyyy-MM-ddformat (e.g.2025-10-30,2025-11-27)ATM offset โ Find options at or near the at-the-money strike. Set
atm_offset=0for ATM, positive values for strikes above, and negative values for strikes below.Pagination โ Control page size (max 30 records) and navigate through results.
ATM search exampleโ
Suppose Nifty is at 24,500 and the strike interval is 50:
atm_offset | Strike returned | Meaning |
|---|---|---|
0 | 24,500 | At the money |
2 | 24,600 | Two strikes above ATM |
-2 | 24,400 | Two strikes below ATM |
To run this search, set query=NIFTY, instrument_types=CE (or PE), and an expiry value like current_week. If you omit expiry, the search defaults to current week options.
Search tipsโ
- Single characters or digits (e.g.
1,A) โ too broad. Add exchange or segment filters to narrow results. - Strike price only (e.g.
24000) โ matches many contracts across underlyings. Include the symbol (e.g.NIFTY 24000). - Multiple symbols (e.g.
RELIANCE NIFTY) โ not interpreted as two separate searches. Search one symbol per request. - ISIN or exchange token โ not searchable via
query. Use the Instruments JSON files to look up by these fields. - Special characters โ may not improve matching. Use alphanumeric characters and spaces only.
Reliable pattern: short symbol (RELIANCE, NIFTY) + filters (expiry, instrument_types, atm_offset when needed).
- Do not include spaces between values in comma-separated lists (e.g.
NSE,BSEnotNSE, BSE). - Use specific filters (
exchanges,segments,expiry) alongsidequeryfor faster, more accurate results.
Requestโ
curl --location 'https://api.upstox.com/v2/instruments/search?query=Reliance&expiry=current_month&atm_offset=0&page_number=1&records=20' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
For code samples in Python, Node.js, Java, and PHP, see the Sample Code section below.
Query Parametersโ
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | true | Free text search, max 50 characters (e.g. RELIANCE, RELIANCE CE 1500, RELIANCE 28 Oct 2025) |
| exchanges | string | false | Comma-separated exchanges: ALL, NSE, BSE, MCX. Default: ALL |
| segments | string | false | Comma-separated segments: ALL, EQ, FO, CURR, COMM, INDEX, OPT, FUT. Default: ALL |
| instrument_types | string | false | Comma-separated instrument types. Option types: CE, PE. Series: A, X, etc. |
| expiry | string | false | Comma-separated expiry keywords or dates in yyyy-MM-dd format. See expiry keywords above |
| atm_offset | integer | false | Distance from ATM strike. 0 = ATM, positive = above, negative = below. Defaults to current week if expiry is omitted |
| page_number | integer | false | Page number, starting from 1. Default: 1 |
| records | integer | false | Records per page. Default: 10, max: 30 |
- 200
- 4XX
Response Bodyโ
Successful responses include status, a data array of instruments, and meta_data.page for pagination. The fields on each item in data depend on segment (EQ, F&O, INDEX).
- EQ
- Futures
- Options
- INDEX
{
"status": "success",
"data": [
{
"name": "RELIANCE INDUSTRIES LTD",
"segment": "NSE_EQ",
"exchange": "NSE",
"isin": "INE002A01018",
"instrument_key": "NSE_EQ|INE002A01018",
"exchange_token": "2885",
"trading_symbol": "RELIANCE",
"short_name": "Reliance",
"tick_size": 10.0,
"lot_size": 1,
"instrument_type": "EQ",
"freeze_quantity": 100000.0,
"qty_multiplier": 1,
"security_type": "NORMAL"
},
{
"name": "RELIANCE INDUSTRIES LTD.",
"segment": "BSE_EQ",
"exchange": "BSE",
"isin": "INE002A01018",
"instrument_key": "BSE_EQ|INE002A01018",
"exchange_token": "500325",
"trading_symbol": "RELIANCE",
"short_name": "RELIANCE",
"tick_size": 5.0,
"lot_size": 1,
"instrument_type": "A",
"freeze_quantity": 100000.0,
"qty_multiplier": 1
}
],
"meta_data": {
"page": {
"page_number": 1,
"total_pages": 1,
"records": 20,
"total_records": 2
}
}
}
| Name | Type | Description |
|---|---|---|
| status | string | A string indicating the outcome of the request. Typically success for successful operations. |
| data | array | Array of equity instruments matching the search. |
| data[].name | string | Issuer / security name (e.g. RELIANCE INDUSTRIES LTD). |
| data[].segment | string | Segment code. EQ examples: NSE_EQ, BSE_EQ. Other segments: NSE_INDEX, NSE_FO, NCD_FO, BSE_INDEX, BSE_FO, BCD_FO, MCX_FO, NSE_COM. |
| data[].exchange | string | Exchange to which the instrument is associated. Possible values: NSE, BSE, MCX. |
| data[].isin | string | International Securities Identification Number. |
| data[].instrument_key | string | Unique identifier used across Upstox APIs. See the Field Pattern Appendix. |
| data[].exchange_token | string | The exchange-specific token for the instrument. |
| data[].trading_symbol | string | Trading symbol (e.g. RELIANCE). |
| data[].short_name | string | Short display name (e.g. Reliance, RELIANCE). |
| data[].tick_size | number | Minimum price movement of the instrument. |
| data[].lot_size | number | The size of one lot. |
| data[].instrument_type | string | Series / type (EQ, A, etc.). NSE: NSE legend; BSE: BSE series. |
| data[].freeze_quantity | number | The maximum quantity that can be frozen. |
| data[].qty_multiplier | number | Quantity multiplier for the instrument. |
| data[].security_type | string | (Optional.) Present on some EQ rows. See Security Type Appendix. |
| meta_data | object | Pagination metadata. |
| meta_data.page | object | Current page details. |
| meta_data.page.page_number | integer | Current page index (starts at 1). |
| meta_data.page.total_pages | integer | Total number of pages for this search. |
| meta_data.page.records | integer | Page size requested for this response. |
| meta_data.page.total_records | integer | Total instruments matching the search across all pages. |
{
"status": "success",
"data": [
{
"name": "RELIANCE INDUSTRIES LTD",
"segment": "NSE_FO",
"exchange": "NSE",
"expiry": "2026-03-30",
"weekly": false,
"instrument_key": "NSE_FO|52023",
"exchange_token": "52023",
"trading_symbol": "RELIANCE FUT 30 MAR 26",
"tick_size": 10.0,
"lot_size": 500,
"instrument_type": "FUT",
"freeze_quantity": 15000.0,
"underlying_key": "NSE_EQ|INE002A01018",
"underlying_type": "EQUITY",
"underlying_symbol": "RELIANCE",
"strike_price": 0.0,
"qty_multiplier": 1,
"minimum_lot": 500
}
],
"meta_data": {
"page": {
"page_number": 1,
"total_pages": 1,
"records": 20,
"total_records": 1
}
}
}
| Name | Type | Description |
|---|---|---|
| status | string | A string indicating the outcome of the request. Typically success for successful operations. |
| data | array | Array of futures contracts matching the search. |
| data[].name | string | Name of the underlying / contract (e.g. RELIANCE INDUSTRIES LTD). |
| data[].segment | string | F&O segment. Possible values include NSE_FO, NCD_FO, BSE_FO, BCD_FO, MCX_FO. |
| data[].exchange | string | Exchange to which the instrument is associated. Possible values: NSE, BSE, MCX. |
| data[].expiry | string | Expiry date in YYYY-MM-DD format (e.g. 2026-03-30). |
| data[].weekly | boolean | Indicates if the future is weekly. |
| data[].instrument_key | string | Unique identifier used across Upstox APIs. See the Field Pattern Appendix. |
| data[].exchange_token | string | The exchange-specific token for the future. |
| data[].trading_symbol | string | Trading symbol. Format: <underlying_symbol> FUT <expiry in dd MMM yy> (e.g. RELIANCE FUT 30 MAR 26). |
| data[].tick_size | number | The minimum price movement of the future. |
| data[].lot_size | number | The size of one lot of the future. |
| data[].instrument_type | string | Always FUT for futures. |
| data[].freeze_quantity | number | The maximum quantity that can be frozen. |
| data[].underlying_key | string | The instrument_key for the underlying asset. |
| data[].underlying_type | string | The type of the underlying asset. Possible values: COM, INDEX, EQUITY, CUR, IRD. |
| data[].underlying_symbol | string | The symbol of the underlying asset. |
| data[].strike_price | number | Always 0.0 for futures. |
| data[].qty_multiplier | number | Quantity multiplier for the instrument. |
| data[].minimum_lot | number | The minimum lot size for the future. |
| meta_data | object | Pagination metadata. |
| meta_data.page | object | Current page details. |
| meta_data.page.page_number | integer | Current page index (starts at 1). |
| meta_data.page.total_pages | integer | Total number of pages for this search. |
| meta_data.page.records | integer | Page size requested for this response. |
| meta_data.page.total_records | integer | Total instruments matching the search across all pages. |
{
"status": "success",
"data": [
{
"name": "RELIANCE INDUSTRIES LTD",
"segment": "NSE_FO",
"exchange": "NSE",
"expiry": "2026-03-30",
"weekly": false,
"instrument_key": "NSE_FO|157318",
"exchange_token": "157318",
"trading_symbol": "RELIANCE 1380 CE 30 MAR 26",
"tick_size": 5.0,
"lot_size": 500,
"instrument_type": "CE",
"freeze_quantity": 15000.0,
"underlying_key": "NSE_EQ|INE002A01018",
"underlying_type": "EQUITY",
"underlying_symbol": "RELIANCE",
"strike_price": 1380.0,
"qty_multiplier": 1,
"minimum_lot": 500
},
{
"name": "RELIANCE INDUSTRIES LTD",
"segment": "NSE_FO",
"exchange": "NSE",
"expiry": "2026-03-30",
"weekly": false,
"instrument_key": "NSE_FO|157319",
"exchange_token": "157319",
"trading_symbol": "RELIANCE 1380 PE 30 MAR 26",
"tick_size": 5.0,
"lot_size": 500,
"instrument_type": "PE",
"freeze_quantity": 15000.0,
"underlying_key": "NSE_EQ|INE002A01018",
"underlying_type": "EQUITY",
"underlying_symbol": "RELIANCE",
"strike_price": 1380.0,
"qty_multiplier": 1,
"minimum_lot": 500
}
],
"meta_data": {
"page": {
"page_number": 1,
"total_pages": 1,
"records": 20,
"total_records": 2
}
}
}
| Name | Type | Description |
|---|---|---|
| status | string | A string indicating the outcome of the request. Typically success for successful operations. |
| data | array | Array of option contracts matching the search. |
| data[].name | string | The name of the option / underlying (e.g. RELIANCE INDUSTRIES LTD). |
| data[].segment | string | The market segment of the option. Possible values: NSE_EQ, NSE_INDEX, NSE_FO, NCD_FO, BSE_EQ, BSE_INDEX, BSE_FO, BCD_FO, MCX_FO, NSE_COM. |
| data[].exchange | string | Exchange to which the instrument is associated. Possible values: NSE, BSE, MCX. |
| data[].expiry | string | Expiry date in YYYY-MM-DD format (e.g. 2026-03-30). |
| data[].weekly | boolean | Indicates if the option is weekly. |
| data[].instrument_key | string | Unique identifier used across Upstox APIs. See the Field Pattern Appendix. |
| data[].exchange_token | string | The exchange-specific token for the option. |
| data[].trading_symbol | string | The symbol used for trading the option. Format: <underlying_symbol> <strike_price> <CE/PE> <expiry in dd MMM yy>. |
| data[].tick_size | number | The minimum price movement of the option. |
| data[].lot_size | number | The size of one lot of the option. |
| data[].instrument_type | string | The type of the option instrument. Possible values: CE, PE. |
| data[].freeze_quantity | number | The maximum quantity that can be frozen. |
| data[].underlying_key | string | The instrument_key for the underlying asset. |
| data[].underlying_type | string | The type of the underlying asset. Possible values: COM, INDEX, EQUITY, CUR, IRD. |
| data[].underlying_symbol | string | The symbol of the underlying asset. |
| data[].strike_price | number | The strike price for the option. |
| data[].qty_multiplier | number | Quantity multiplier for the instrument. |
| data[].minimum_lot | number | The minimum lot size for the option. |
| meta_data | object | Pagination metadata. |
| meta_data.page | object | Current page details. |
| meta_data.page.page_number | integer | Current page index (starts at 1). |
| meta_data.page.total_pages | integer | Total number of pages for this search. |
| meta_data.page.records | integer | Page size requested for this response. |
| meta_data.page.total_records | integer | Total instruments matching the search across all pages. |
{
"status": "success",
"data": [
{
"name": "Nifty 50",
"segment": "NSE_INDEX",
"exchange": "NSE",
"instrument_key": "NSE_INDEX|Nifty 50",
"exchange_token": "26000",
"trading_symbol": "NIFTY",
"instrument_type": "INDEX"
}
],
"meta_data": {
"page": {
"page_number": 1,
"total_pages": 1,
"records": 20,
"total_records": 1
}
}
}
| Name | Type | Description |
|---|---|---|
| status | string | A string indicating the outcome of the request. Typically success for successful operations. |
| data | array | Array of index instruments matching the search. |
| data[].name | string | The name of the index (e.g. Nifty 50). |
| data[].segment | string | Segment to which the instrument is associated. Possible values: NSE_EQ, NSE_INDEX, NSE_FO, NCD_FO, BSE_EQ, BSE_INDEX, BSE_FO, BCD_FO, MCX_FO, NSE_COM. |
| data[].exchange | string | Exchange to which the instrument is associated. Possible values: NSE, BSE, MCX. |
| data[].instrument_key | string | Unique identifier used across Upstox APIs. See the Field Pattern Appendix. |
| data[].exchange_token | string | The exchange-specific token for the index. |
| data[].trading_symbol | string | Trading symbol for the index (e.g. NIFTY). |
| data[].instrument_type | string | Always INDEX for index instruments. |
| meta_data | object | Pagination metadata. |
| meta_data.page | object | Current page details. |
| meta_data.page.page_number | integer | Current page index (starts at 1). |
| meta_data.page.total_pages | integer | Total number of pages for this search. |
| meta_data.page.records | integer | Page size requested for this response. |
| meta_data.page.total_records | integer | Total instruments matching the search across all pages. |
Error codesโ
| Error code | Description |
|---|---|
UDAPI1169 | Query parameter cannot be empty. Provide a value for query. |
UDAPI1170 | Query exceeds the 50-character limit. Shorten your search text. |
UDAPI1171 | One or more exchange values are invalid. Use ALL, NSE, BSE, or MCX. |
UDAPI1172 | One or more segment values are invalid. See the segments parameter for allowed values. |
UDAPI1173 | Records per page exceeds the maximum of 30. |
UDAPI1174 | Page number must be 1 or greater. |
UDAPI1175 | One or more expiry values are invalid. Use supported keywords or yyyy-MM-dd format. |
Sample Codeโ
- cURL
- Python
- Node.js
- Java
- PHP
curl --location 'https://api.upstox.com/v2/instruments/search?query=RELIANCE&exchanges=NSE&segments=FO&instrument_types=CE,PE&expiry=current_month&atm_offset=0&page_number=1&records=20' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
import requests
url = 'https://api.upstox.com/v2/instruments/search'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
}
params = {
'query': 'RELIANCE',
'exchanges': 'NSE',
'segments': 'FO',
'instrument_types': 'CE,PE',
'expiry': 'current_month',
'atm_offset': 0,
'page_number': 1,
'records': 20
}
response = requests.get(url, headers=headers, params=params)
print(response.status_code)
print(response.json())
const axios = require('axios');
const url = 'https://api.upstox.com/v2/instruments/search';
const headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {your_access_token}'
};
const params = {
query: 'RELIANCE',
exchanges: 'NSE',
segments: 'FO',
instrument_types: 'CE,PE',
expiry: 'current_month',
atm_offset: 0,
page_number: 1,
records: 20
};
axios.get(url, { headers, params })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error('Error:', error.message);
});
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) {
String url = "https://api.upstox.com/v2/instruments/search?query=RELIANCE&exchanges=NSE&segments=FO&instrument_types=CE,PE&expiry=current_month&atm_offset=0&page_number=1&records=20";
String acceptHeader = "application/json";
String authorizationHeader = "Bearer {your_access_token}";
HttpClient httpClient = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("Accept", acceptHeader)
.header("Authorization", authorizationHeader)
.GET()
.build();
try {
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println("Status Code: " + response.statusCode());
System.out.println("Response Body: " + response.body());
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}
<?php
$url = 'https://api.upstox.com/v2/instruments/search?query=RELIANCE&exchanges=NSE&segments=FO&instrument_types=CE,PE&expiry=current_month&atm_offset=0&page_number=1&records=20';
$acceptHeader = 'application/json';
$authorizationHeader = 'Bearer {your_access_token}';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: ' . $acceptHeader,
'Authorization: ' . $authorizationHeader,
));
$response = curl_exec($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status Code: " . $status_code . PHP_EOL;
echo "Response Body: " . $response . PHP_EOL;
?>