# 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/tools/companiesmarketcap
- Handle: `@companiesmarketcap`
- Category: [Finance](https://fous.com/tools/category/finance)
- Source website: https://companiesmarketcap.com
- Last verified: Sep 29, 2026

## Methods

### Get company size

Operation `get_company_size`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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 completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_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.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/companiesmarketcap`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_company_size`: Get company size. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_largest_companies`: List largest companies. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-companiesmarketcap https://api.fous.com/mcp/tools/companiesmarketcap --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## 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

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this CompaniesMarketCap tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. 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. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified 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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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 tools](https://fous.com/tools/category/finance)
