Authentication
All API requests require a valid API key sent via the Authorization header using Bearer token authentication.
Header Format
Authorization: Bearer YOUR_API_KEYExample Request
curl -X GET "https://www.stockainsights.com/api-si/v1/income-statements/AAPL?period=FY&limit=5" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Rate Limits
All endpoints are limited to 10 requests per second per API key. This is a security measure to prevent abuse and automated DoS (Denial of Service) attacks.
When You Exceed the Limit
If you exceed the rate limit, the API will return a 429 Too Many Requests error:
{
"error": "Rate limit exceeded",
"message": "Too many requests. Please slow down.",
"status": 429
}Error Handling
The API uses standard HTTP status codes and returns consistent error response formats.
HTTP Status Codes
Error Response Format
All errors follow a consistent JSON format with an error code, message, and timestamp:
{
"error": "Validation failed",
"message": "Period must be one of: FY, Q, Q1, Q2, Q3, Q4",
"status": 400,
"timestamp": "2025-11-02T10:30:00.000Z"
}Common Error Examples
{ "error": "Unauthorized", "message": "Invalid or missing API key", "status": 401 }{ "error": "Not found", "message": "Company not found", "status": 404 }{ "error": "Validation failed", "message": "Year must be between 2014 and 2026", "status": 400 }Company Profile API (v1)
Company information, contact details, and business classification
Endpoint
/api-si/v1/profile/:tickerExample Response
{
"data": {
"cik": "0000320193",
"name": "Apple Inc.",
"company_name_full": "APPLE INC",
"tickers": ["AAPL"],
"exchange": "Nasdaq",
"sic_code": "3571",
"sic_sectors": {
"sector": "Manufacturing",
"industry": "Electronic Computers"
},
"ein": "942404110",
"phone": "4089961010",
"website_url": "https://www.apple.com",
"investor_website": "https://investor.apple.com",
"business_address": {
"street1": "ONE APPLE PARK WAY",
"city": "CUPERTINO",
"state": "CA",
"zip": "95014"
},
"mailing_address": {...},
"fiscal_year_end": "0930"
}
}Fiscal Calendar API (v1)
Fiscal year calendar with all filing dates and accession numbers
Endpoint
/api-si/v1/fiscal-calendar/:tickerReturns complete fiscal year calendar showing all quarterly and annual filing dates, form types, and SEC accession numbers. Helps users understand data availability and filing schedules.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| year | number | null | Filter by fiscal year (2014-2026). Omit for all years. |
Example Response
{
"data": [
{
"fiscal_year": 2024,
"fiscal_year_end": "2024-09-28",
"periods": [
{
"period": "Q1",
"accession_number": "0000320193-24-000006",
"form_type": "10-Q",
"period_end_date": "2023-12-30"
},
{
"period": "Q2",
"accession_number": "0000320193-24-000069",
"form_type": "10-Q",
"period_end_date": "2024-03-30"
},
{
"period": "Q3",
"accession_number": "0000320193-24-000081",
"form_type": "10-Q",
"period_end_date": "2024-06-29"
},
{
"period": "FY",
"accession_number": "0000320193-24-000123",
"form_type": "10-K",
"period_end_date": "2024-09-28"
}
]
},
{
"fiscal_year": 2023,
"fiscal_year_end": "2023-09-30",
"periods": [...]
}
]
}Use Cases
Sectors List API (v1)
Browse all sectors and their industries with SIC codes
Endpoint
/api-si/v1/sectorsResponse Fields
| Field | Type | Description |
|---|---|---|
| sector | string | Sector name |
| industries | array | Array of industries/SIC codes in this sector |
| industries[].sic_code | string | SIC code |
| industries[].industry | string | Industry name |
| industries[].description | string | Detailed SIC code description |
Example Response
{
"data": [
{
"sector": "Technology",
"industries": [
{
"sic_code": "3571",
"industry": "Electronic Computers",
"description": "Establishments primarily engaged in manufacturing electronic computers"
},
{
"sic_code": "7372",
"industry": "Prepackaged Software",
"description": "Establishments primarily engaged in the design, development, and production of prepackaged computer software"
},
{
"sic_code": "7373",
"industry": "Computer Integrated Systems Design",
"description": "Establishments primarily engaged in developing and implementing integrated systems"
}
]
},
{
"sector": "Finance",
"industries": [
{
"sic_code": "6021",
"industry": "National Commercial Banks",
"description": "Establishments primarily engaged in the business of commercial banking"
},
{
"sic_code": "6282",
"industry": "Investment Advice",
"description": "Establishments primarily engaged in furnishing investment advice"
}
]
}
],
"status": 200
}Use Cases
SIC Code Details API (v1)
Get detailed information about a specific SIC code
Endpoint
/api-si/v1/sic/:sic_codeResponse Fields
| Field | Type | Description |
|---|---|---|
| sic_code | string | 4-digit SIC code |
| name | string | Industry name |
| description | string | Full description of the SIC code |
| sector | string | Parent sector |
| industry | string | Industry classification |
Example Request
curl -X GET "https://www.stockainsights.com/api-si/v1/sic/3571" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": {
"sic_code": "3571",
"name": "Electronic Computers",
"description": "Manufacturing-Electronic Computers",
"sector": "Technology",
"industry": "Electronic Computers"
},
"status": 200
}Companies by SIC API (v1)
List all companies in a specific industry (SIC code)
Endpoint
/api-si/v1/sic/:sic_code/companiesQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | number | 20 | Max results (1-100) |
| offset | number | 0 | Pagination offset |
| has_ticker | boolean | - | Filter for publicly traded companies only |
| exchange | string | - | Filter by exchange (e.g., "NASDAQ", "NYSE") |
Example Request
curl -X GET "https://www.stockainsights.com/api-si/v1/sic/3571/companies?has_ticker=true&limit=5" \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": [
{
"cik": "0000320193",
"name": "Apple Inc.",
"tickers": ["AAPL"],
"exchanges": ["NASDAQ"],
"sic_code": "3571",
"industry": "Electronic Computers",
"sector": "Technology"
},
{
"cik": "0001045810",
"name": "NVIDIA Corp",
"tickers": ["NVDA"],
"exchanges": ["NASDAQ"],
"sic_code": "3571",
"industry": "Electronic Computers",
"sector": "Technology"
}
],
"meta": {
"sic_code": "3571",
"industry": "Electronic Computers",
"sector": "Technology",
"total": 67,
"limit": 5,
"offset": 0
},
"status": 200
}Use Cases
Company Lookup by CIK API (v1)
Lookup company information using CIK (Central Index Key)
Endpoint
/api-si/v1/company/cik/:cikNote: CIK must be numeric (e.g., 320193 or 0000320193). Both padded and unpadded formats are accepted.
For ticker-based lookup, use the Company Profile API above.
Example Response
{
"data": {
"cik": "0000320193",
"name": "Apple Inc.",
"tickers": ["AAPL"],
"exchanges": ["Nasdaq"],
"sic_code": "3571",
"sic_sector": {
"sector": "Manufacturing",
"industry": "Electronic Computers",
"sic_description": "Electronic Computers"
},
"fiscal_year_end": "0930",
"filer_status": "Large Accelerated Filer",
"total_filings_count": 456,
...additional fields
}
}Company Search API (v1)
Search companies by name with fuzzy matching
Endpoint
/api-si/v1/companies/search?q=apple&limit=20Query Parameters
| Parameter | Required | Description |
|---|---|---|
| q | Yes | Search query (min 2 characters) |
| limit | No | Max results (1-100, default 20) |
Example Response
{
"data": [
{
"cik": "0000320193",
"name": "Apple Inc.",
"tickers": ["AAPL"],
"sic_code": "3571",
"sic_sector": {
"sector": "Manufacturing",
"industry": "Electronic Computers"
}
},
...more results
],
"meta": {
"query": "apple",
"count": 5
}
}Income Statement API (v1)
Industry-aware income statement data with automatic field detection
Endpoint
/api-si/v1/income-statements/:tickerIndustry-Aware Schema
The API automatically returns fields based on the company's industry (detected via SIC code). All companies receive standard income statement fields (or null if not applicable to their business model), plus industry-specific fields when relevant.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | string | FY | Period type: FY, Q, Q1, Q2, Q3, Q4 |
| year | number | null | Filter by fiscal year (2014-present) |
| limit | number | null | Max records (1-100). Null returns all |
Example Response
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
"revenue": 90753000000,
"cost_of_revenue": 54763000000,
"gross_profit": 35990000000,
"operating_expenses": 13421000000,
"operating_income": 22569000000,
"net_income": 20010000000,
"basic_eps": 1.27,
"diluted_eps": 1.26,
"ebitda": 25123000000,
// ... standard fields
}
],
"meta": {
"ticker": "AAPL",
"period": "FY",
"year": null,
"limit": 5,
"count": 1
}
}Example Response (Banking)
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
// Standard fields
"revenue": 15234000000,
"net_income": 5123000000,
"basic_eps": 4.25,
// Banking-specific fields
"interest_income_loans_total": 8543000000,
"interest_income_securities": 1234000000,
"interest_expense_deposits": 2345000000,
"net_interest_income": 7432000000,
"provision_for_credit_losses": 543000000,
"net_interest_income_after_provision": 6889000000,
"investment_banking_revenue": 1200000000,
"card_income": 850000000,
"asset_management_fees": 650000000,
"noninterest_income_total": 5432000000,
"compensation_and_benefits": 3200000000,
"technology_expense": 800000000,
"deposit_insurance_expense": 120000000,
// ... ~88 total fields
}
]
}Rate Limits
10 requests per second per IP address
Balance Sheet API (v1)
Industry-aware balance sheet data with automatic field detection
Endpoint
/api-si/v1/balance-sheets/:tickerIndustry-Aware Schema
The API automatically returns fields based on the company's industry (detected via SIC code). All companies receive standard balance sheet fields (or null if not applicable to their business model), plus industry-specific fields when relevant.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | string | FY | Period type: FY, Q, Q1, Q2, Q3, Q4 |
| year | number | null | Filter by fiscal year (2014-present) |
| limit | number | null | Max records (1-100). Null returns all |
Example Response
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
"total_assets": 337158000000,
"current_assets": 143566000000,
"cash_and_equivalents": 29943000000,
"total_liabilities": 279414000000,
"total_equity": 57744000000,
"working_capital": 10260000000,
// ... standard fields
}
],
"meta": {
"ticker": "AAPL",
"period": "FY",
"year": null,
"limit": 5,
"count": 1
}
}Example Response (REIT)
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
// Standard fields
"total_assets": 45230000000,
"total_liabilities": 28450000000,
"total_equity": 16780000000,
// REIT-specific fields
"real_estate_investments_at_cost": 52340000000,
"accumulated_depreciation_real_estate": 12450000000,
"investment_properties_net": 39890000000,
"investment_properties_retail": 28500000000,
"investment_properties_office": 8200000000,
"intangible_assets_in_place_leases": 1850000000,
"intangible_assets_above_market_leases": 420000000,
"straight_line_rent_receivable": 340000000,
"gross_leasable_area_square_feet": 125000000,
"number_of_properties_owned": 385,
"debt_maturities_within_1_year": 850000000,
"fixed_rate_debt_percentage": 0.85,
// ... ~75 total fields
}
]
}Rate Limits
10 requests per second per IP address
Cash Flow Statement API (v1)
Industry-aware cash flow statement data with automatic field detection
Endpoint
/api-si/v1/cash-flows/:tickerIndustry-Aware Schema
The API automatically returns fields based on the company's industry (detected via SIC code). All companies receive standard cash flow fields (or null if not applicable to their business model). Most industries use standard fields only, with a few having additional specialized fields.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | string | FY | Period type: FY, Q, Q1, Q2, Q3, Q4 |
| year | number | null | Filter by fiscal year (2014-present) |
| limit | number | null | Max records (1-100). Null returns all |
Example Response
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
"net_cash_from_operations": 22563000000,
"net_cash_from_investing": -7077000000,
"net_cash_from_financing": -23906000000,
"capital_expenditures": -2434000000,
"free_cash_flow": 20129000000,
"cash_at_end_of_period": 67416000000,
// ... standard fields
}
],
"meta": {
"ticker": "AAPL",
"period": "FY",
"year": null,
"limit": 5,
"count": 1
}
}Example Response (Banking)
{
"data": [
{
"fiscal_year": 2024,
"fiscal_period": "Q1",
"period_end_date": "2024-03-31",
// Standard fields
"net_cash_from_operations": 8234000000,
"capital_expenditures": -450000000,
"cash_at_end_of_period": 125400000000,
// Banking-specific fields
"change_in_loans": -12340000000,
"change_in_deposits": 8500000000,
"proceeds_from_loan_sales": 2100000000,
"proceeds_from_securities_maturities": 15600000000,
"purchases_of_securities_held_to_maturity": -8900000000,
"purchases_of_securities_available_for_sale": -5400000000,
"proceeds_from_fhlb_borrowings": 3200000000,
"repayment_of_fhlb_borrowings": -2800000000,
// ... ~46 total fields
}
]
}Rate Limits
10 requests per second per IP address
Key Ratios API (v1)
Industry-aware financial ratios with automatic detection
Endpoint
/api-si/v1/key-ratios/:tickerIndustry-Aware Ratios
The API automatically detects the company's industry based on SIC code and returns both standard ratios (applicable to all companies) and industry-specific ratios tailored to the sector.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | string | FY | Period type: FY, Q1, Q2, Q3, Q4 |
| year | number | null | Filter by fiscal year (2014-present). Omit for latest. |
Example Response
{
"data": {
"cik": "0000320193",
"fiscal_year": 2024,
"fiscal_period": "FY",
"period_end_date": "2024-09-28",
"profitability": {
"gross_profit_margin": 46.22,
"operating_profit_margin": 31.87,
"net_profit_margin": 26.44,
"return_on_assets": 22.08,
"return_on_equity": 137.87
},
"liquidity": {
"current_ratio": 0.87,
"quick_ratio": 0.81,
"cash_ratio": 0.21
},
"leverage": {
"debt_to_equity": 1.55,
"debt_to_assets": 0.32,
"equity_multiplier": 6.24
},
"efficiency": {
"asset_turnover": 0.84,
"inventory_turnover": 35.42,
"receivables_turnover": 12.16,
"payables_turnover": 8.93
},
"per_share": {
"book_value_per_share": 4.43,
"tangible_book_value_per_share": 3.89
}
}
}Example Response (Bank)
{
"data": {
"cik": "0000004962",
"fiscal_year": 2024,
"fiscal_period": "FY",
"period_end_date": "2024-12-31",
"industry": "banking",
"profitability": { ... },
"liquidity": { ... },
"leverage": { ... },
"efficiency": { ... },
"per_share": { ... },
"banking": {
"net_interest_margin": 2.45,
"efficiency_ratio": 62.3,
"return_on_average_assets": 1.12,
"return_on_average_equity": 12.8,
"npl_ratio": 0.85,
"npl_coverage_ratio": 145.2,
"loan_to_deposit_ratio": 78.5,
"tier1_capital_ratio": 13.2,
"cet1_ratio": 11.8,
"leverage_ratio": 8.5,
"net_charge_off_rate": 0.42,
"credit_loss_ratio": 1.35,
"non_interest_income_ratio": 42.1
}
}
}Rate Limits
10 requests per second per IP address
Financial Growth API (v1)
Year-over-year growth rates for key financial metrics
Endpoint
/api-si/v1/financial-growth/:tickerQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | string | FY | Period type: FY, Q1, Q2, Q3, Q4 |
| limit | number | null | Max periods to return (1-20). Omit for all. |
Example Response
{
"data": [
{
"cik": "0000320193",
"fiscal_year": 2024,
"fiscal_period": "FY",
"period_end_date": "2024-09-28",
"revenue_growth": 2.02,
"gross_profit_growth": 5.44,
"net_income_growth": 7.96,
"eps_growth": 10.09,
"total_assets_growth": 3.31,
"operating_cash_flow_growth": 18.79,
"free_cash_flow_growth": 17.03
}
],
"meta": {
"ticker": "AAPL",
"period": "FY",
"limit": null,
"count": 1
}
}Income Statement TTM API (v1)
Industry-aware trailing twelve month income statement data
Endpoint
/api-si/v1/income-statements-ttm/:tickerReturns the most recent trailing twelve month data. No query parameters required.
Industry-Aware Schema
The API automatically returns fields based on the company's industry (detected via SIC code). All companies receive standard TTM fields (or null if not applicable to their business model), plus industry-specific fields when relevant.
Example Response
{
"data": {
"revenue_ttm": 385603000000,
"cost_of_revenue_ttm": 207546000000,
"gross_profit_ttm": 178257000000,
"operating_income_ttm": 122966000000,
"net_income_ttm": 101956000000,
"basic_eps_ttm": 6.11,
"diluted_eps_ttm": 6.08,
"ebitda_ttm": 134219000000,
// ... standard fields
}
}Rate Limits
10 requests per second per IP address
Cash Flow TTM API (v1)
Industry-aware trailing twelve month cash flow statement data
Endpoint
/api-si/v1/cash-flows-ttm/:tickerReturns the most recent trailing twelve month cash flow data. No query parameters required.
Industry-Aware Schema
The API automatically returns fields based on the company's industry (detected via SIC code). All companies receive standard TTM cash flow fields (or null if not applicable to their business model), plus industry-specific fields when relevant.
Example Response
{
"data": {
"net_cash_from_operations_ttm": 118254000000,
"net_cash_from_investing_ttm": -9967000000,
"net_cash_from_financing_ttm": -104037000000,
"capital_expenditures_ttm": -10067000000,
"free_cash_flow_ttm": 108187000000,
"dividends_paid_ttm": -15025000000,
"repurchase_of_stock_ttm": -94949000000,
"cash_at_end_of_period_ttm": 29943000000,
// ... standard fields
}
}Treasury Interest Rates API (v1)
US Treasury interest rates by security type with historical data and yield curve analysis
Endpoint
/api-si/v1/treasury-ratesQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | No | Start date (YYYY-MM-DD). Requires 'to' parameter. |
| to | string | No | End date (YYYY-MM-DD). Requires 'from' parameter. |
Response Fields
| Field | Type | Description |
|---|---|---|
| current | object | Most recent treasury rates snapshot |
| current.record_date | string | Date of the rate snapshot (YYYY-MM-DD) |
| current.treasury_bills_3_month | number | 3-month Treasury Bills rate |
| current.treasury_notes_2_year | number | 2-year Treasury Notes rate |
| current.treasury_notes_5_year | number | 5-year Treasury Notes rate |
| current.treasury_notes_10_year | number | 10-year Treasury Notes rate (primary DCF rate) |
| current.treasury_bonds_20_year | number | 20-year Treasury Bonds rate |
| current.treasury_bonds_30_year | number | 30-year Treasury Bonds rate |
| current.tips_10_year | number | 10-year TIPS (inflation-protected) rate |
| current.floating_rate_notes_2_year | number | 2-year Floating Rate Notes |
| historical | array | null | Historical snapshots (only if date range provided) |
| yield_curve | object | Yield curve analysis with inversion indicator |
| yield_curve.inverted | boolean | True if 3-month > 10-year (recession warning) |
| yield_curve.spread_10y_2y | number | null | Difference between 10-year and 2-year rates |
Example Response
{
"data": {
"current": {
"record_date": "2025-09-30",
"treasury_bills_3_month": 4.187,
"treasury_notes_2_year": 4.250,
"treasury_notes_5_year": 3.580,
"treasury_notes_10_year": 3.112,
"treasury_bonds_20_year": 3.450,
"treasury_bonds_30_year": 3.327,
"tips_10_year": 0.909,
"floating_rate_notes_2_year": 4.034,
"total_marketable": 3.406,
"total_non_marketable": 3.173,
"total_interest_bearing_debt": 3.363,
"record_fiscal_year": 2025,
"record_fiscal_quarter": 4,
"record_calendar_year": 2025,
"record_calendar_month": 9
},
"historical": null,
"yield_curve": {
"3_month": 4.187,
"2_year": 4.250,
"5_year": 3.580,
"10_year": 3.112,
"20_year": 3.450,
"30_year": 3.327,
"inverted": true,
"spread_10y_2y": -1.138
}
},
"status": 200
}