# Levels.fyi API

> Levels.fyi provides company salaries, pay rankings, and compensation comparisons as a workflow and API.

Levels.fyi returns published 50th-percentile annual pay by career level for a company and role; provide both, optionally a location. List top paying companies ranks yearly total pay by role and location; provide a role, optionally a location and result maximum. Compare company pay compares published median yearly pay across companies for a role and location; provide a role and 2 to 10 companies.

- Page: https://fous.com/tools/levels-fyi
- Handle: `@levels-fyi`
- Category: [Jobs](https://fous.com/tools/category/jobs)
- Source website: https://levels.fyi
- Last verified: Sep 29, 2026

## Methods

### Compare company pay

Operation `compare_company_pay`, 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.

Compare published median yearly pay for one role across 2 to 10 companies on Levels.fyi. Pay components are null when the site does not publish them for that company and location.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `role` | string | yes | `"product manager"` | Job title or family, for example "product manager". |
| `location` | string | no | `"Canada"` | Location to compare, for example "United States" or "Canada". Defaults to United States. |
| `companies` | array | yes |  | Names of 2 to 10 companies to compare, for example ["Google", "Meta", "Amazon"]. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "companies",
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "minLength": 1,
      "description": "Job title or family, for example \"product manager\".",
      "examples": [
        "product manager",
        "software engineer"
      ]
    },
    "location": {
      "type": "string",
      "default": "United States",
      "description": "Location to compare, for example \"United States\" or \"Canada\". Defaults to United States.",
      "examples": [
        "Canada"
      ]
    },
    "companies": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "examples": [
          "Google",
          "Meta",
          "Amazon"
        ],
        "description": "Use the same format as these example values: \"Google\", \"Meta\", \"Amazon\"."
      },
      "maxItems": 10,
      "minItems": 2,
      "description": "Names of 2 to 10 companies to compare, for example [\"Google\", \"Meta\", \"Amazon\"].",
      "examples": [
        [
          "Google",
          "Meta",
          "Amazon"
        ],
        [
          "Google",
          "Microsoft",
          "OpenAI"
        ]
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "role": "product manager",
      "location": "Canada",
      "companies": [
        "Google",
        "Meta",
        "Amazon"
      ]
    },
    {
      "role": "product manager",
      "companies": [
        "Google",
        "Meta",
        "Amazon"
      ]
    },
    {
      "role": "software engineer",
      "companies": [
        "Google",
        "Microsoft",
        "OpenAI"
      ]
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `role` | string | `"Product Manager"` | Role used for the comparison. |
| `currency` | string or null | `"CAD"` | Published currency code, or null if no source page gives a currency. |
| `location` | string | `"Canada"` | Location used for the comparison. |
| `companies` | array |  |  |
| `companies[].link` | string | `"https://www.levels.fyi/companies/google/salaries/product-manager/locations/canada"` | Levels.fyi page for this company and role. |
| `companies[].note` | string or null | `"No data on Levels.fyi"` | No-data message, or null when a total is available. |
| `companies[].rank` | integer | `1` | Position in this comparison, highest published median first. |
| `companies[].company` | string | `"Google"` | Company name. |
| `companies[].median_bonus` | number or null | `31000` | Published median bonus in the listed currency. |
| `companies[].median_base_salary` | number or null | `160952` | Published median base salary in the listed currency. |
| `companies[].median_stock_per_year` | number or null | `60737` | Published median annualized stock in the listed currency. |
| `companies[].median_total_pay_per_year` | number or null | `280800` | Published median total annual pay in the listed currency. |

**Example input**

```json
{
  "role": "product manager",
  "location": "Canada",
  "companies": [
    "Google",
    "Meta",
    "Amazon"
  ]
}
```

**Example output**

```json
{
  "role": "Product Manager",
  "currency": "CAD",
  "location": "Canada",
  "companies": [
    {
      "link": "https://www.levels.fyi/companies/google/salaries/product-manager/locations/canada",
      "note": null,
      "rank": 1,
      "company": "Google",
      "median_bonus": null,
      "median_base_salary": null,
      "median_stock_per_year": null,
      "median_total_pay_per_year": 280800
    },
    {
      "link": "https://www.levels.fyi/companies/amazon/salaries/product-manager/locations/canada",
      "note": null,
      "rank": 2,
      "company": "Amazon",
      "median_bonus": null,
      "median_base_salary": 160952,
      "median_stock_per_year": 60737,
      "median_total_pay_per_year": 221689
    },
    {
      "link": "https://www.levels.fyi/companies/meta/salaries/product-manager/locations/canada",
      "note": "No data on Levels.fyi",
      "rank": 3,
      "company": "Meta",
      "median_bonus": null,
      "median_base_salary": null,
      "median_stock_per_year": null,
      "median_total_pay_per_year": null
    }
  ]
}
```

### Get company salaries

Operation `get_company_salaries`, 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.

Get published 50th-percentile annual pay for each career level at a company and role, optionally in a location. Per-level medians may differ from the average-by-level summary table.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `role` | string | yes | `"software engineer"` | Job family in words, for example software engineer. |
| `company` | string | yes | `"Google"` | Company name, for example Google. |
| `location` | string | no | `"India"` | Country or location shown by Levels.fyi, for example United States or India. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "company",
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "Job family in words, for example software engineer.",
      "examples": [
        "software engineer",
        "product manager"
      ]
    },
    "company": {
      "type": "string",
      "description": "Company name, for example Google.",
      "examples": [
        "Google",
        "Meta"
      ]
    },
    "location": {
      "type": "string",
      "default": "United States",
      "description": "Country or location shown by Levels.fyi, for example United States or India.",
      "examples": [
        "India"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "role": "software engineer",
      "company": "Google"
    },
    {
      "role": "software engineer",
      "company": "Google",
      "location": "India"
    },
    {
      "role": "product manager",
      "company": "Meta"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `role` | string | `"Software Engineer"` | Job family name. |
| `levels` | array |  | Career levels from junior to senior; pay fields are published 50th-percentile annual amounts, independently calculated. |
| `levels[].page_url` | string | `"https://www.levels.fyi/companies/google/salaries/software-engineer/levels/l3"` | Public page for this level and location. |
| `levels[].level_name` | string | `"L3"` | Company career level. |
| `levels[].data_points` | integer or null | `52` | Number of reported pay observations shown for the level. |
| `levels[].typical_title` | string or null | `"SWE II"` | Job title for the level. |
| `levels[].bonus_per_year` | number or null | `0` | 50th-percentile bonus per year. |
| `levels[].stock_per_year` | number or null | `25000` | 50th-percentile stock grant per year. |
| `levels[].base_salary_per_year` | number or null | `158000` | 50th-percentile base salary per year. |
| `levels[].median_total_pay_per_year` | number or null | `195000` | 50th-percentile total annual pay. |
| `company` | string | `"Google"` | Company name. |
| `currency` | string | `"USD"` | Currency code for all annual pay amounts. |
| `location` | string | `"United States"` | Location of pay figures. |

**Example input**

```json
{
  "role": "software engineer",
  "company": "Google"
}
```

**Example output**

```json
{
  "role": "Software Engineer",
  "levels": [
    {
      "page_url": "https://www.levels.fyi/companies/google/salaries/software-engineer/levels/l3",
      "level_name": "L3",
      "data_points": 52,
      "typical_title": "SWE II",
      "bonus_per_year": 0,
      "stock_per_year": 25000,
      "base_salary_per_year": 158000,
      "median_total_pay_per_year": 195000
    },
    {
      "page_url": "https://www.levels.fyi/companies/google/salaries/software-engineer/levels/l4",
      "level_name": "L4",
      "data_points": 58,
      "typical_title": "SWE III",
      "bonus_per_year": 30000,
      "stock_per_year": 80000,
      "base_salary_per_year": 199353,
      "median_total_pay_per_year": 292500
    },
    {
      "page_url": "https://www.levels.fyi/companies/google/salaries/software-engineer/levels/l5",
      "level_name": "L5",
      "data_points": 38,
      "typical_title": "Senior SWE",
      "bonus_per_year": 40000,
      "stock_per_year": 150000,
      "base_salary_per_year": 236383,
      "median_total_pay_per_year": 426010.34
    }
  ],
  "company": "Google",
  "currency": "USD",
  "location": "United States"
}
```

### List top paying companies

Operation `list_top_paying_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.

List companies ranked by median yearly total pay for a job role and location. The public leaderboard displays up to 50 companies per selection.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `role` | string | yes | `"software engineer"` | Job family in words, for example software engineer. |
| `location` | string | no | `"Canada"` | Country or leaderboard location, for example United States or Canada. |
| `max_results` | integer | no | `8` | Maximum companies to return, for example 25. The public leaderboard shows at most 50. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "minLength": 1,
      "description": "Job family in words, for example software engineer.",
      "examples": [
        "software engineer",
        "data scientist"
      ]
    },
    "location": {
      "type": "string",
      "default": "United States",
      "description": "Country or leaderboard location, for example United States or Canada.",
      "examples": [
        "Canada"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 25,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum companies to return, for example 25. The public leaderboard shows at most 50.",
      "x-fous-developer": true,
      "examples": [
        8
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "role": "software engineer"
    },
    {
      "role": "data scientist",
      "location": "Canada",
      "max_results": 8
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `role` | string | `"Software Engineer"` | Selected job family. |
| `currency` | string | `"USD"` | Three-letter currency code for the yearly pay amounts. |
| `location` | string | `"United States"` | Selected country or location. |
| `companies` | array |  |  |
| `companies[].rank` | integer | `1` |  |
| `companies[].company` | string | `"Cursor"` |  |
| `companies[].company_link` | string | `"https://www.levels.fyi/company/cursor/salaries/"` |  |
| `companies[].median_total_pay_per_year` | number | `1000000` |  |

**Example input**

```json
{
  "role": "software engineer"
}
```

**Example output**

```json
{
  "role": "Software Engineer",
  "currency": "USD",
  "location": "United States",
  "companies": [
    {
      "rank": 1,
      "company": "Cursor",
      "company_link": "https://www.levels.fyi/company/cursor/salaries/",
      "median_total_pay_per_year": 1000000
    },
    {
      "rank": 2,
      "company": "Anthropic",
      "company_link": "https://www.levels.fyi/company/anthropic/salaries/",
      "median_total_pay_per_year": 882500
    },
    {
      "rank": 3,
      "company": "OpenAI",
      "company_link": "https://www.levels.fyi/company/openai/salaries/",
      "median_total_pay_per_year": 880000
    }
  ]
}
```

## 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": "@levels-fyi",
  "visibility": "public",
  "operation": "compare_company_pay",
  "version": 1,
  "input": {
    "role": "product manager",
    "location": "Canada",
    "companies": [
      "Google",
      "Meta",
      "Amazon"
    ]
  },
  "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\": \"@levels-fyi\",\n  \"visibility\": \"public\",\n  \"operation\": \"compare_company_pay\",\n  \"version\": 1,\n  \"input\": {\n    \"role\": \"product manager\",\n    \"location\": \"Canada\",\n    \"companies\": [\n      \"Google\",\n      \"Meta\",\n      \"Amazon\"\n    ]\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": "@levels-fyi",
  "visibility": "public",
  "operation": "compare_company_pay",
  "version": 1,
  "input": {
    "role": "product manager",
    "location": "Canada",
    "companies": [
      "Google",
      "Meta",
      "Amazon"
    ]
  },
  "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/levels-fyi`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `compare_company_pay`: Compare company pay. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_company_salaries`: Get company salaries. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_top_paying_companies`: List top paying 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-levels-fyi https://api.fous.com/mcp/tools/levels-fyi --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 pay by career level at a company.
- Rank companies by pay for a role and location.
- Compare median pay across companies for a role.
- Review published base salary, bonus, and stock pay components.
- Check reported observation counts by career level.

## 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 Levels.fyi 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 Levels.fyi account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from levels.fyi 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.

### What is the median pay by level at a company?

Use Get company salaries with a company and role, and optionally a location, to get published 50th-percentile annual pay by career level.

### Which companies pay the most for a role?

Use List top paying companies with a role and optionally a location to rank companies by median yearly total pay.

### How does pay compare across companies?

Use Compare company pay with a role and 2 to 10 companies, and optionally a location, to compare published median yearly pay.

## Related

- [PayScale API](https://fous.com/tools/payscale.md): PayScale provides job and location salary research, skill pay effects when published, and employer average base salaries and common jobs where available.
- [Indeed API](https://fous.com/tools/indeed.md): Indeed returns public first-page listings and details for available, unexpired jobs, company employee ratings and CEO approval when available, and typical pay from public salary pages.
- [Lever API](https://fous.com/tools/lever.md): Public job boards for companies hiring through Lever.
- [Glassdoor API](https://fous.com/tools/glassdoor.md): Employee reviews and company ratings.
- [AmbitionBox API](https://fous.com/tools/ambitionbox.md): AmbitionBox covers company reviews, salaries and jobs, including role pay, experience averages and ratings; verification can limit salary results, and review summaries may be unavailable.
- [Remote OK API](https://fous.com/tools/remote-ok.md): Remote job postings from Remote OK.
- [ZipRecruiter API](https://fous.com/tools/ziprecruiter.md): ZipRecruiter returns up to 100 public job listings per search and U.S. job-title pay ranges and top-paying cities where public salary pages exist.
- [H1B Salary Database API](https://fous.com/tools/h1b-salary-database.md): Search employer-filed H-1B salary and labor condition records.
- [All Jobs tools](https://fous.com/tools/category/jobs)
