# CompaniesMarketCap API

> CompaniesMarketCap returns company rankings and financial data as a workflow and API.

Get company size returns a public company’s financial figures and completed-year market-cap history; provide its name or ticker.

- Page: https://fous.com/workflows/companiesmarketcap
- Handle: `@companiesmarketcap`
- Category: [Finance](https://fous.com/workflows/category/finance)
- Source website: https://companiesmarketcap.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with CompaniesMarketCap.

## Methods

### Get company size

Operation `get_company_size`, version 1. 1 credit per call.

See a public company’s size, financial figures, and completed-year market-cap history from its name or ticker. Missing figures are null; employee counts may be unavailable when the company is not listed in its category ranking.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `company` | string | yes | `"Coca-Cola"` | Company name or stock ticker, for example Coca-Cola or KO. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "company"
  ],
  "properties": {
    "company": {
      "type": "string",
      "description": "Company name or stock ticker, for example Coca-Cola or KO.",
      "examples": [
        "Coca-Cola",
        "KO",
        "Apple"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "company": "Coca-Cola"
    },
    {
      "company": "KO"
    },
    {
      "company": "Apple"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `ticker` | string or null | `"KO"` | Stock ticker. |
| `country` | string or null | `"United States"` | Country where the company is based. |
| `currency` | string or null | `"USD"` | Currency code for money amounts; USD. |
| `employees` | integer or null | `65900` | Number of employees. |
| `company_name` | string or null | `"Coca-Cola"` | Company name. |
| `earnings_usd` | number or null | `18790000000` | Current earnings in USD, as reported by the site. |
| `market_cap_usd` | number or null | `375090000000` | Current market capitalization in USD. |
| `share_price_usd` | number or null | `87.18` | Share price in USD. |
| `company_page_link` | string or null | `"https://companiesmarketcap.com/coca-cola/marketcap/"` | Link to the company market-cap page. |
| `market_cap_by_year` | array |  | Market capitalization at the end of each completed year, oldest first. |
| `market_cap_by_year[].year` | integer | `1996` | Completed calendar year. |
| `market_cap_by_year[].market_cap_usd` | number | `130560000000` | Market capitalization in USD at year end. |
| `dividend_yield_percent` | number or null | `1.8` | Current annual dividend yield, in percent. |
| `global_market_cap_rank` | integer or null | `39` | Worldwide market-cap rank. |
| `price_to_earnings_ratio` | number or null | `26.2` | Current P/E ratio. |
| `revenue_last_12_months_usd` | number or null | `50120000000` | Revenue in the last 12 months in USD. |

**Example input**

```json
{
  "company": "Coca-Cola"
}
```

**Example output**

```json
{
  "ticker": "KO",
  "country": "United States",
  "currency": "USD",
  "employees": 65900,
  "company_name": "Coca-Cola",
  "earnings_usd": 18790000000,
  "market_cap_usd": 375090000000,
  "share_price_usd": 87.18,
  "company_page_link": "https://companiesmarketcap.com/coca-cola/marketcap/",
  "market_cap_by_year": [
    {
      "year": 1996,
      "market_cap_usd": 130560000000
    },
    {
      "year": 1997,
      "market_cap_usd": 164760000000
    },
    {
      "year": 1998,
      "market_cap_usd": 165180000000
    }
  ],
  "dividend_yield_percent": 1.8,
  "global_market_cap_rank": 39,
  "price_to_earnings_ratio": 26.2,
  "revenue_last_12_months_usd": 50120000000
}
```

### List largest companies

Operation `list_largest_companies`, version 1. 1 credit per call.

Rank public companies worldwide or by country and industry using market cap, revenue, earnings, employees, or dividend yield. Combined filters retain the industry ranking order and show only companies from the selected country.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `country` | string | no | `"World"` | Country name, such as Germany; World for all countries. |
| `rank_by` | string | no | `"revenue"` | Measure for ranking companies, such as revenue. |
| `industry` | string | no | `"All"` | Industry name, such as semiconductors; All for all industries. |
| `max_results` | integer | no | `5` | Maximum number of companies, such as 50. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "country": {
      "type": "string",
      "default": "World",
      "description": "Country name, such as Germany; World for all countries.",
      "examples": [
        "World",
        "Germany"
      ]
    },
    "rank_by": {
      "enum": [
        "market_cap",
        "revenue",
        "earnings",
        "employees",
        "dividend_yield"
      ],
      "type": "string",
      "default": "market_cap",
      "description": "Measure for ranking companies, such as revenue.",
      "examples": [
        "revenue",
        "market_cap",
        "employees"
      ]
    },
    "industry": {
      "type": "string",
      "default": "All",
      "description": "Industry name, such as semiconductors; All for all industries.",
      "examples": [
        "All",
        "semiconductors"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of companies, such as 50.",
      "x-fous-developer": true,
      "examples": [
        5,
        10
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "country": "World",
      "rank_by": "revenue",
      "industry": "All",
      "max_results": 5
    },
    {
      "country": "Germany",
      "rank_by": "market_cap",
      "industry": "semiconductors",
      "max_results": 10
    },
    {
      "country": "Germany",
      "rank_by": "employees",
      "industry": "All",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `companies` | array |  |  |
| `companies[].rank` | integer | `1` | Position in this ranking. |
| `companies[].ticker` | string or null | `"AMZN"` |  |
| `companies[].country` | string or null | `"United States"` |  |
| `companies[].company_name` | string | `"Amazon"` |  |
| `companies[].ranking_unit` | string | `"USD"` |  |
| `companies[].ranking_value` | number or null | `742776000000` | Exact value of the ranking measure. |
| `companies[].share_price_usd` | number or null | `246.15` |  |
| `companies[].company_page_link` | string | `"https://companiesmarketcap.com/amazon/revenue/"` |  |
| `companies[].ranking_value_shown` | string | `"$742.77 B"` | Formatted value shown in the ranking. |
| `companies[].todays_change_percent` | number or null | `-1.41` |  |

**Example input**

```json
{
  "country": "World",
  "rank_by": "revenue",
  "industry": "All",
  "max_results": 5
}
```

**Example output**

```json
{
  "companies": [
    {
      "rank": 1,
      "ticker": "AMZN",
      "country": "United States",
      "company_name": "Amazon",
      "ranking_unit": "USD",
      "ranking_value": 742776000000,
      "share_price_usd": 246.15,
      "company_page_link": "https://companiesmarketcap.com/amazon/revenue/",
      "ranking_value_shown": "$742.77 B",
      "todays_change_percent": -1.41
    },
    {
      "rank": 2,
      "ticker": "WMT",
      "country": "United States",
      "company_name": "Walmart",
      "ranking_unit": "USD",
      "ranking_value": 735840000000,
      "share_price_usd": 108.73,
      "company_page_link": "https://companiesmarketcap.com/walmart/revenue/",
      "ranking_value_shown": "$735.84 B",
      "todays_change_percent": 0.69
    },
    {
      "rank": 3,
      "ticker": "2222.SR",
      "country": "S. Arabia",
      "company_name": "Saudi Aramco",
      "ranking_unit": "USD",
      "ranking_value": 487870749993,
      "share_price_usd": 6.8,
      "company_page_link": "https://companiesmarketcap.com/saudi-aramco/revenue/",
      "ranking_value_shown": "$487.87 B",
      "todays_change_percent": -1.08
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@companiesmarketcap",
  "visibility": "public",
  "operation": "get_company_size",
  "version": 1,
  "input": {
    "company": "Coca-Cola"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@companiesmarketcap\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_company_size\",\n  \"version\": 1,\n  \"input\": {\n    \"company\": \"Coca-Cola\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@companiesmarketcap",
  "visibility": "public",
  "operation": "get_company_size",
  "version": 1,
  "input": {
    "company": "Coca-Cola"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@companiesmarketcap","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare public companies by market cap, revenue, earnings, employees, or dividend yield
- Find top-ranked companies in a country or industry
- Review a company’s financial figures and market-cap history
- Compare companies’ share prices and dividend yields

## FAQ

### Is Fous affiliated with CompaniesMarketCap?

No. Fous is not affiliated with CompaniesMarketCap. This workflow reads the public companiesmarketcap.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a CompaniesMarketCap account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from companiesmarketcap.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### Which companies rank highest by revenue in a country?

Use List largest companies with the country and revenue as the ranking measure.

### What is a company’s market cap and financial profile?

Get company size returns market capitalization, earnings, revenue, employees, share price, and other available company figures.

### How has a company’s market cap changed by year?

Get company size returns market capitalization at the end of each completed year.

## Related

- [CoinMarketCap API](https://fous.com/workflows/coinmarketcap.md): CoinMarketCap returns prices, rankings and current Fear and Greed readings; gainers and losers include up to 30 top-100 coins above $50,000 in 24-hour volume.
- [Macrotrends API](https://fous.com/workflows/macrotrends.md): Macrotrends provides long-term financial and economic charts, company metric histories, and yearly commodity and index prices; current-year prices may be incomplete.
- [Stock Analysis API](https://fous.com/workflows/stock-analysis.md): Stock Analysis returns free-period company statements, statistics current as of its displayed date, typically top-25 ETF holdings, and US IPOs since 2019 with potentially missing prices or returns.
- [Forbes API](https://fous.com/workflows/forbes.md): Forbes provides business news, real-time billionaire rankings and wealth that can change during the trading day, plus ranked Global 2000 companies with financial figures and company profiles.
- [MSN Money API](https://fous.com/workflows/msn-money.md): MSN Money provides stock quotes, key facts, financial news, and market data, including current market movers; quotes and prices may be delayed.
- [Fortune 500 API](https://fous.com/workflows/fortune-500.md): Fortune 500 ranks companies by revenue with year, industry, sector, and state filters and Fortune 500/1000 rankings; profile facts may be current, not historical.
- [TradingView API](https://fous.com/workflows/tradingview.md): TradingView provides charts, markets, and technical analysis, with changing buy, sell, or neutral signals and stock screening; quotes may be delayed.
- [Nasdaq API](https://fous.com/workflows/nasdaq.md): Nasdaq provides market activity, scheduled earnings by date with fiscal quarter-end month, monthly US IPO listings, and dated ex-dividend entries; dividend histories cover Nasdaq-listed stocks only.
- [All Finance workflows](https://fous.com/workflows/category/finance)
