{
  "openapi": "3.0.1",
  "info": {
    "title": "Levels.fyi Scraper",
    "description": "Scrape Levels.fyi compensation data with base salary, equity, bonus, and total compensation by company, role, level, and location. Pulls from public Next.js hydration data; no auth, structured output.",
    "version": "1.0",
    "x-build-id": "T7uP7NCKEgT3AbK1T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~levels-fyi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-levels-fyi-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~levels-fyi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-levels-fyi-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~levels-fyi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-levels-fyi-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "byCompany",
              "byCompanyByRole",
              "byCompanyByRoleLevel",
              "byRole",
              "byRoleLocation",
              "searchCompanies",
              "topCompanies",
              "byUrl"
            ],
            "type": "string",
            "description": "What to scrape from Levels.fyi.",
            "default": "byCompanyByRole"
          },
          "company": {
            "title": "Company slug",
            "type": "string",
            "description": "Levels.fyi company slug (mode=byCompany / byCompanyByRole / byCompanyByRoleLevel). Examples: `google`, `meta`, `apple`, `amazon`, `microsoft`, `netflix`, `openai`, `anthropic`. Visit `https://www.levels.fyi/companies/<slug>/salaries` to verify.",
            "default": "google"
          },
          "role": {
            "title": "Role / job-family slug",
            "enum": [
              "software-engineer",
              "product-manager",
              "data-scientist",
              "data-engineer",
              "machine-learning-engineer",
              "hardware-engineer",
              "site-reliability-engineer",
              "security-software-engineer",
              "engineering-manager",
              "technical-program-manager",
              "product-designer",
              "ux-researcher",
              "solution-architect",
              "management-consultant",
              "investment-banker",
              "marketing",
              "sales",
              "recruiter",
              "human-resources",
              "financial-analyst",
              "business-analyst",
              "accountant",
              "venture-capitalist",
              "chief-of-staff",
              "biomedical-engineer",
              "civil-engineer",
              "mechanical-engineer",
              "chemical-engineer"
            ],
            "type": "string",
            "description": "Job-family slug (mode=byCompanyByRole / byCompanyByRoleLevel / byRole / byRoleLocation). Pick from common slugs or pass any valid Levels.fyi job-family slug.",
            "default": "software-engineer"
          },
          "level": {
            "title": "Level slug",
            "type": "string",
            "description": "Levels.fyi level slug (mode=byCompanyByRoleLevel). Examples: `L3`, `L4`, `L5`, `IC3`, `E4`, `M1`. Slugs are company-specific — find them on the company×role page."
          },
          "locationSlug": {
            "title": "Location slug",
            "enum": [
              "united-states",
              "san-francisco-bay-area",
              "greater-seattle-area",
              "new-york-city-area",
              "los-angeles",
              "boston",
              "austin",
              "chicago",
              "denver",
              "atlanta",
              "europe",
              "united-kingdom",
              "germany",
              "france",
              "netherlands",
              "ireland",
              "switzerland",
              "asia",
              "india",
              "japan",
              "singapore",
              "china",
              "south-korea",
              "canada",
              "toronto",
              "vancouver",
              "australia",
              "latin-america",
              "brazil",
              "mexico",
              "africa"
            ],
            "type": "string",
            "description": "Levels.fyi location slug (mode=byRoleLocation). Common: `united-states`, `san-francisco-bay-area`, `greater-seattle-area`, `new-york-city-area`, `europe`, `india`, `canada`, `germany`, `united-kingdom`, `japan`.",
            "default": "san-francisco-bay-area"
          },
          "url": {
            "title": "Levels.fyi URL (mode=byUrl)",
            "type": "string",
            "description": "Any levels.fyi URL — `/companies/<slug>/salaries`, `/companies/<slug>/salaries/<role>`, `/t/<role>/locations/<loc>`, `/companies`, etc. Auto-routes to the right scraper."
          },
          "search": {
            "title": "Company name filter (mode=searchCompanies)",
            "type": "string",
            "description": "Substring match against the popular-companies catalog (case-insensitive). Empty = return all listed popular companies."
          },
          "minTotalCompensation": {
            "title": "Min total compensation",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop salary samples / level rows with totalCompensation below this value (USD-equivalent at the page's exchange rate)."
          },
          "maxTotalCompensation": {
            "title": "Max total compensation",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop salary samples / level rows with totalCompensation above this value."
          },
          "minYearsOfExperience": {
            "title": "Min years of experience",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Drop salary samples below this YOE."
          },
          "maxYearsOfExperience": {
            "title": "Max years of experience",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Drop salary samples above this YOE."
          },
          "includeSamples": {
            "title": "Include individual salary samples",
            "type": "boolean",
            "description": "Emit one record per individual salary submission inside each level (mode=byCompany / byCompanyByRole). When false, only level-aggregate rows are emitted.",
            "default": true
          },
          "includeAggregates": {
            "title": "Include level aggregates / percentiles",
            "type": "boolean",
            "description": "Emit one record per level (and an overall percentiles record) summarising compensation.",
            "default": true
          },
          "useResidentialProxyOnBlock": {
            "title": "Auto-escalate to Apify residential on 403/429",
            "type": "boolean",
            "description": "If Cloudflare blocks the direct fetch, retry through Apify residential proxy.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 200
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}