# Companiesmarketcap — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Track real-time market capitalization and rankings for global companies, search for specific firms, and access detailed financial metrics and historical performance data. Get comprehensive company profiles including current market position and financial trends to compare and analyze investment opportunities.

**Category:** Finance & Markets | **Website:** [companiesmarketcap.com/](https://companiesmarketcap.com/) | **Docs:** [parse.bot/marketplace/4d65eb02-34bc-4033-8b68-5be3dc055ccf/companiesmarketcap-com-api](https://parse.bot/marketplace/4d65eb02-34bc-4033-8b68-5be3dc055ccf/companiesmarketcap-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-companiesmarketcap-com-api-4d65eb02/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_company_details

Retrieve a detailed financial profile for a specific company. Resolves the identifier via search, then fetches the company's market cap page for rank, price, country, categories, description, and year-over-year change. Also returns full revenue and earnings history arrays.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `identifier` | string | Yes | Ticker symbol or company slug (e.g., 'AAPL', 'MSFT', 'tesla'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-companiesmarketcap-com-api-4d65eb02/get_company_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"identifier":"<string>"}'
```

### get_company_metric_history

Retrieve the full history for a specific financial metric of a company. Supports metrics such as pe-ratio, eps, dividend-yield, shares-outstanding, total-assets, revenue, earnings, operating-margin, and pb-ratio. Returns year-by-year values and percentage changes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `identifier` | string | Yes | Ticker symbol or company slug (e.g., 'AAPL', 'MSFT', 'tesla'). |
| `metric` | string | Yes | The metric to retrieve. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-companiesmarketcap-com-api-4d65eb02/get_company_metric_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"identifier":"<string>","metric":"<string>"}'
```

### get_ranking

Retrieve the global ranking of companies by market capitalization. Returns 100 companies per page, ordered by descending market cap. Each company includes rank, name, ticker, market cap (formatted and raw), price, daily change, and country. Paginate with the page parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (100 companies per page). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-companiesmarketcap-com-api-4d65eb02/get_ranking \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### search

Search for companies by name or ticker symbol using autocomplete. Returns matching companies and ETFs with their identifier (ticker), name, URL slug, and type. Useful for resolving a company name to an identifier for use with other endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Company name or ticker symbol to search for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-companiesmarketcap-com-api-4d65eb02/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
