Research6 min read

How to Get NSE and BSE Company Announcements in Python (Without Scraping)

By Deion DSouza
NSE and BSE data connected through an API

You can get NSE and BSE company announcements in Python without writing a scraper. Drishti is an independent API that uses exchange-backed data providers as its source. Its Python SDK lets you pass the companies and date range you care about, then read each page of results.

If you only need to read NSE updates, NSE also publishes an announcements RSS feed. If you need a programmatic workflow across companies, categories, and both exchanges, the API approach below is easier to build on.

Key takeaways

  • Install the Python SDK, supply an API key, and call get_announcements() with a short company list.
  • Use from_ and to for the time window. from_ has an underscore because from is a Python keyword.
  • Continue while has_next is true; a successful first page is not necessarily the complete result.
  • Keep each announcement's id so later runs do not add the same record twice.

Before you run the Python script

You need Python 3.10 or newer and a Drishti API key. The Python SDK guide documents the installation and client. Install it with:

Code
pip install drishti-sdk

Make your key available to the script as the DRISHTI_API_KEY environment variable. The example reads the variable; it does not put a key in the file. Start with one or two companies and a short date window so you can inspect the response before widening the query.

Get NSE and BSE company announcements in Python

This script fetches the previous seven days of announcements for two symbols. It prints one JSON line per record and follows every page. The fixed to value keeps the window stable while the script paginates.

Code
import json
import os
from datetime import datetime, timedelta, timezone

from drishti_sdk import DrishtiClient


api_key = os.environ["DRISHTI_API_KEY"]
end = datetime.now(timezone.utc)
start = end - timedelta(days=7)
page = 1

with DrishtiClient(api_key=api_key) as client:
    while True:
        result = client.get_announcements(
            symbols=["RELIANCE", "TCS"],
            from_=start.isoformat(),
            to=end.isoformat(),
            page=page,
            limit=20,
            detailed=False,
        )

        for row in result["data"]:
            print(json.dumps({
                "id": row.get("id"),
                "date": row.get("date"),
                "symbol": row.get("symbol"),
                "category": row.get("category"),
                "summary": row.get("summary"),
            }, ensure_ascii=False))

        if not result["has_next"]:
            break
        page += 1

Save the file as announcements.py and run python announcements.py. On a quiet date range, no lines may be printed; that is not an error. The announcements API reference defines the fields, filters, response shape, and current credit cost.

The example requests basic rows. Set detailed=True if your workflow needs richer summaries or extracted information when available. Check the cost before doing that across a large watchlist: the current documentation lists 1 credit per returned basic item and 2 credits per returned detailed item.

Filter by company, filing type, or BSE scrip code

The same method accepts symbols, scrip_codes, categories, important, from_, and to. For example, to fetch a particular category, add categories=["Award/Receipt of Order"]. Use the announcement category list to get current category names instead of guessing a label.

For a BSE-listed company identified by scrip code, pass scrip_codes=["500325"] instead of, or alongside, a symbol. The API currently accepts up to 20 symbols, 20 scrip codes, and 20 unique categories per request. Split a larger watchlist into batches; do not silently discard the companies beyond the limit.

Do not assume a symbol proves which exchange a returned row came from. Keep your own company-to-listing map if that distinction matters to your application, and inspect the source filing before making an exchange-specific claim.

TaskParameter or response field
Follow named companiessymbols or scrip_codes
Read a time windowfrom_ and to
Narrow filing typescategories
Review pipeline-marked itemsimportant=True
Ask for richer extractiondetailed=True
Read the full resultpage, limit, and has_next

Keep the watchlist up to date

For a recurring job, save the provider id with each record and enforce uniqueness in your database. Query with a small overlap from the last successful run, then ignore IDs you already have. This handles retries and late-arriving records more safely than assuming the script ran at exactly the scheduled minute.

Keep the raw announcement alongside your own labels. A later amendment may change what an earlier filing means, and your category or alerting rules may change. If your application needs near-live delivery, the WebSocket guide covers an announcement stream; still use a REST catch-up window after downtime.

What about the exchange feeds?

“Without scraping” does not mean the exchanges offer no other access. NSE provides a public corporate-information RSS feed and an announcements page. It also describes corporate-data subscription products for licensed data use. BSE advertises a self-data-feed product with a Corporate Data API and onboarding requirements.

Choose the source that fits your job. An exchange feed may be enough if you only need that exchange's updates and can operate its format and terms. Drishti receives data from licensed data providers and makes it available through a documented Python interface with company, category, date, pagination, and structured-summary fields. It does not scrape NSE or BSE websites. Data access and permission to redistribute are separate questions; check the applicable provider agreement before showing filings or derived data in a public product.

Common questions

Can I get NSE announcements in Python without scraping?

Yes. NSE publishes an announcements RSS feed, and a documented API provider can also return announcement records to Python. The script above uses Drishti's Python SDK to access data from licensed providers; it does not call an undocumented exchange endpoint.

How do I get BSE company announcements by scrip code?

Pass the BSE scrip code in scrip_codes when calling get_announcements(). Add a date window and follow has_next until the result is complete. BSE also sells a Corporate Data API through its own data-feed service. Which route is appropriate depends on the fields, access rights, and operating model you need.

Are company announcements the same as corporate actions?

No. An announcement is a filing record. A corporate action is an event such as a dividend, split, rights issue, or merger that may be described across several filings. If you are updating holdings or security identifiers, read the corporate-actions developer guide before treating one filing as a completed event.

Start with one company

To get NSE and BSE company announcements in Python without scraping, run the short script for one company, inspect the category and summary, and only then add storage or alerts. The SDK guide and announcements reference provide the current contract when you are ready to extend it. For a category-specific example, see the order-win tracking guide.

Keep exploring