Hf APImemic-nse-quotes-api.hf.space ↗
Access Indian NSE stock quotes and NIFTY 50 market summary data via 2 endpoints. Get price, volume, change, PE ratio, advances/declines, and market tone.
What is the Hf API?
This API exposes 2 endpoints for Indian National Stock Exchange data: get_quotes retrieves price, volume, and change metrics for one or more NSE-listed symbols in a single request, while get_market_summary returns a snapshot of NIFTY 50 index conditions including open, high, low, PE ratio, advances/declines, and a market tone string — no authentication or input required for the summary endpoint.
curl -X POST 'https://api.parse.bot/scraper/48798639-860f-44f5-8978-4d43e065432d/get_quotes' \
-H 'X-API-Key: $PARSE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"symbols": "RELIANCE,TCS"
}'Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace memic-nse-quotes-api-hf-space-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: NSE Quotes API — market summary and stock quotes."""
from parse_apis.memic_nse_quotes_api_hf_space_api import NseQuotes, InputFormatInvalid
client = NseQuotes()
# Fetch current market summary with NIFTY 50 index data.
market = client.market_summaries.get()
print(market.market_tone, market.summary)
print(f"NIFTY change: {market.nifty_change_pct}%")
# Access the NIFTY 50 index details from the indices map.
nifty = market.indices.get("nifty_50")
if nifty is not None:
print(f"{nifty.index_name}: last={nifty.last} PE={nifty.pe} advances={nifty.advances} declines={nifty.declines}")
# Fetch quotes for specific symbols; handle per-symbol errors gracefully.
try:
result = client.quote_results.fetch(symbols="RELIANCE,TCS")
except InputFormatInvalid as e:
print(f"Invalid input: {e.message}")
else:
print(f"Quotes returned: {result.count}")
for sym, quote in result.quotes.items():
print(f" {sym}: {quote}")
for sym, err in result.errors.items():
print(f" {sym} error: {err}")
print("exercised: market_summaries.get / quote_results.fetch")
Fetch stock quotes for one or more NSE-listed symbols. Returns available price data and per-symbol errors when the upstream NSE source cannot resolve a symbol. Accepts a comma-separated list of NSE symbols (e.g. RELIANCE, TCS, INFY). The upstream data source may intermittently fail to return data for valid symbols; errors are reported per symbol in the response.
| Param | Type | Description |
|---|---|---|
| symbolsrequired | string | Comma-separated NSE stock symbols (e.g. RELIANCE,TCS,INFY). Symbols are uppercased automatically. |
{
"type": "object",
"fields": {
"count": "integer count of symbols that returned price data",
"errors": "object mapping symbol names to error messages for symbols that failed to resolve",
"quotes": "object mapping symbol names to their quote data (price, volume, change, etc.)",
"success": "boolean indicating whether the API call itself succeeded"
},
"sample": {
"data": {
"count": 0,
"errors": {
"TCS": "Expecting value: line 1 column 1 (char 0)",
"INFY": "Expecting value: line 1 column 1 (char 0)",
"RELIANCE": "Expecting value: line 1 column 1 (char 0)"
},
"quotes": {},
"success": true
},
"status": "success"
}
}About the Hf API
Stock Quotes via get_quotes
The get_quotes POST endpoint accepts a symbols parameter containing a comma-separated list of NSE ticker symbols (e.g. RELIANCE,TCS,INFY). Symbols are automatically uppercased. The response includes a quotes object keyed by symbol, each containing price, volume, and change data. A separate errors object maps any unresolvable symbols to descriptive error messages, and a count integer tells you how many symbols returned valid data. This partial-success design means a single bad symbol in a batch does not block results for the rest.
Market Summary via get_market_summary
The get_market_summary GET endpoint requires no inputs and returns a current snapshot of NSE market conditions. The indices object is keyed by index identifier (e.g. nifty_50) and contains fields: last, open, high, low, previous_close, and change_pc. Top-level fields include nifty_change_pct (a numeric percentage change for the day), market_tone (a string like mildly positive or negative), and a human-readable summary sentence suitable for display or alerting pipelines.
Error Handling and Availability
Both endpoints return a success boolean at the top level. The get_quotes endpoint documents that the upstream NSE data source may intermittently fail to resolve symbols, so callers should always inspect both the quotes and errors objects in the response rather than assuming all requested symbols resolved successfully.
The Hf API is a managed, monitored endpoint for memic-nse-quotes-api.hf.space — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when memic-nse-quotes-api.hf.space changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official memic-nse-quotes-api.hf.space API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display live NSE stock prices for a watchlist using
get_quoteswith a batch of symbols - Trigger portfolio alerts when
nifty_change_pctfromget_market_summarycrosses a threshold - Show a market sentiment badge using the
market_tonefield in a financial dashboard - Log daily NIFTY 50 open/high/low/close snapshots from
indices.nifty_50for historical tracking - Validate NSE ticker symbols by checking the
errorsobject in theget_quotesresponse - Feed a screener tool with PE ratio and advances/declines data from the market summary endpoint
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does NSE provide an official developer API?+
What does get_quotes return when a symbol can't be resolved?+
success: true for the overall call, but the unresolvable symbol appears in the errors object with an error message instead of in quotes. The count field reflects only the symbols that returned valid price data, so you can use it to detect partial failures in a batch request.Does the API cover indices beyond NIFTY 50, such as NIFTY Bank or NIFTY Midcap?+
get_market_summary endpoint currently returns data keyed to nifty_50. Other NSE indices like NIFTY Bank or NIFTY Midcap 100 are not covered by the existing endpoints. You can fork this API on Parse and revise it to add a dedicated endpoint for additional indices.Is historical OHLC or intraday chart data available?+
get_quotes and a single market summary from get_market_summary. Historical price series and intraday tick data are not exposed. You can fork this API on Parse and revise it to add a historical data endpoint.Can I retrieve fundamentals like EPS, dividend yield, or book value through get_quotes?+
get_quotes endpoint returns price and volume metrics including change data. Fundamental ratios such as EPS, dividend yield, and book value are not part of the response schema. The get_market_summary endpoint does expose a PE ratio at the index level. You can fork this API on Parse and revise it to surface per-symbol fundamental data.