# Levels.fyi Scraper \[$3/1K💰] | Salary & Comp Data (`ahmed_jasarevic/levels-fyi-scraper`) Actor

Scrape Levels.fyi compensation bands by company, role, level and location with p10–p90 total comp, base, stock and bonus, sample counts and source URLs. Build salary benchmarks and hiring datasets from live public data.

- **URL**: https://apify.com/ahmed_jasarevic/levels-fyi-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Categories:** Jobs
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Levels.fyi Scraper

Scrape **Levels.fyi** compensation data — salary bands by company, role, level and location with p10–p90 total comp, base, stock, bonus and sample counts — from the site's public salary pages.

### Build A Tech Salary Benchmark Dataset

- Compare total compensation across companies, roles, levels and locations
- Pull p10–p90 bands for total comp, base, stock and bonus
- Track sample counts and median years of experience behind every band
- Build salary-benchmarking products, recruiting offers or comp-analytics dashboards
- Join every row to its canonical Levels.fyi source URL for citation

### How It Works

![How the Levels.fyi Scraper turns company salary pages into a dataset of compensation bands by company, role, level and location.](https://api.apify.com/v2/key-value-stores/oeuA0kLOyhbRM4fzt/records/how-it-works-levels-fyi-scraper.webp)

The Actor collects publicly available Levels.fyi compensation data and normalizes it into one schema. Provide company, role or exact page URLs; it reads the published salary pages, follows the company index when needed and writes one row per role, level, offer sample or benchmark.

- `overview` mode returns the role-by-level matrix with medians and sample counts.
- `full` mode adds p10–p90 bands for total comp, base, stock and bonus.
- `discoverFromSitemap` enables bulk discovery across companies.

#### Coverage

- Company salary pages provide the role and level matrix.
- Company × role × location pages add percentile bands.
- Role benchmark pages show top-paying companies and locations.
- Published company indexes support bulk discovery.

### Scrape Salary Bands By Company, Role, Level And Location

At least one starting point is required: `companies`, `jobFamilies` or `startUrls`. There is no default company in this version.

- `companies` — company slugs or Levels.fyi URLs, such as `google`, `meta`, `jp-morgan-chase` or `https://www.levels.fyi/companies/google/salaries/software-engineer`.
- `jobFamilies` — role slugs or URLs, such as `software-engineer`, `product-manager` or `data-scientist`. Leave empty to collect every role the company reports; the Actor reads the company index first (one extra pass per company).
- `locations` — location slugs such as `united-states`, `new-york-city-area`, `san-francisco-bay-area` or `india`. Empty uses the site default (United States). One page is read per role × location.
- `detail` — `full` (default) collects every role page with p10–p90 bands for total comp, base, stock and bonus plus per-level labels. `overview` is a single-pass company matrix with medians and sample counts only.
- `startUrls` — exact Levels.fyi URLs: company salary pages, company × role pages, location pages or role benchmark pages (`/t/{role}`).
- `discoverFromSitemap` — use the published company index to bulk-collect companies until `maxItems` rows are reached. Combine it with `jobFamilies` to collect one role across many companies.
- `maxItems` — hard cap on dataset rows. Default 2000.
- `maxConcurrency` — pages processed in parallel. Default 3.

In `full` mode with an empty `jobFamilies` list, the company index is used only to discover role slugs, so rows are never duplicated.

### Compare Total Compensation, Base, Stock And Bonus

One flat dataset; `rowType` tells you what a row represents.

- `role` — the median band for one company × role × location: `totalCompValue` (median), `baseValue`, `stockValue`, `bonusValue`, `firstYearTotalComp` and the full percentile ladder `totalCompP10…P90`, `baseP10…P90`, `stockP10…P90`, `bonusP10…P90`, plus `sampleCount`, `totalSubmissions`, `medianBasis`, `medianLevel`, `medianTitle`, `medianLocation`, `employmentType`, `workArrangement`, `stockType`, `yearsExperienceMin/Max` and `dataDate`.
- `level` — one band per level: `level` (e.g. `L4`, `E5`, `IC3`), `levelSlug`, `levelLabels`, `levelOrder`, `levelSecondaryName`, `levelDescription`, `levelPercentOfWorkforce`, `levelPageUrl`, `totalCompValue` (average), `baseValue`, `stockValue`, `bonusValue`, `commissionValue`, `totalCompBasis: "average"`, `sampleCount`, `sampleCountAvgBasis`, `yoeAvg` and `yoeMedian`.
- `offer_sample` — optional anonymized total-comp points from a level's distribution chart: `totalCompValue`, `isRedacted`, `level`, `company`, `jobFamily`. These are distribution points, not full offer records; there is no base/stock split and no date.
- `job_family` — a site-wide role benchmark from `/t/{role}`: p50 and the full p10–p90 ladder, `averageTotalComp`, `sampleCount`, `topPayingCompanies` and `topPayingLocations`.

Common columns on every row: `company`, `companySlug`, `companyId`, `industry`, `companyType`, `employeeCount`, `hqCity`, `hqState`, `website`, `careerPage`, `jobFamily`, `jobFamilySlug`, `location`, `locationSlug`, `locationType`, `locationState`, `locationCountry`, `countryCode`, `currency`, `sourceUrl` and `scrapedAt`.

All figures are in the row's `currency` (Levels.fyi converts; USD by default). Location coverage varies by company and role — bands are only published where enough submissions exist, so a city page can legitimately have fewer levels than the national one.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `companies` | array | — | Company slugs or Levels.fyi URLs. |
| `jobFamilies` | array | — | Role slugs or URLs. Empty collects every role the company reports. |
| `locations` | array | United States | Location slugs. One page per role × location. |
| `detail` | string | `full` | `full` for percentiles and per-level bands; `overview` for a single-pass company matrix. |
| `includeOfferSamples` | boolean | `false` | Emit anonymized total-comp points from each level's distribution chart. |
| `startUrls` | array | — | Exact Levels.fyi company, role, location or benchmark URLs. |
| `discoverFromSitemap` | boolean | `false` | Use the company index for bulk discovery until `maxItems` rows are collected. |
| `sitemapUrl` | string | `companies-sitemap-0.xml` | Company index source used when bulk discovery is enabled. |
| `maxItems` | integer | `2000` | Hard cap on dataset rows. Free users are capped at 10. |
| `maxConcurrency` | integer | `3` | Pages processed in parallel. |
| `proxy` | object | disabled | Standard Apify proxy configuration. |

Example — a whole company matrix in the cheapest mode:

```json
{ "companies": ["google"], "detail": "overview" }
```

Example — one role across two companies and two locations:

```json
{
  "companies": ["google", "meta"],
  "jobFamilies": ["software-engineer"],
  "locations": ["united-states", "new-york-city-area"],
  "detail": "full",
  "maxItems": 500
}
```

Example — every role a company reports, with level bands:

```json
{ "companies": ["stripe"], "detail": "full", "maxItems": 500 }
```

Example — site-wide benchmark for one role:

```json
{ "startUrls": ["https://www.levels.fyi/t/product-manager"] }
```

### Output

One row per band, level, offer sample or role benchmark.

```json
{
  "rowType": "level",
  "company": "Google",
  "companySlug": "google",
  "jobFamily": "Software Engineer",
  "jobFamilySlug": "software-engineer",
  "level": "L4",
  "levelLabels": ["L4", "Senior Software Engineer"],
  "location": "United States",
  "locationSlug": "united-states",
  "totalCompValue": 276000,
  "baseValue": 178000,
  "stockValue": 78000,
  "bonusValue": 20000,
  "commissionValue": null,
  "totalCompBasis": "average",
  "sampleCount": 1200,
  "yoeMedian": 5,
  "currency": "USD",
  "sourceUrl": "https://www.levels.fyi/companies/google/salaries/software-engineer/levels/l4",
  "scrapedAt": "2026-10-26T09:00:00.000Z"
}
```

| Field group | Fields |
| --- | --- |
| Identity | `rowType`, `company`, `companySlug`, `companyId`, `jobFamily`, `jobFamilySlug`, `level`, `levelLabels`, `location`, `locationSlug` |
| Compensation | `totalCompValue`, `baseValue`, `stockValue`, `bonusValue`, `commissionValue`, `totalCompBasis`, `firstYearTotalComp` |
| Percentiles | `totalCompP10`…`totalCompP90`, `baseP10`…`baseP90`, `stockP10`…`stockP90`, `bonusP10`…`bonusP90` |
| Samples | `sampleCount`, `totalSubmissions`, `sampleCountAvgBasis`, `yoeAvg`, `yoeMedian`, `dataDate` |
| Company | `industry`, `companyType`, `employeeCount`, `hqCity`, `hqState`, `website`, `careerPage` |
| Meta | `currency`, `sourceUrl`, `scrapedAt` |

### Pricing

This Actor uses pay-per-event pricing:

- **$0.003 per dataset row** — about **$3 per 1,000 rows**
- **$0.00005 per Actor start**

`overview` mode can return a whole company matrix in one pass, but billing is per row, not per page. A 2,000-row run costs about **$6.00** in event charges plus platform usage. Free users are capped at 10 rows; paying users get the full `maxItems`. Memory use is 256 MB, so compute cost is minimal.

### Schedule Salary Benchmark Monitoring

- **Quarterly comp refresh** — re-run your company list each quarter and diff `totalCompValue` against your last snapshot.
- **Offer calibration** — pull one role and level across peer companies before making an offer.
- **Market maps** — combine `companies`, `jobFamilies` and `locations` to build a role × city matrix.
- **Bulk discovery** — enable `discoverFromSitemap` with one `jobFamilies` value to collect that role across many companies.
- **Exports** — send rows to Google Sheets, BigQuery, Snowflake or an internal comp dashboard through the Apify API.

### Related Actors

- [H1B Data Scraper](https://apify.com/ahmed_jasarevic/h1bdata-info-scraper) — H-1B employer salary disclosures by job title and location.
- [RepVue Scraper](https://apify.com/ahmed_jasarevic/repvue-scraper) — sales compensation and quota data.
- [Indeed Job Scraper](https://apify.com/ahmed_jasarevic/indeed-job-scraper) — job postings with salary ranges.
- [eFinancialCareers Scraper](https://apify.com/ahmed_jasarevic/efinancialcareers-scraper) — finance and banking job listings.
- [Career Site ATS Jobs API](https://apify.com/memo23/career-site-ats-jobs-api) — live jobs across 116 ATS platforms.

### FAQ

#### Is there an official Levels.fyi API?

Yes. Levels.fyi sells API, CLI and MCP access at [levels.fyi/api-access](https://www.levels.fyi/api-access) for teams that need a contract, SLA or licensed bulk data. This Actor reads the public salary pages instead, which is useful for ad-hoc research, prototypes and teams that do not need a commercial agreement.

#### Why do I need to provide a company, role or URL?

This version has no default company. At least one of `companies`, `jobFamilies` or `startUrls` must be set; otherwise the Actor has no starting point and stops with a clear error. Provide a company slug, a role slug or an exact Levels.fyi URL in every run.

#### Why are some percentiles or levels missing?

Levels.fyi publishes a band only when enough submissions exist. A city page can have fewer levels than the national page, and some levels have no p10–p90 breakdown. Missing values are `null`, not zero.

#### Why does a city page show "United States" as the location?

The Actor uses the page's published location when it is available and otherwise the site default. Some city pages display the country label in their data; the Actor preserves the published location rather than guessing.

#### What is the difference between `role` and `level` rows?

A `role` row is the median band for one company × role × location. A `level` row is one compensation band per level, using the site's average basis. Use `role` for a headline number and `level` for level-by-level comparisons.

#### Are `offer_sample` rows full offer records?

No. They are anonymized total-compensation points from a level's published distribution chart. They carry no base/stock split, no dates and no tenure. The full offer table is login-gated and is not scraped.

#### Can I get a free preview?

Yes. Free Apify users receive the first 10 rows of a run; paying users receive the full `maxItems` allowance.

### For AI Agents & LLM Apps

Returns Levels.fyi compensation bands as one row per role, level, offer sample or job-family benchmark.

Minimal input:

```json
{ "companies": ["google"], "detail": "overview", "maxItems": 50 }
```

Role comparison:

```json
{ "companies": ["google", "meta"], "jobFamilies": ["software-engineer"], "detail": "full", "maxItems": 100 }
```

Role benchmark:

```json
{ "startUrls": ["https://www.levels.fyi/t/product-manager"] }
```

Output fields: `rowType`, `company`, `companySlug`, `companyId`, `jobFamily`, `jobFamilySlug`, `level`, `levelLabels`, `levelSlug`, `levelOrder`, `location`, `locationSlug`, `totalCompValue`, `baseValue`, `stockValue`, `bonusValue`, `commissionValue`, `totalCompBasis`, `firstYearTotalComp`, percentile fields (`totalCompP10`…`P90`, `baseP10`…`P90`, `stockP10`…`P90`, `bonusP10`…`P90`), `sampleCount`, `totalSubmissions`, `yoeAvg`, `yoeMedian`, `dataDate`, `currency`, `sourceUrl`, `scrapedAt`.

Behaviors an agent should know:

- At least one of `companies`, `jobFamilies` or `startUrls` is required; there is no default company.
- `detail: "overview"` returns medians and sample counts without base/stock/bonus splits.
- `jobFamilies: []` collects every role the company reports and adds one company-index pass per company.
- `locations: []` uses the site default (United States), not every location.
- `maxItems` is a hard row cap; free users are capped at 10 rows.
- Billing: $0.003 per row plus a $0.00005 start event.

### Legal & Compliance Disclaimer

This Actor is independent and is not affiliated with, endorsed by or sponsored by Levels.fyi. It reads only publicly reachable salary pages that Levels.fyi serves to any visitor; it does not bypass a login, paywall or CAPTCHA, and it does not submit salary data or change any account state. Levels.fyi's `robots.txt` allows the pages used here and asks that quoted figures link back to the canonical page; every row includes `sourceUrl` for that purpose. Compensation figures are user-submitted estimates, not guarantees. You are responsible for complying with Levels.fyi's terms of use and applicable law when you store, republish or commercialize the data. For contractually licensed, SLA-backed bulk data, use the official Levels.fyi API.

### SEO Keywords

levels fyi scraper, levels.fyi scraper, levels fyi salary data, levels.fyi api, compensation benchmark data, tech salary dataset, total compensation data, salary bands by level, levels fyi salaries, software engineer salary data, salary percentile data, compensation analytics, levels fyi csv, salary benchmarking tool, tech compensation dataset, company salary data, level salary bands, stock bonus compensation, salary research api, compensation market data

# Actor input Schema

## `companies` (type: `array`):

Company slugs or levels.fyi URLs, e.g. "google", "meta", "jp-morgan-chase" or "https://www.levels.fyi/companies/google/salaries/software-engineer".

## `jobFamilies` (type: `array`):

Role slugs or URLs, e.g. "software-engineer", "product-manager", "data-scientist". Leave empty to automatically collect every role the company reports (one extra request per company for the role index).

## `locations` (type: `array`):

Location slugs from levels.fyi, e.g. "united-states", "new-york-city-area", "san-francisco-bay-area", "india". Leave empty for the site default (United States). One extra request is made per role x location.

## `detail` (type: `string`):

`full` fetches every role page: p10–p90 bands for total comp, base, stock and bonus, plus per-level labels. `overview` costs one request per company and returns the role x level matrix with medians and sample counts only.

## `includeOfferSamples` (type: `boolean`):

Also emit the anonymised total-compensation points levels.fyi publishes in each level's distribution chart (rowType "offer_sample"). These are individual comp data points, not full offer records (no base/stock split, no dates).

## `startUrls` (type: `array`):

Optional exact levels.fyi URLs: company salary pages (/companies/{company}/salaries), company x role pages (/companies/{company}/salaries/{role}), location pages, or role benchmark pages (/t/{role}).

## `discoverFromSitemap` (type: `boolean`):

Read the company sitemap levels.fyi publishes for crawlers and keep crawling companies until `maxItems` rows are collected (alphabetical order, not relevance-ranked). Combine with `jobFamilies` to bulk-collect one role across many companies.

## `sitemapUrl` (type: `string`):

Company sitemap to read when "Discover companies from sitemap" is enabled. Files are named companies-sitemap-0.xml … companies-sitemap-78.xml.

## `maxItems` (type: `integer`):

Hard cap on dataset rows. The crawler keeps discovering companies and roles until it reaches this number (free users are capped at 10 rows).

## `maxConcurrency` (type: `integer`):

Number of pages fetched in parallel. Keep it modest to stay polite to the target.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "companies": [
    "google"
  ],
  "jobFamilies": [],
  "locations": [],
  "detail": "full",
  "includeOfferSamples": false,
  "startUrls": [],
  "discoverFromSitemap": false,
  "sitemapUrl": "https://www.levels.fyi/sitemaps/companies-sitemap-0.xml",
  "maxItems": 2000,
  "maxConcurrency": 3,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companies": [
        "google"
    ],
    "jobFamilies": [],
    "locations": [],
    "startUrls": [],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/levels-fyi-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "companies": ["google"],
    "jobFamilies": [],
    "locations": [],
    "startUrls": [],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/levels-fyi-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companies": [
    "google"
  ],
  "jobFamilies": [],
  "locations": [],
  "startUrls": [],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call ahmed_jasarevic/levels-fyi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahmed_jasarevic/levels-fyi-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sizSCekEP2jWE8bqu/builds/X6htbIEeVRLq5h2ly/openapi.json
