GET/companies/{ticker}/cashflow-statement

Get cash flow statement data including operating, investing, and financing activities. Free cash flow is calculated automatically.

Example Request

https://api.metricduck.com/api/v1/companies/AAPL/cashflow-statement?period=quarterly&limit=4

Path Parameters

ParameterTypeDescription
tickerrequired
stringStock ticker symbol (e.g., AAPL, MSFT, GOOGL)

Query Parameters

ParameterTypeDescription
period
stringReporting period: "quarterly" or "annual"
limit
integerNumber of periods to return (max: 100)
offset
integerNumber of periods to skip for pagination

Response

Returns company info and an array of cash flow statement periods. All monetary values are in USD. Cash outflows are shown as negative values.

Data Fields

FieldTypeDescription
period_end
string
End date of the reporting period (YYYY-MM-DD)
period_type
string
Period type: "quarterly" or "annual"
net_income
numbernullable
Net income (starting point for cash flow)
depreciation_amortization
numbernullable
Depreciation and amortization
stock_based_compensation
numbernullable
Stock-based compensation expense
change_in_working_capital
numbernullable
Changes in working capital
operating_cash_flow
numbernullable
Net cash from operating activities
capital_expenditures
numbernullable
Capital expenditures (CapEx)
acquisitions
numbernullable
Cash paid for acquisitions
investment_purchases
numbernullable
Purchases of investments
investment_sales
numbernullable
Sales/maturities of investments
investing_cash_flow
numbernullable
Net cash from investing activities
debt_issued
numbernullable
Proceeds from debt issuance
debt_repaid
numbernullable
Debt repayments
dividends_paid
numbernullable
Cash dividends paid
stock_repurchased
numbernullable
Cash paid for share repurchases
financing_cash_flow
numbernullable
Net cash from financing activities
net_change_in_cash
numbernullable
Net change in cash and cash equivalents
free_cash_flow
numbernullable
Free cash flow (operating cash flow - CapEx)

Example Response

{
  "company_name": "Apple Inc.",
  "ticker": "AAPL",
  "cik": "0000320193",
  "data": [
    {
      "period_end": "2024-09-30",
      "period_type": "quarterly",
      "net_income": 14736000000,
      "depreciation_amortization": 2910000000,
      "stock_based_compensation": 2956000000,
      "change_in_working_capital": 5234000000,
      "operating_cash_flow": 26810000000,
      "capital_expenditures": -2120000000,
      "acquisitions": 0,
      "investment_purchases": -18460000000,
      "investment_sales": 19820000000,
      "investing_cash_flow": -654000000,
      "debt_issued": 0,
      "debt_repaid": -1750000000,
      "dividends_paid": -3850000000,
      "stock_repurchased": -25670000000,
      "financing_cash_flow": -31340000000,
      "net_change_in_cash": -5184000000,
      "free_cash_flow": 24690000000
    }
  ],
  "count": 1,
  "has_more": true
}

Code Examples

Python

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.metricduck.com/api/v1"

# Get quarterly cash flow statements
response = requests.get(
    f"{BASE_URL}/companies/AAPL/cashflow-statement",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"period": "quarterly", "limit": 4}
)

data = response.json()
print(f"Company: {data['company_name']}")

for period in data['data']:
    ocf = period['operating_cash_flow']
    fcf = period['free_cash_flow']
    print(f"{period['period_end']}: Operating CF ${ocf:,.0f}, FCF ${fcf:,.0f}")

JavaScript

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.metricduck.com/api/v1';

// Get quarterly cash flow statements
const response = await fetch(
  `${BASE_URL}/companies/AAPL/cashflow-statement?` +
  new URLSearchParams({ period: 'quarterly', limit: '4' }),
  {
    headers: {
      'Authorization': `Bearer ${API_KEY}`
    }
  }
);

const data = await response.json();
console.log(`Company: ${data.company_name}`);

data.data.forEach(period => {
  const ocf = period.operating_cash_flow?.toLocaleString() ?? 'N/A';
  const fcf = period.free_cash_flow?.toLocaleString() ?? 'N/A';
  console.log(`${period.period_end}: Operating CF $${ocf}, FCF $${fcf}`);
});

Notes

  • - Cash outflows (CapEx, dividends, repurchases) are negative values
  • - Free cash flow = Operating cash flow - Capital expenditures
  • - Some fields may be null if not reported by the company
  • - Data is sourced directly from SEC XBRL filings