# Levels.fyi API: Compare company pay

> Compares Levels.fyi's published median yearly pay (total, base, stock, bonus) for one role across 2 to 10 companies in a location, ranked by median total pay. Components are null where the site does not publish them; companies with no data come last with a note.

Unofficial. Not affiliated with or endorsed by Levels.fyi.

- Page: https://fous.com/methods/levels.fyi/compare-company-pay
- Method: `levels.fyi/compare_company_pay`, version 1
- Website: levels.fyi
- Returns: role, location, currency, companies (rank, median total, base, stock, bonus, note, link)
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

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

## Output

From a run on Oct 31, 2026. Its input:

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

Its output:

```json
{
  "role": "Product Manager",
  "currency": "USD",
  "location": "United States",
  "companies": [
    {
      "link": "https://www.levels.fyi/companies/meta/salaries/product-manager/locations/united-states",
      "note": null,
      "rank": 1,
      "company": "Meta",
      "median_bonus": 31000,
      "median_base_salary": 208000,
      "median_stock_per_year": 300000,
      "median_total_pay_per_year": 539000
    },
    {
      "link": "https://www.levels.fyi/companies/google/salaries/product-manager/locations/united-states",
      "note": null,
      "rank": 2,
      "company": "Google",
      "median_bonus": 50000,
      "median_base_salary": 235000,
      "median_stock_per_year": 200000,
      "median_total_pay_per_year": 485000
    },
    {
      "link": "https://www.levels.fyi/companies/amazon/salaries/product-manager/locations/united-states",
      "note": null,
      "rank": 3,
      "company": "Amazon",
      "median_bonus": null,
      "median_base_salary": 205000,
      "median_stock_per_year": 150000,
      "median_total_pay_per_year": 355000
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"levels.fyi/compare_company_pay","input":{"role":"product manager","companies":["Google","Meta","Amazon"]}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Compare median total compensation for software engineers at Google, Meta, Amazon, and Apple in the United States, ranked highest to lowest
- On levels.fyi, how does data scientist pay at Shopify, RBC, and Microsoft stack up in Canada? I need base, stock, and bonus broken out
- Which pays product managers more in the US: Stripe, Airbnb, Uber, Netflix, or Salesforce? Show the median yearly total and its components
- I have offers from Nvidia and AMD for a hardware engineer role. Pull the levels.fyi median base, stock, and bonus for both in the United States
- Rank median pay for UX designers in the United Kingdom across Spotify, Deliveroo, Monzo, Revolut, Google, and Meta

## Input schema

```json
{
  "type": "object",
  "required": [
    "companies",
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "minLength": 1,
      "description": "Job title or family, for example \"product manager\"."
    },
    "location": {
      "type": "string",
      "default": "United States",
      "description": "Location to compare, for example \"United States\" or \"Canada\". Defaults to United States."
    },
    "companies": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 10,
      "minItems": 2,
      "description": "Names of 2 to 10 companies to compare, for example [\"Google\", \"Meta\", \"Amazon\"]."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "role",
    "location",
    "currency",
    "companies"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "Role used for the comparison."
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "Published currency code, or null if no source page gives a currency."
    },
    "location": {
      "type": "string",
      "description": "Location used for the comparison."
    },
    "companies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "rank",
          "company",
          "median_total_pay_per_year",
          "median_base_salary",
          "median_stock_per_year",
          "median_bonus",
          "note",
          "link"
        ],
        "properties": {
          "link": {
            "type": "string",
            "description": "Levels.fyi page for this company and role."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "No-data message, or null when a total is available."
          },
          "rank": {
            "type": "integer",
            "description": "Position in this comparison, highest published median first."
          },
          "company": {
            "type": "string",
            "description": "Company name."
          },
          "median_bonus": {
            "type": [
              "number",
              "null"
            ],
            "description": "Published median bonus in the listed currency."
          },
          "median_base_salary": {
            "type": [
              "number",
              "null"
            ],
            "description": "Published median base salary in the listed currency."
          },
          "median_stock_per_year": {
            "type": [
              "number",
              "null"
            ],
            "description": "Published median annualized stock in the listed currency."
          },
          "median_total_pay_per_year": {
            "type": [
              "number",
              "null"
            ],
            "description": "Published median total annual pay in the listed currency."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

## See more

- [Levels.fyi API: Get company salaries by level](https://fous.com/methods/levels.fyi/get-company-salaries.md): Returns Levels.fyi's published 50th-percentile annual pay (total, base, stock, bonus) for each career level at a company and role, optionally in a location, in the location's currency.
- [Levels.fyi API: List top paying companies](https://fous.com/methods/levels.fyi/list-top-paying-companies.md): Lists the companies on the Levels.fyi leaderboard for a job role and location, ranked by median yearly total pay (all levels). The public leaderboard shows up to 50 companies per selection.
- [PayScale API: Get company pay](https://fous.com/methods/payscale.com/get-company-pay.md): Shows an employer's average annual base salary and its common jobs, with salary ranges, from PayScale public research pages.
- [AmbitionBox API: Get company salaries](https://fous.com/methods/ambitionbox.com/get-company-salaries.md): Gets annual salaries by role at an Indian company from AmbitionBox, ordered by number of reports, plus annual averages by experience band when a job title is supplied.
- [Lever API: List company jobs](https://fous.com/methods/jobs.lever.co/list-company-jobs.md): Lists open jobs on a company's Lever job board, with optional team, location and workplace filters.
- [PayScale API: Get salary for a job title](https://fous.com/methods/payscale.com/get-salary.md): Gets typical pay for a job title from PayScale research pages. You can narrow it to a country and a city.
- [Indeed API: Get salary for a job title](https://fous.com/methods/indeed.com/get-salary.md): Finds the typical pay for a job title in the United States or a U.S. city or state on Indeed's public salary pages, with the number of reported salaries, the last update date, and the top-paying cities and companies when shown.
- [Remote OK API: Search remote jobs](https://fous.com/methods/remoteok.com/search-jobs.md): Searches Remote OK jobs by role or skill. Results can be filtered by listed region and by minimum annual USD salary.
- [All Levels.fyi methods](https://fous.com/methods/levels.fyi.md)
