Features

Everything You Need for Portfolio Import

From REST API parsing to white-label UIs, CASParser provides the complete infrastructure for importing Indian investor portfolios.

Core

CAS Parser API

Parse CAS (Consolidated Account Statement) PDFs into structured JSON. Our smart parser auto-detects the CAS type - CDSL, NSDL, or CAMS/KFintech - so you don't have to.

  • Smart Parse endpoint - auto-detects CAS type (CDSL, NSDL, CAMS/KFintech)
  • Unified response format - same JSON structure regardless of CAS type
  • Multi-asset support - equities, mutual funds, bonds, AIFs, insurance, NPS
  • Built-in fraud detection - rejects tampered or modified PDFs
  • 97% parsing accuracy - across all supported CAS types
View API Docs
API Request
curl -X POST https://api.casparser.in/v4/smart/parse \
  -H "x-api-key: your_api_key" \
  -F "pdf_file=@portfolio.pdf" \
  -F "password=encrypted_pan"
Response (simplified)
{
  "meta": { "cas_type": "CDSL" },
  "investor": { "name": "John Doe", "pan": "..." },
  "summary": {
    "total_value": 2500000,
    "accounts": {
      "demat": { "count": 1, "total_value": 1500000 },
      "mutual_funds": { "count": 3, "total_value": 1000000 }
    }
  },
  "demat_accounts": [...],
  "mutual_funds": [...]
}
Import Portfolio

Drop CAS PDF here

Frontend

Portfolio Connect UI SDK

Drop-in SDK for portfolio import. White-label UI with file upload, Gmail inbox import, and CDSL OTP fetch - all in a single modal. Your brand, our technology.

  • Works with any frontend — React, Next.js, Vue, Angular, or vanilla HTML/JS
  • White-label - customize colors, branding, and messaging
  • Multiple import modes - file upload, Gmail inbox, CDSL fetch
  • npm install @cas-parser/connect - 5 minutes to integrate
SDK Documentation
Unique

Gmail Inbox Integration

Let users import CAS statements directly from their Gmail inbox. One-time read-only OAuth consent with infinite validity. We only read emails from verified CAS authorities and can't send emails or access other data.

  • One-time consent, infinite validity - no re-authorization needed
  • Restricted to CAS senders only - CDSL, NSDL, CAMS, KFintech emails only
  • Read-only access - users can revoke at any time
  • Built into Portfolio Connect UI SDK - or use the API directly
Learn More

Import from Gmail

One-click portfolio import from inbox

Generate CAS on Demand

Request any date range, up to 50+ years of transactions

Automation

CAS Generator

Automate CAS statement requests via CAMS/KFintech for any date range — even 50+ years of mutual fund transaction history. CAMS and KFintech share data internally, so the generated CAS contains the complete mutual fund portfolio. The CAS PDF is sent to the investor's registered email.

  • Any date range — request CAS for the last 50+ years of transaction history
  • Automated email delivery - CAS sent to investor's registered email
  • Perfect for onboarding - request comprehensive portfolio history
Learn More

Inbound Email

ie_xyz@import.casparser.in

New

Inbound Email (Email Forwarding)

Create dedicated email addresses where investors can forward CAS statements. Lower-friction alternative to file upload or OAuth when users already have CAS in their inbox.

  • Unique email per user: ie_xyz@import.casparser.in (or use custom alias)
  • Sender validation: only processes emails from verified CAS authorities (CDSL, NSDL, CAMS, KFintech)
  • Automatic webhook delivery: we upload PDFs to storage and POST download URLs to your endpoint
  • 48-hour presigned URLs give you time to download and parse at your convenience
  • 0.2 credits per email, only charged for successfully processed valid emails
View Documentation
New

Portfolio Links

Branded portfolio collection pages for advisors and wealth managers. Share a custom link with clients via WhatsApp, email, or SMS. They upload their CAS PDF, you get parsed data via email. No code or API integration needed.

  • Branded page: link.casparser.in/your-company with your logo and company name
  • Zero code required: create your link from the dashboard, share it, done
  • Instant email delivery: parsed portfolio data sent to your email with PDF attachment
  • Privacy-first: pages are noindex, upload-only simplified UI
Create Your Link
Your Company Name

Drop your CAS PDF here

link.casparser.in/your-company

Real-time

CDSL OTP Fetch

Fetch demat holdings directly from CDSL via OTP verification. Two-step process: request OTP, then verify to get real-time portfolio data.

  • Real-time demat holdings
  • OTP-based verification
  • Automated captcha solving
Beta

Contract Note Parser

Parse broker contract notes from Zerodha, Groww, Upstox, and ICICI Direct. Auto-detects broker format. (Enterprise plans only)

  • Zerodha, Groww, Upstox, ICICI
  • Auto-detects broker format
  • Trade-level detail extraction
Consistent Data Format

Same Structure, Every Time

All CAS types return the same JSON structure, whether it's CDSL, NSDL, or CAMS/KFintech. Parse once, support all formats. No custom logic per source.

What You Get Back

meta

CAS type, statement period (from/to dates), generated timestamp

investor

Name, PAN, email, mobile, address, CAS ID (CDSL/NSDL only)

summary

Total portfolio value + breakdown by account type (demat, MF, insurance, NPS)

demat_accounts[]

Equities, bonds, G-Secs, AIFs, grouped by demat account with full transaction history

mutual_funds[]

Folios, schemes, NAV, cost, gain/loss, 50+ years of transactions (CAMS/KFintech)

insurance + nps

Life policies (sum assured, premium), NPS (PRAN, tier, fund breakdown)

Full Schema Reference
Example Response
{
  "meta": {
    "cas_type": "CDSL",
    "statement_period": {
      "from": "2024-01-01",
      "to": "2024-12-31"
    },
    "generated_at": "2025-02-26T10:30:00Z"
  },
  "investor": {
    "name": "Rajesh Kumar",
    "pan": "ABCDE1234F",
    "email": "rajesh@example.com",
    "cas_id": "1234567890"
  },
  "summary": {
    "total_value": 2547832.50,
    "accounts": {
      "demat": {
        "count": 2,
        "total_value": 1500000.00
      },
      "mutual_funds": {
        "count": 5,
        "total_value": 950000.00
      },
      "insurance": {
        "count": 1,
        "total_value": 50000.00
      },
      "nps": {
        "count": 1,
        "total_value": 47832.50
      }
    }
  },
  "demat_accounts": [
    {
      "demat_type": "CDSL",
      "dp_name": "Zerodha Broking Ltd",
      "value": 750000.00,
      "holdings": {
        "equities": [
          {
            "isin": "INE002A01018",
            "name": "Reliance Industries",
            "units": 100.0,
            "value": 285000.00
          }
        ]
      }
    }
  ],
  "mutual_funds": [
    {
      "folio_number": "1234567890",
      "amc": "HDFC Mutual Fund",
      "value": 450750.00,
      "schemes": [
        {
          "name": "HDFC Flexi Cap - Growth",
          "units": 500.5,
          "nav": 900.50,
          "value": 450750.00,
          "cost": 400000.00,
          "gain": {
            "absolute": 50750.00,
            "percentage": 12.69
          }
        }
      ]
    }
  ]
}
Developer Experience

Integrate in Minutes

REST API with official SDKs for Python, Node.js, TypeScript. Portfolio Connect UI SDK for any frontend. MCP server for AI agents.

REST API

Comprehensive OpenAPI spec. Parse CAS, fetch CDSL, generate statements, import from Gmail.

Python SDK

Official cas-parser-python package. Thin wrapper around the REST API with full type hints.

Node.js / TypeScript

Official TypeScript SDK with full type definitions. Auto-generated from OpenAPI spec.

Portfolio Connect UI SDK

Drop-in @cas-parser/connect — works with React, Vue, Angular, or vanilla JS.

MCP Server

AI Agents

17 live API tools for Claude Code, Cursor, Windsurf, VS Code. Code Mode lets agents write + run TypeScript against our API in a sandbox.

Claude Code Cursor Windsurf

Agent Toolkit

AGENTS.md, SKILL.md, 14 code templates (Python, Node.js, React, HTML). Auto-generated from OpenAPI spec.

npx skills add casparser/agent-toolkit

Ready to Get Started?

Production API keys free on signup. 10 credits/month included. Integrate in 5 minutes.