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.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Role, required
role Job title or family, for example "product manager".
product manager
- Location optional
location Location to compare, for example "United States" or "Canada". Defaults to United States.
United States (default)
- Companies, required
companies Names of 2 to 10 companies to compare, for example ["Google", "Meta", "Amazon"].
- Meta
- Amazon
List of text 2 to 10 items.
Input as JSON
{ "role": "product manager", "companies": [ "Google", "Meta", "Amazon" ]}Output
{ "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 } ]}Code
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"]}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "levels.fyi/compare_company_pay" , "input": { "role": "product manager", "companies": [ "Google", "Meta", "Amazon" ] }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "levels.fyi/compare_company_pay" , "input": { "role": "product manager", "companies": [ "Google", "Meta", "Amazon" ] } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run levels.fyi/compare_company_pay# with {"role":"product manager","companies":["Google","Meta","Amazon"]}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "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
{ "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}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
levels.fyi/compare_company_pay- Returns
- role, location, currency, companies (rank, median total, base, stock, bonus, note, link)
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method levels.fyi/compare_company_pay with the inputs above.
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
See more
All Levels.fyi methodsReturns 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/get_company_salariesLists 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.
levels.fyi/list_top_paying_companiesShows an employer's average annual base salary and its common jobs, with salary ranges, from PayScale public research pages.
payscale.com/get_company_payGets 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.
ambitionbox.com/get_company_salariesLists open jobs on a company's Lever job board, with optional team, location and workplace filters.
jobs.lever.co/list_company_jobsGets typical pay for a job title from PayScale research pages. You can narrow it to a country and a city.
payscale.com/get_salaryFinds 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.
indeed.com/get_salarySearches Remote OK jobs by role or skill. Results can be filtered by listed region and by minimum annual USD salary.
remoteok.com/search_jobs