XBRL API / XBRL Parser
XBRL (eXtensible Business Reporting Language) is the structured data format behind SEC financial filings. It is powerful but painful to work with directly — taxonomy versions change, extension elements vary by company, and the XML structure requires specialized parsers. Datastream does the parsing for you. Get normalized, JSON-formatted financial data from any XBRL-tagged SEC filing through a simple REST API.The XBRL problem
Working with raw XBRL means dealing with:- Multiple taxonomy versions (US-GAAP 2014 through 2024, IFRS, SEC-specific extensions)
- Company-specific extensions that need manual mapping
- Instance documents, schemas, calculation linkbases, and presentation linkbases — all separate files
- Inline XBRL (iXBRL) embedded in HTML that requires a different parser
- Inconsistent tagging where the same concept uses different elements across companies
Quick start
Pull normalized financial statements (parsed from XBRL):What you get
Normalized financial statements
The/v1/statements endpoint maps XBRL facts to a consistent schema across all companies:
- Income statement: Revenue, COGS, gross profit, operating income, net income, EPS
- Balance sheet: Total assets, total liabilities, equity, cash, debt
- Cash flow statement: Operating, investing, and financing cash flows
Raw XBRL facts
The/v1/facts endpoint gives you access to any XBRL concept, including company-specific extensions:
- Query by concept name (e.g.,
Revenues,Assets,NetIncomeLoss) - Filter by period (annual/quarterly), date range, and company
- Get the full provenance trail: taxonomy version, filing reference, and unit
API endpoints
| Endpoint | Description |
|---|---|
GET /v1/statements/all | Normalized income, balance sheet, and cash flow |
GET /v1/facts | Individual XBRL facts by concept |
GET /v1/filings | Find filings that contain XBRL data |
Use cases
- Financial modeling: Pull structured income statements and balance sheets directly into models
- Multi-company comparison: Compare financials across companies using a normalized schema
- Time series analysis: Track any XBRL concept across quarters and years
- Data validation: Cross-reference normalized statements against raw facts for audit trails
- AI/LLM pipelines: Feed structured financials to AI agents without manual extraction
Why Datastream over raw XBRL
| Feature | Datastream | Raw XBRL | Calcbench | XBRL US API |
|---|---|---|---|---|
| Normalized statements | Yes | No | Yes | No |
| Raw fact access | Yes | Yes (with parsing) | Partial | Yes |
| JSON output | Yes | XML | CSV/JSON | JSON |
| Multi-year time series | One call | Multiple downloads | Yes | Yes |
| Company extensions mapped | Yes | Manual | Partial | No |
| Real-time availability | Minutes after filing | Hours | Hours | Hours |
| SDK support | Python + JS | No | No | No |
Get started
Get your API key
Start pulling structured financial data in under 60 seconds.