import requests

url = "https://www.nseindia.com/api/allIndices"

payload = {}
headers = {
  'accept': '*/*',
  'accept-language': 'en-US,en;q=0.9',
  'priority': 'u=1, i',
  'referer': 'https://www.nseindia.com/market-data/live-market-indices',
  'sec-ch-ua': '"Chromium";v="134", "Not:A-Brand";v="24", "Brave";v="134"',
  'sec-ch-ua-mobile': '?0',
  'sec-ch-ua-platform': '"Windows"',
  'sec-fetch-dest': 'empty',
  'sec-fetch-mode': 'cors',
  'sec-fetch-site': 'same-origin',
  'sec-gpc': '1',
  'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36',
  'Cookie': 'nsit=UOsMfT80-IWnR6NB2iYjqNtg; AKA_A2=A; ak_bmsc=22F50A6CD94DD0D8DBA62ED166790CEA~000000000000000000000000000000~YAAQvIosMaPd43aVAQAA88jIfhvh4vdpUReHo20zSkWdd8rz+PX0dsIB6II3cgqRKZNyemNtbTYGGrRJxiE+AYWkI2BAQLWmP6utqTx0dbsrNvR8N4mMY87NFCRf97xuw8Rt82OIkIGGFjYcgqjrwD2XA0Rvemp25I80D/jfA+o9CsUpoAi2TUAP5nop2Ss1MY3EV2o5lQ6DU8WlMTVjj2enSBB5eKe6s9EaaYxcLo+tfYWDl3BaQv3CNrNKA+W9wJ9yhzTLg2s5wih7xcPYOhBLZXaQWkei97TCLUjC2AvgJj0dfYoFTTzyp7vmb+2raC5O/N5rk66M4yui94QxK1MOwURNXDoasS+qJdJMKcy6YVhuA4yEgutqpx4qKh9CiZYuSYDaPu7mj2KxAjMpUBhLs8aBuxa318LS3so5KRYCRT/qlV0v9gYCXS88ws9AJFn+V2NSRkcGwl11cLQ=; nseappid=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhcGkubnNlIiwiYXVkIjoiYXBpLm5zZSIsImlhdCI6MTc0MTU4ODg0NiwiZXhwIjoxNzQxNTk2MDQ2fQ.YGmnTdiXpFFqFOmJECZqX723GtRiPEItJrR4BboO0VM; bm_sz=22376818818A47EB3B29F97CF62165E3~YAAQvIosMfrq43aVAQAAX9fIfhtB8TFEI7n8Iu1PM2trfu/Sc8VXwAYuLjzKqRFczTAhp27xuLGme5qWEk62hkUem46yBvy82rQc8OUeqb6j1upFiIaDAfP37RnawL1L8V0nB/puDe4Nhr3pSsNoTXquriQ/be327sIw9AGYnhJZ4sUguDoBQ20gsLaVQ0CQbP5GCm+PwRLBfIA3jkpvaZ5hXs3hwYFaVSCkZwG08AeX3rb1E1RgsbdxR3X9IiuMzTpuv7uLOeNrPbbuYmp+3HZzBZH09dN9Gpj2j2QD6HCfpE8wjewasTRP4HacsDXsYsIihN3kXxmcvlXTsQPaXZM3FFE7Br9/TraD4JJHPt9ywjsQ84JQgTokgLarPrydsCXuQd8SFb/WKgZ1QCaANedTlw==~3552049~3621938; _abck=C75A1285C1FD8B6CEF92D160CFE92270~0~YAAQvIosMbrr43aVAQAABNjIfg2Uqh6fhJwkh/UN0xFDgg920LMYoKi6H+DqK2iw+ISzpcqJSezZw58/ItmElg1p8E9NqfFNHs8iGsGdyD6kE+LZekCa3wRrHSpp31Xi7mhGGiBoNX6xXWAyXeilF0jTm7B1p31AkF3kWpAzV6ARvRWbU8vONufOkIvD2LzsEPR8qvK98LmRzLjmM2JJrSaozaFDU+PMp1ZWT62cRaKGElGBhAlbH3VZCEPdb7lBuYHIYigVJuRoUW0u/F19Yr0AZs0Hoovog7lOaCxxKoDClujJ7KoUDUSK+UoG5+zlELZk6s43QMlxSop4EwHPMSF2J4jiD+RRaoXeFy1avDBNOFG2jvEtGt+wi/+TdKMYuWb174zLpYhuSfCcVuO8ETJJfB75FHfbcdVBY3yddRdIZc6afL6bbvKp53wdKtVM3PII97eD7OfztOWJjp553ZTubhzkfDs4D6yYOrxpqEdGJYJ33nxGkEJG6eRS~-1~-1~-1; bm_sv=5354DBD9DADA89FF60A2ABBA142916C7~YAAQvIosMbEF5HaVAQAAn/TIfhuRraISymqSpASjxCfchIDq9YrWekXAuiwHqKrLB4r5JN0PTHy1PkNs5Gb3UIXp2zFFNHnS3iKjeOeU+0bc3hXtDUr1zOmklJj147Pzq8Ifocfnq6AXHSpMUswF0Pn8r/SpgJvz0pJgxJHKbquepGbQ1Fgp8XQuufeN9u/IkUE71vGnlt0NMVx2EQJIiRhc33u+5tEPaCKF2mIpWrGq2H+ja0djeK01G59Ph9q/zNuT~1; _abck=A20DEE60683D2633C44E11729203793D~-1~YAAQBopRaFORG7qUAQAAcAZzyg1oojakVpu91ydO0bIfRUeWTfQsIs7xs9wmCGFLfjUhNd5QYH2X7LMrxVVni9aJyc6uCeSiaY1c8NjeArYDY6M3R6agccxg5kut40En+vN6C01JBnHj9Xqt2gb6kYa7LSPZj/d9nw8/057e85fvpWMIGPqr50Ac+eO7kvdKHBmmEweh8pY84uW6K6ym5Q9SfyD7nfQk8BPaoVa+YeUj7wAyCtKnScb+YkPZRSKZbNB4ufzqgct2SIeVqWd02BNM+k2365Q9MpRYOG620GX+phx/E35ivHpOo0ckmjOvaKU+zky+kQIczVmFDxiJD3T1mW65iVbFHvl/mxUCsVImkEXnXOgboIgFx5P0349yxfnVVG+jSMvcpSDqfp8zZ6mtmVUrB4W4O45OrMzU+1Iqk00OX6BlrMvPHqMkrilZj6Z9I8ajjzfKy3r+1Pbqv7yjZOI+3v1h1TVLoxNwtcifbg==~0~-1~-1'
}

response = requests.request("GET", url, headers=headers, data=payload)

indices_data = response.json()

