You have a company name or search term and need to add company data to an application without building the lookup yourself. This guide shows how to call the LiveMint API by name, read the returned profile fields in Python, and handle the difference between the documented request and response examples.
What the API returns
The LiveMint API’s Get Company Data by Name endpoint retrieves detailed financial data for a company using a name. It supports full names, shortened names, and search terms supported by LiveMint search.
The published response example includes a company name, industry, company description, identifier, officers, exchange codes, and a peer-company list with financial metrics. Those fields can support company profile pages, research workflows, and internal tools that enrich a company name with structured information.
Search terms are not necessarily unique identifiers. Before attaching a result to an internal company record, check the returned company name and any identifiers relevant to your application.
Getting started on Zyla API Hub
Open the LiveMint API listing on Zyla API Hub, create a free account if needed, and choose Subscribe or Start Free Trial when available. The listing is where you can start the first API’s 7-day trial or 50-request option; check the API page for current access options and pricing.
Get your API key and use it as a bearer token in the Authorization header. Zyla uses a subscription and quota model rather than pay-per-call billing. Keep the key on your server or in another secure environment, rather than embedding it in browser code.
Request company data by name
The available endpoint is Get Company Data by Name. It accepts a GET request at:
https://zylalabs.com/api/4204/livemint-api/5100/get-company-data-by-name
Its required query parameter is name, a string containing the company name or supported search term. The following published request searches for TCS. Replace YOUR_API_KEY with your Zyla API key before running it.
curl -s -X GET "https://zylalabs.com/api/4204/livemint-api/5100/get-company-data-by-name?name=TCS" \
-H "Authorization: Bearer YOUR_API_KEY"
Call the same endpoint from Python
This example uses Python’s standard library, checks for an HTTP or network error, and reads the company and profile fields shown in the published response. It also handles a missing profile without assuming every field is present.
import json
import os
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = "https://zylalabs.com/api/4204/livemint-api/5100/get-company-data-by-name?name=TCS"
api_key = os.environ["ZYLA_API_KEY"]
request = Request(
url,
headers={"Authorization": f"Bearer {api_key}"},
method="GET",
)
try:
with urlopen(request, timeout=30) as response:
data = json.load(response)
except HTTPError as error:
raise SystemExit(f"Request failed with HTTP status {error.code}")
except URLError as error:
raise SystemExit(f"Network request failed: {error.reason}")
except json.JSONDecodeError:
raise SystemExit("The response was not valid JSON")
if not isinstance(data, dict):
raise SystemExit("Expected a JSON object")
profile = data.get("companyProfile")
if not isinstance(profile, dict):
profile = {}
print("Company:", data.get("companyName"))
print("Industry:", data.get("industry"))
print("Description:", profile.get("companyDescription"))
print("Identifier:", profile.get("isInId"))
print("BSE code:", profile.get("exchangeCodeBse"))
print("NSE code:", profile.get("exchangeCodeNse"))
Set the ZYLA_API_KEY environment variable to your key before running the script. The example prints the fields rather than assuming a match: your application should verify that the returned company is the one the user intended.
Read the published response example
The following is the published response excerpt. It shows Zomato, whereas the published request above searches for TCS; do not treat the excerpt as the expected result of that request. The excerpt is also truncated, so it is not a complete JSON document to parse as-is.
{"companyName":"Zomato","industry":"Computer Services","companyProfile":{"companyDescription":"Zomato Limited operates as an Internet portal, which helps in connecting the users, restaurant partners/ third-party merchants and the delivery partners. The Company also provides a platform to restaurant partners/brands to advertise themselves to the target audience in India and abroad and supplies ingredients to restaurant partners. The Company’s India food ordering and delivery segment consists of an online marketplace platform through which the Company facilitates the listing and online ordering of food items and the delivery of these food items by connecting end users, restaurant partners and independent delivery partners. Its hyperpure supplies (B2B business) segment offers farm-to-fork supplies for restaurants in India. Its quick commerce segment consists of an online marketplace platform (Marketplace), which enables listing of items sold on the Marketplace by the sellers. The Company’s going-out segment is a combination of its dining-out and entertainment ticketing business.","mgIndustry":"Computer Services","isInId":"INE758T01015","officers":{"officer":[{"rank":1,"since":"01/18/2010","firstName":"Deepinder","mI":null,"lastName":"Goyal","age":"41","title":{"startYear":"2021","startMonth":"3","startDay":"24","iD1":"CEO","abbr1":"CEO","iD2":"FDR","abbr2":"Fndr.","Value":"Chief Executive Officer, Founder, Managing Director, Executive Director"}},{"rank":2,"since":"11/09/2020","firstName":"Akshant","mI":null,"lastName":"Goyal","age":null,"title":{"startYear":"2020","startMonth":"11","startDay":"9","iD1":"CFO","abbr1":"CFO","iD2":"","abbr2":"","Value":"Chief Financial Officer"}},{"rank":3,"since":"01/21/2019","firstName":"Sandhya","mI":null,"lastName":"Sethia","age":null,"title":{"startYear":"2022","startMonth":"3","startDay":"","iD1":"CCO","abbr1":"Chief Comp.","iD2":"SEC","abbr2":"Secy.","Value":"Company Secretary and Compliance Officer"}}]},"exchangeCodeBse":"543320","exchangeCodeNse":"ZOMATO","peerCompanyList":[{"tickerId":"S0003105","companyName":"Wipro","priceToBookValueRatio":3.87,"priceToEarningsValueRatio":24.88,"marketCap":276762.16,"price":264.3,"percentChange":-1.53,"netChange":-4.1,"returnOnAverageEquity5YearAverage":17.18,"returnOnAverageEquityTrailing12Month":15.66,"ltDebtPerEquityMostRecentFiscalYear":10.17,"netProfitMargin5YearAverage":14.48,"netProfitMarginPercentTrailing12Month":14.06,"dividendYieldIndicatedAnnualDividend":2.16,"totalSharesO…
For a profile screen, start with companyName, industry, and companyProfile.companyDescription. The example also places isInId and the exchange codes inside companyProfile; use those fields to help a user confirm the company before saving the match.
The example’s officers.officer array contains names and titles, while peerCompanyList contains peer names and metrics. Some officer values are null or empty strings, so render those as unavailable rather than assuming every record is complete.
The excerpt does not establish units, currency, or an update timestamp for the peer metrics. Check the API page before displaying those numbers with units or treating them as current market data. Likewise, choose any application-side cache duration according to your freshness needs rather than assuming a documented refresh interval.
Practical uses and AI-agent access
A company research tool can accept a name, retrieve the profile, and show the description alongside the returned identifier and exchange codes. An analyst can then confirm the match before adding it to a research record.
An internal enrichment workflow can use the same lookup to populate a review screen for a company entered by a user. Keep the original search term and the returned company name separate: a shortened name may need human review before the result is attached to an existing record.
For an AI agent, configure a compatible client with https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY. Zyla’s MCP endpoint works with Claude Code, Cursor, Windsurf, and other MCP-compatible clients. Use the client’s available tools to request a company lookup, and have the agent check the returned name before using the result.
FAQ
Can I search with a shortened company name?
Yes. The endpoint supports full names, shortened names, and search terms supported by LiveMint search. Check the returned name and identifiers when a search term could match more than one company.
What is required to call the endpoint?
Send a GET request with the required name query parameter and an Authorization: Bearer YOUR_API_KEY header. Subscribe or start an available trial on the listing before making requests.
Why does the response example show a different company from the request?
The published request uses TCS, while the published response excerpt shows Zomato. Use the excerpt to understand the illustrated fields, not as an assertion about what the request will return.
Can I parse the published response excerpt as JSON?
No. The excerpt ends partway through the peer-company data. Parse the complete response returned by your request instead, and handle missing or null values in your application.
Ready to integrate company-name lookup? Create a free Zyla account, get an API key, and Start 7-day trial on LiveMint API. Check the listing for current access options, pricing, and quota details.
Official API response
{"companyName":"Zomato","industry":"Computer Services","companyProfile":{"companyDescription":"Zomato Limited operates as an Internet portal, which helps in connecting the users, restaurant partners/ third-party merchants and the delivery partners. The Company also provides a platform to restaurant partners/brands to advertise themselves to the target audience in India and abroad and supplies ingredients to restaurant partners. The Company’s India food ordering and delivery segment consists of an online marketplace platform through which the Company facilitates the listing and online ordering of food items and the delivery of these food items by connecting end users, restaurant partners and independent delivery partners. Its hyperpure supplies (B2B business) segment offers farm-to-fork supplies for restaurants in India. Its quick commerce segment consists of an online marketplace platform (Marketplace), which enables listing of items sold on the Marketplace by the sellers. The Company’s going-out segment is a combination of its dining-out and entertainment ticketing business.","mgIndustry":"Computer Services","isInId":"INE758T01015","officers":{"officer":[{"rank":1,"since":"01/18/2010","firstName":"Deepinder","mI":null,"lastName":"Goyal","age":"41","title":{"startYear":"2021","startMonth":"3","startDay":"24","iD1":"CEO","abbr1":"CEO","iD2":"FDR","abbr2":"Fndr.","Value":"Chief Executive Officer, Founder, Managing Director, Executive Director"}},{"rank":2,"since":"11/09/2020","firstName":"Akshant","mI":null,"lastName":"Goyal","age":null,"title":{"startYear":"2020","startMonth":"11","startDay":"9","iD1":"CFO","abbr1":"CFO","iD2":"","abbr2":"","Value":"Chief Financial Officer"}},{"rank":3,"since":"01/21/2019","firstName":"Sandhya","mI":null,"lastName":"Sethia","age":null,"title":{"startYear":"2022","startMonth":"3","startDay":"","iD1":"CCO","abbr1":"Chief Comp.","iD2":"SEC","abbr2":"Secy.","Value":"Company Secretary and Compliance Officer"}}]},"exchangeCodeBse":"543320","exchangeCodeNse":"ZOMATO","peerCompanyList":[{"tickerId":"S0003105","companyName":"Wipro","priceToBookValueRatio":3.87,"priceToEarningsValueRatio":24.88,"marketCap":276762.16,"price":264.3,"percentChange":-1.53,"netChange":-4.1,"returnOnAverageEquity5YearAverage":17.18,"returnOnAverageEquityTrailing12Month":15.66,"ltDebtPerEquityMostRecentFiscalYear":10.17,"netProfitMargin5YearAverage":14.48,"netProfitMarginPercentTrailing12Month":14.06,"dividendYieldIndicatedAnnualDividend":2.16,"totalSharesO…
Official API response
{"companyName":"Zomato","industry":"Computer Services","companyProfile":{"companyDescription":"Zomato Limited operates as an Internet portal, which helps in connecting the users, restaurant partners/ third-party merchants and the delivery partners. The Company also provides a platform to restaurant partners/brands to advertise themselves to the target audience in India and abroad and supplies ingredients to restaurant partners. The Company’s India food ordering and delivery segment consists of an online marketplace platform through which the Company facilitates the listing and online ordering of food items and the delivery of these food items by connecting end users, restaurant partners and independent delivery partners. Its hyperpure supplies (B2B business) segment offers farm-to-fork supplies for restaurants in India. Its quick commerce segment consists of an online marketplace platform (Marketplace), which enables listing of items sold on the Marketplace by the sellers. The Company’s going-out segment is a combination of its dining-out and entertainment ticketing business.","mgIndustry":"Computer Services","isInId":"INE758T01015","officers":{"officer":[{"rank":1,"since":"01/18/2010","firstName":"Deepinder","mI":null,"lastName":"Goyal","age":"41","title":{"startYear":"2021","startMonth":"3","startDay":"24","iD1":"CEO","abbr1":"CEO","iD2":"FDR","abbr2":"Fndr.","Value":"Chief Executive Officer, Founder, Managing Director, Executive Director"}},{"rank":2,"since":"11/09/2020","firstName":"Akshant","mI":null,"lastName":"Goyal","age":null,"title":{"startYear":"2020","startMonth":"11","startDay":"9","iD1":"CFO","abbr1":"CFO","iD2":"","abbr2":"","Value":"Chief Financial Officer"}},{"rank":3,"since":"01/21/2019","firstName":"Sandhya","mI":null,"lastName":"Sethia","age":null,"title":{"startYear":"2022","startMonth":"3","startDay":"","iD1":"CCO","abbr1":"Chief Comp.","iD2":"SEC","abbr2":"Secy.","Value":"Company Secretary and Compliance Officer"}}]},"exchangeCodeBse":"543320","exchangeCodeNse":"ZOMATO","peerCompanyList":[{"tickerId":"S0003105","companyName":"Wipro","priceToBookValueRatio":3.87,"priceToEarningsValueRatio":24.88,"marketCap":276762.16,"price":264.3,"percentChange":-1.53,"netChange":-4.1,"returnOnAverageEquity5YearAverage":17.18,"returnOnAverageEquityTrailing12Month":15.66,"ltDebtPerEquityMostRecentFiscalYear":10.17,"netProfitMargin5YearAverage":14.48,"netProfitMarginPercentTrailing12Month":14.06,"dividendYieldIndicatedAnnualDividend":2.16,"totalSharesO…