ShareSansar APIsharesansar.com ↗
Fetch NEPSE stock prices, index history, company listings, and market news from ShareSansar via a structured REST API. 5 endpoints, real data.
What is the ShareSansar API?
The ShareSansar API provides 5 endpoints covering Nepal Stock Exchange (NEPSE) market data, including live and historical stock prices, index history, a full company directory, and news articles. The get_stock_prices endpoint returns per-ticker fields — symbol, LTP, open, high, low, close, volume, and turnover — for any trading date or the latest available session. Company lookups, sector filtering, and paginated news retrieval are also supported.
curl -X GET 'https://api.parse.bot/scraper/cbe5bf21-3b47-4fb7-8ce3-a3f775409108/get_stock_prices?date=2026-08-24§or=all_sec' \ -H 'X-API-Key: $PARSE_API_KEY'
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 sharesansar-com-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: ShareSansar SDK — bounded, re-runnable; every call capped."""
from parse_apis.ShareSansar_Nepali_Stock_Market_API import (
ShareSansar, IndexType, NewsCategory, ArticleNotFound
)
client = ShareSansar()
# Fetch NEPSE index history for the banking sub-index
history = client.index_histories.get(index_id=IndexType.BANKING_SUBINDEX, from_date="2026-07-01", to_date="2026-07-20")
print(history.index_id, history.count)
for record in history.data[:3]:
print(record.date, record.open, record.high, record.low, record.close, record.turnover)
# Get today's stock prices snapshot
snapshot = client.stock_snapshots.get()
print(snapshot.actual_date, snapshot.count)
for stock in snapshot.data[:3]:
print(stock.symbol, stock.ltp, stock.volume)
# Browse latest news
for item in client.news_items.list(category=NewsCategory.LATEST_NEWS, limit=3):
print(item.title, item.url)
# Get full article detail with typed error handling
try:
article = client.articles.get(url="https://www.sharesansar.com/newsdetail/example-article-2026-07-01")
print(article.headline, article.published_at)
except ArticleNotFound as e:
print("article gone:", e.url)
print("exercised: index_histories.get / stock_snapshots.get / news_items.list / articles.get")
Get stock prices for all companies listed on NEPSE for a specific date or the latest available trading day. Returns Symbol, LTP, Volume, Open, High, Low, Close, and Turnover for each stock. When the requested date has no trading data (e.g., holidays or weekends), the site returns the latest available data instead. The actual_date field in the response indicates which date's data was returned.
| Param | Type | Description |
|---|---|---|
| date | string | Date in YYYY-MM-DD format. If not provided or if no trading data exists for the date, returns the latest available data. |
| sector | string | Sector filter for stock prices. Default is 'all_sec' for all sectors. |
{
"type": "object",
"fields": {
"data": "array of stock price objects with keys: symbol, ltp, volume, open, high, low, close, turnover",
"count": "integer total number of stocks returned",
"actual_date": "string date of the data actually returned (YYYY-MM-DD)",
"requested_date": "string or null, the date requested by the user"
},
"sample": {
"data": {
"data": [
{
"low": "949.00",
"ltp": "951.00",
"high": "958.00",
"open": "950.00",
"close": "951.00",
"symbol": "ACLBSL",
"volume": "1256.00",
"turnover": "1195754.00"
}
],
"count": 357,
"actual_date": "2026-06-09",
"requested_date": "2026-06-09"
},
"status": "success"
}
}About the ShareSansar API
Stock Prices and Index Data
The get_stock_prices endpoint accepts an optional date parameter (YYYY-MM-DD) and an optional sector filter. When the requested date falls on a holiday or weekend, the API automatically falls back to the most recent trading day and reports the actual date returned in the actual_date field alongside requested_date. Each item in the data array includes symbol, ltp, volume, open, high, low, close, and turnover. For index-level data, get_index_history accepts index_id (e.g., 12 for the NEPSE Index, 1 for the Banking SubIndex), plus optional from_date and to_date bounds, and returns daily records with the same OHLC shape plus turnover.
Company Directory
The get_companies endpoint takes no parameters and returns every company listed on NEPSE as an array of objects containing id, symbol, and companyname. This is the right place to resolve a full company name to its ticker symbol before passing it to get_stock_prices with a sector filter.
News Listing and Full-Article Content
The get_news_list endpoint retrieves article titles and URLs from named categories such as latest-news, exclusive, ipo-fpo-news, and proposed-dividend. Publication dates are not available in the listing response — they are always null there. Pagination is cursor-based: the next_cursor field in each response, when non-null, can be passed back as the cursor parameter to fetch the next page. To get the full article text, headline, and published_at timestamp, pass the article URL from get_news_list into get_news_detail.
The ShareSansar API is a managed, monitored endpoint for sharesansar.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sharesansar.com 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 sharesansar.com 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?+
- Track daily NEPSE price movements for a watchlist by polling
get_stock_priceswith specific sector filters - Build a NEPSE index chart by pulling OHLC history from
get_index_historyover a custom date range - Resolve company names to ticker symbols using
get_companiesbefore constructing stock queries - Aggregate IPO/FPO news by scraping the
ipo-fpo-newscategory viaget_news_listandget_news_detail - Monitor dividend announcements by paginating through the
proposed-dividendnews category - Calculate sector-level performance by filtering
get_stock_pricesby sector and aggregating turnover fields - Archive full text of NEPSE market news by combining listing pagination with detail fetches
| 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 ShareSansar have an official developer API?+
What happens when I request stock prices for a date with no trading activity?+
get_stock_prices returns data from the most recent available trading session. The actual_date field in the response shows which date the data belongs to, while requested_date reflects what you originally passed in.How does pagination work in `get_news_list`, and where do I get the full article content?+
get_news_list response includes a next_cursor field. When non-null, pass its value as the cursor parameter in your next request to retrieve the following page. Note that published_at is always null in listing responses. To get the publication date, headline, and full article text, call get_news_detail with the article URL returned in the listing.Does the API expose individual stock historical price data (e.g., a chart for a single ticker)?+
get_stock_prices and market-level index history via get_index_history, but per-symbol historical OHLC series are not an available endpoint. You can fork this API on Parse and revise it to add a per-symbol price history endpoint.