Everything You Need for Portfolio Import
From REST API parsing to white-label UIs, CASParser provides the complete infrastructure for importing Indian investor portfolios.
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
curl -X POST https://portfolio-parser.api.casparser.in/v4/smart/parse \
-H "x-api-key: your_api_key" \
-F "pdf_file=@portfolio.pdf" \
-F "password=encrypted_pan" {
"status": "success",
"meta": { "cas_type": "CDSL" },
"investor": { "name": "John Doe" },
"summary": {
"total_value": 2500000,
"accounts": { "demat": 1, "mf": 3 }
},
"demat_accounts": [...],
"mutual_funds": [...]
} Drop CAS PDF here
Portfolio Connect SDK
Drop-in React/JS widget 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 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
Gmail Inbox Integration
Let users import CAS statements directly from their Gmail inbox via OAuth. No password sharing, no file downloads. Read-only access - we can't send emails.
- OAuth-based - secure, no password sharing required
- Auto-discovers CAS emails from CDSL, NSDL, CAMS, KFintech
- Read-only access - users can revoke at any time
- Built into Portfolio Connect SDK - or use the API directly
Import from Gmail
One-click portfolio import from inbox
Generate CAS on Demand
Request any date range, up to 50 years
CAS Generator
Automate CAS statement requests from KFintech for any date range - even 50 years of history. The CAS PDF is sent to the investor's registered email.
- Any date range - request CAS for the last 50 years of history
- Automated email delivery - CAS sent to investor's registered email
- Perfect for onboarding - request comprehensive portfolio history
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
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
Built for Developers & AI Agents
REST API with official SDKs. MCP server for AI agents. 14 ready-to-use code templates.
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
Auto-generated from OpenAPI by Stainless. Full TypeScript types. Tree-shakeable.
Portfolio Connect SDK
Drop-in @cas-parser/connect widget for React, Vue, Angular, or vanilla HTML/JS.
MCP Server
17 live API tools for Claude Code, Cursor, Windsurf, VS Code. Code Mode for sandbox.
Agent Toolkit
AGENTS.md, SKILL.md, 14 code templates. Install: npx skills add casparser/agent-toolkit
Ready to Get Started?
Start with 10 free credits. No credit card required. Integrate in 5 minutes.