# Glassdoor Scraper — Reviews, Salaries, Jobs & Interviews (`sian.agency/glassdoor-data-scraper`) Actor

Scrape Glassdoor at scale: company search, overview, reviews, salaries, interviews, jobs & salary estimates. 9 operations, one clean JSON dataset. Built for HR-tech, employer branding, recruiting intel and compensation benchmarking. The complete employer-intelligence bundle.

- **URL**: https://apify.com/sian.agency/glassdoor-data-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 company review rows

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Glassdoor Scraper — Reviews, Salaries, Jobs & Interviews 🏢

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Instagram AI Transcript](https://img.shields.io/badge/Store-Instagram%20AI%20Transcript-E4405F)](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian) [![TikTok AI Transcript](https://img.shields.io/badge/Store-TikTok%20AI%20Transcript-25F4EE)](https://apify.com/sian.agency/best-tiktok-ai-transcript-extractor?fpr=sian) [![Taobao & Tmall Scraper](https://img.shields.io/badge/Store-Taobao%20%26%20Tmall%20Scraper-FF4F00)](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian)

#### 🎉 The complete Glassdoor employer-intelligence bundle — reviews, salaries, interviews, jobs & company overviews in ONE actor
##### 9 operations, one clean dataset. Built for HR-tech, employer branding, recruiting intelligence and compensation benchmarking.

---

### 📋 Overview

**Most "Glassdoor scrapers" only pull job listings.** This one pulls the whole employer story — company reviews, salaries, interviews, jobs, and full company profiles — so you can benchmark employer brand, build compensation bands, and research hiring funnels from a single, query-ready dataset.

**Why teams choose this Glassdoor scraper:**
- ✅ **9 operations in one actor**: company search, overview, reviews, company jobs, salaries (role lookup), salaries (bulk), interviews, job search, and salary estimation — no stitching multiple tools together.
- ⚡ **Full curated interview data**: questions, difficulty, outcome, and process descriptions — a data set most Glassdoor scrapers simply don't expose.
- 🎯 **Dual salary engines**: a targeted single-role lookup *and* a bulk company-wide scan with base / cash-bonus / stock-bonus min, median, and max for every role.
- 💰 **Pay-per-result, no monthly wall**: pay only for the rows you scrape — no flat $32/mo subscription to evaluate or run small jobs.
- 💎 **Clean, query-ready rows**: curated camelCase fields (companyId, medianBaseSalary, reviewSummary, difficulty…) with the raw upstream fields spread alongside.
- ✨ **14 regional Glassdoor sites**: US, UK, Canada, Germany, France, India, Australia and more.

---

### ✨ Features

- 🔎 **Company Search** — find any employer by name or keyword and get the `companyId` that powers every other operation.
- 🏢 **Company Overview** — full employer profile: overall rating, sub-ratings (culture, work-life balance, diversity, senior management), CEO, size, HQ, revenue, and competitors.
- ⭐ **Company Reviews** — paginated employee reviews with pros, cons, star rating, employment status, and current-vs-former flag.
- 💼 **Company Jobs** — all jobs posted by a specific company (~40 per page) with salary ranges and sponsorship flags.
- 💵 **Company Salaries (role lookup)** — targeted compensation for a single role: base, additional pay, and total with confidence level.
- 📊 **Company Salaries (bulk)** — paginated comp across all roles at a company with base, cash-bonus, and stock-bonus breakdowns.
- 🗣️ **Company Interviews** — interview questions, difficulty, outcome, duration, and full process descriptions.
- 🔍 **Job Search** — search jobs across Glassdoor by query + location with remote, easy-apply, and min-rating filters.
- 📈 **Salary Estimation** — salary estimate for any role + location (no company required), by experience band.
- 🛡️ **Resilient by design** — automatic retries through Glassdoor's anti-bot layer so transient drops don't fail your run.

---

### 🎬 Quick Start

Pick **one operation per run**, set the required inputs, and run. Each run produces one clean dataset matching the chosen mode. Start with **Company Search** to discover a `companyId`, then drill into reviews, salaries, jobs, and interviews.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~glassdoor-data-scraper/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"operation": "companyReviews", "companyId": "1138", "maxPages": 3}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Find the company

Run **Company Search** with a query like `apple` — the result rows include a `companyId` (e.g. `1138`).

#### Step 2: Pick your operation

Choose what you want: reviews, salaries, interviews, jobs, or the full overview. Set `companyId` (and a `jobTitle` or `location` if the operation needs it).

#### Step 3: Run and export

Run the actor and export the dataset as JSON, CSV, or Excel.

**That's it! In under a minute, you'll have:**

- Clean, structured employer-intelligence rows
- Curated camelCase fields ready for analysis
- An HTML run summary in the key-value store

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| operation | string | Yes | One of: `companySearch`, `companyOverview`, `companyReviews`, `companyJobs`, `companySalaries`, `companySalariesV2`, `companyInterviews`, `jobSearch`, `salaryEstimation` |
| query | string | For search ops | Company name (Company Search) or job query (Job Search) |
| companyId | string | For company ops | Glassdoor company ID (e.g. `1138` for Apple) |
| jobTitle | string | For salary/role ops | Job title to look up compensation for |
| location | string | For Job Search & Salary Estimation | Free-form location (e.g. `New York`) |
| locationType | string | No | `ANY`, `CITY`, `STATE`, or `COUNTRY` |
| domain | string | No | Glassdoor regional site (default `www.glassdoor.com`) |
| reviewSort / jobSort / salarySort / interviewSort | string | No | Sort order per operation |
| maxPages | integer | No | Pages to fetch for paginated ops (default 5, max 50) |

**Example — Company Reviews:**

```json
{
  "operation": "companyReviews",
  "companyId": "1138",
  "reviewSort": "MOST_RECENT",
  "maxPages": 3
}
```

**Example — Bulk Salaries:**

```json
{
  "operation": "companySalariesV2",
  "companyId": "1138",
  "salarySort": "MOST_SALARIES",
  "maxPages": 5
}
```

***

### 📤 Output

Results are saved to the Apify dataset as flat, query-ready rows. Filter by `_operation` to split modes. Fields vary by operation; the most useful include:

| Field | Type | Description |
|-------|------|-------------|
| companyId | string | Glassdoor company ID |
| companyName | string | Employer name |
| rating | number | Overall Glassdoor rating |
| reviewSummary / pros / cons | string | Review headline + pros + cons |
| reviewRating | integer | Star rating of a review |
| employmentStatus | string | Reviewer status (REGULAR, INTERN, …) |
| medianSalary / medianBaseSalary | number | Median total pay / median base salary |
| medianCashBonus / medianStockBonus | number | Median cash + stock bonus (bulk salaries) |
| difficulty / outcome | string | Interview difficulty + outcome |
| questions | array | Interview questions |
| jobId / jobTitle / jobLink | string | Job listing identifiers + link |
| salaryMin / salaryMedian / salaryMax | number | Job salary range |

**Example — review row:**

```json
{
  "_operation": "companyReviews",
  "companyId": "1138",
  "companyName": "Apple",
  "reviewSummary": "Good place to work while in college",
  "pros": "Good culture toward employees",
  "cons": "Pay vs workload not competitive",
  "reviewRating": 3,
  "employmentStatus": "REGULAR",
  "isCurrentEmployee": false,
  "location": "Trumbull, CT",
  "reviewLink": "https://www.glassdoor.com/Reviews/Employee-Review--RVW104260276.htm",
  "status": "success"
}
```

***

### 💼 Use Cases & Examples

#### 1. Employer Branding Audit

**Employer-branding teams benchmarking their reputation against competitors.**

**Input:** Company Overview + Company Reviews for your company and 3 rivals.
**Output:** Overall and sub-ratings (culture, work-life balance, diversity, senior management) plus paginated reviews.
**Use:** Quantify your employer brand, track sentiment over time, and find the themes driving negative reviews.

#### 2. Compensation Benchmarking

**Comp & rewards teams building pay bands by role and location.**

**Input:** Company Salaries (bulk) for target companies + Salary Estimation for market context.
**Output:** Base, cash-bonus, and stock-bonus min/median/max per role.
**Use:** Calibrate offers, defend pay equity, and benchmark total comp against the market.

#### 3. Recruiting Intelligence

**Talent-acquisition analysts tracking competitor hiring.**

**Input:** Company Jobs + Job Search filtered by function, location, and recency.
**Output:** Open roles, salary ranges, sponsorship flags, and posting age.
**Use:** Spot competitor expansion, monitor hiring velocity, and map salary ranges in your segment.

#### 4. Interview Prep & Talent Research

**Career-coaching and L\&D teams building interview-prep content.**

**Input:** Company Interviews for target employers and roles.
**Output:** Interview questions, difficulty, outcome, and process descriptions.
**Use:** Build candidate-prep material, analyze offer rates, and understand hiring funnels.

#### 5. HR-Tech Data Enrichment

**Product teams enriching ATS, people-analytics, or voice-of-employee tools.**

**Input:** Any operation, one per run.
**Output:** Clean, structured, query-ready rows.
**Use:** Pipe employer reviews, ratings, and comp data straight into your product.

***

### 🔗 Integration Examples

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/glassdoor-data-scraper').call({
  operation: 'companyReviews',
  companyId: '1138',
  maxPages: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/glassdoor-data-scraper').call(
    run_input={'operation': 'companySalariesV2', 'companyId': '1138', 'maxPages': 5}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~glassdoor-data-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"operation": "companyInterviews", "companyId": "1138", "maxPages": 2}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule (e.g. weekly comp refresh) or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON dataset
4. **Action**: Save to your warehouse, notify, or transform

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- Full feature access across all 9 operations — same data quality
- No credit card required
- Perfect for evaluation and small projects

#### PAID Tier (Production Ready)

- Scale to thousands of rows per run
- Pay-per-result: only charged for successful rows

💰 **Transparent, per-operation pricing** — cheap high-volume bulk ops (reviews, salaries, interviews, jobs) and fair pricing for premium single-row company intelligence. No flat monthly subscription wall.

🔗 [View current pricing](https://apify.com/sian.agency/glassdoor-data-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How do I get a company's `companyId`?**
A: Run the **Company Search** operation first — every result row includes a `companyId`. It also appears in Glassdoor overview URLs (`.../EI_IE1138...` → `1138`).

**Q: What's the difference between the two salary operations?**
A: **Company Salaries (role lookup)** returns comp for ONE role at a company. **Company Salaries (bulk)** paginates across ALL roles with base, cash-bonus, and stock-bonus breakdowns.

**Q: Can I scrape interview data?**
A: Yes — the **Company Interviews** operation returns questions, difficulty, outcome, duration, and process descriptions.

**Q: Which regions are supported?**
A: 14 Glassdoor regional sites including US, UK, Canada, Germany, France, India, Australia, Singapore, and more — set via the `domain` field.

**Q: What output formats are available?**
A: JSON, CSV, and Excel — export directly from the Apify dataset.

**Q: Is this legal?**
A: We only extract publicly available data. See the legal section below.

**Q: Why did a page occasionally return an error row?**
A: Glassdoor sits behind anti-bot protection that can drop a connection. The actor automatically retries; persistent drops are saved as an `error` row so your run never silently fails.

***

### 🐛 Troubleshooting

**"Missing required input" error**

- Each operation needs specific inputs: Company Search needs `query`; company ops need `companyId`; Salary Estimation needs `jobTitle` + `location`. Check the input hints.

**A page returned an `error` row**

- Usually a transient anti-bot drop. Re-run the operation; the actor already retries internally.

**Empty results for Company Jobs / Salaries**

- Some companies have no current postings or insufficient salary samples. Try a larger employer or remove location filters.

**Pagination stopped early**

- The data source reported the last page. This is expected when there are fewer results than `maxPages`.

***

### ⚠️ Trademark Disclaimer

"Glassdoor" and the Glassdoor logo are trademarks of Glassdoor, Inc. This actor is an **independent tool** and is **not affiliated with, endorsed by, sponsored by, or in any way officially connected to Glassdoor, Inc.** All product and company names are the property of their respective owners. This actor accesses publicly available data and is provided for legitimate research, analytics, and business-intelligence purposes only.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what users have chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's Issues tab
- Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `operation` (type: `string`):

🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.

- **🔎 Company Search** — find employers by name/keyword (returns the `companyId` you need for the others)
- **🏢 Company Overview** — full company profile: ratings, sub-ratings, CEO, size, HQ, competitors
- **⭐ Company Reviews** — paginated employee reviews (pros, cons, rating, employment status)
- **💼 Company Jobs** — jobs posted by a specific company (~40/page)
- **💵 Company Salaries (role lookup)** — targeted comp for ONE role at a company (base / bonus / additional pay)
- **📊 Company Salaries (bulk)** — paginated comp across ALL roles at a company (base / cash bonus / stock bonus)
- **🗣️ Company Interviews** — interview questions, difficulty, outcome and process
- **🔍 Job Search** — search jobs across Glassdoor by query + location
- **📈 Salary Estimation** — salary estimate for a role + location (no company needed)

💡 **TIP:** Run **Company Search** first to discover a `companyId`, then drill into Overview, Reviews, Salaries, Jobs, and Interviews per company.

## `query` (type: `string`):

🔎 **Required for `Company Search` and `Job Search`.**

- For **Company Search**: an employer name or keyword (e.g. `apple`, `goldman sachs`, `stripe`).
- For **Job Search**: a job query (e.g. `software engineer`, `product manager`).

⚠️ **Ignored** for the company-detail operations.

## `companyId` (type: `string`):

🏢 **Required for Overview, Reviews, Jobs, Salaries (both), and Interviews.**

The Glassdoor company (employer) ID — a number like `1138` (Apple).

💡 **How to get it:** run **Company Search** first — the `companyId` field is returned for every result. It also appears in Glassdoor overview URLs: `.../Overview/Working-at-Apple-EI_IE1138...` → `1138`.

⚠️ **Ignored** for Company Search, Job Search, and Salary Estimation.

## `jobTitle` (type: `string`):

💵 **Required for `Company Salaries (role lookup)` and `Salary Estimation`.** Optional for `Company Salaries (bulk)` and `Company Interviews` to filter by role.

A job title to look up compensation for (e.g. `Software Engineer`, `Product Manager`, `Data Scientist`).

⚠️ Ignored for Search, Overview, Reviews, and Company Jobs.

## `location` (type: `string`):

📍 **Required for `Job Search` and `Salary Estimation`.** Optional for Company Jobs / Salaries / Interviews to localize results.

A free-form location (e.g. `New York`, `San Francisco, CA`, `London`). Pair with **Location Type** below to scope to city / state / country.

⚠️ Ignored for Company Search and Overview.

## `locationType` (type: `string`):

How to interpret the **Location** value. `ANY` (default), `CITY`, `STATE`, or `COUNTRY`. Applies to Job Search, Salary Estimation, and the optional location filters on Company Jobs / Salaries / Interviews.

## `domain` (type: `string`):

🌍 Which Glassdoor regional site to query. Defaults to `www.glassdoor.com` (US). Localizes employer data, salaries, and jobs.

## `limit` (type: `integer`):

Optional. Number of results to return for `Company Search` (1–100, default 10) and per-call for `Job Search` (default 10). Ignored for other operations.

## `reviewSort` (type: `string`):

Sort order for `Company Reviews`. `POPULAR` (default), `MOST_RECENT`, `HIGHEST_RATING`, `LOWEST_RATING`. Ignored for other operations.

## `reviewLanguage` (type: `string`):

Optional. For `Company Reviews` — restrict reviews to a language. Default `en`.

## `employmentStatuses` (type: `string`):

Optional. For `Company Reviews` — filter by reviewer's employment status. `REGULAR`, `INTERN`, `PART_TIME`, `CONTRACT`, or `FREELANCE`. Leave blank for all.

## `onlyCurrentEmployees` (type: `boolean`):

Optional. For `Company Reviews` — only return reviews from current employees.

## `extendedRatingData` (type: `boolean`):

Optional. For `Company Reviews` — include extended rating breakdown data in the response.

## `jobSort` (type: `string`):

Sort order for `Company Jobs`. `MOST_RELEVANT` (default) or `MOST_RECENT`. Ignored for other operations.

## `jobFunction` (type: `string`):

Optional. For `Company Jobs` and `Company Interviews` — filter by job function (e.g. `ENGINEERING`, `BUSINESS`, `CONSULTING`). Default `ANY`.

## `maxAgeDays` (type: `integer`):

Optional. For `Company Jobs` — only return jobs posted within this many days. `0` = no limit (default).

## `salarySort` (type: `string`):

Sort order for `Company Salaries (bulk)`. `MOST_SALARIES` (default), `HIGH_TO_LOW`, `MOST_RECENT`. Ignored for other operations.

## `yearsOfExperience` (type: `string`):

Optional. For `Company Salaries (role lookup)` and `Salary Estimation` — scope the estimate by experience band. Default `ALL`.

## `interviewSort` (type: `string`):

Sort order for `Company Interviews`. `POPULAR` (default), `MOST_RECENT`, `OLDEST`, `EASIEST`, `MOST_DIFFICULT`. Ignored for other operations.

## `pageSize` (type: `integer`):

Optional. For `Company Interviews` — number of interviews per page (default 10).

## `receivedOfferOnly` (type: `boolean`):

Optional. For `Company Interviews` — only return interviews where the candidate received an offer.

## `easyApplyOnly` (type: `boolean`):

Optional. For `Job Search` — only return jobs with Easy Apply enabled.

## `remoteOnly` (type: `boolean`):

Optional. For `Job Search` — only return remote jobs.

## `minCompanyRating` (type: `string`):

Optional. For `Job Search` — only return jobs from companies with at least this Glassdoor rating (e.g. `4`). Leave blank for no filter.

## `reviewQuery` (type: `string`):

Optional. For `Company Reviews` — keyword to filter review text. Leave blank for no filter.

## `maxPages` (type: `integer`):

📄 **Applies to paginated operations** (Reviews, Company Jobs, Salaries bulk, Interviews, Job Search). Ignored for single-record operations (Company Search, Overview, Salaries role lookup, Salary Estimation).

- Reviews / Salaries (bulk) / Interviews: ~10 rows per page
- Company Jobs: ~40 jobs per page
- Job Search: ~10 jobs per page (cursor-paginated)

💡 **TIP:** Start small (1–3 pages) to preview before scaling. Pagination stops automatically at the last page.

⚠️ Hard cap: 50 pages to prevent runaway runs.

## Actor input object example

```json
{
  "operation": "companySearch",
  "query": "apple",
  "companyId": "1138",
  "jobTitle": "Software Engineer",
  "location": "New York",
  "locationType": "ANY",
  "domain": "www.glassdoor.com",
  "limit": 10,
  "reviewSort": "POPULAR",
  "reviewLanguage": "en",
  "employmentStatuses": "",
  "onlyCurrentEmployees": false,
  "extendedRatingData": false,
  "jobSort": "MOST_RELEVANT",
  "jobFunction": "ANY",
  "maxAgeDays": 0,
  "salarySort": "MOST_SALARIES",
  "yearsOfExperience": "ALL",
  "interviewSort": "POPULAR",
  "pageSize": 10,
  "receivedOfferOnly": false,
  "easyApplyOnly": false,
  "remoteOnly": false,
  "minCompanyRating": "4",
  "reviewQuery": "",
  "maxPages": 5
}
```

# Actor output Schema

## `output` (type: `string`):

Per-row results — one flat row per upstream item with curated camelCase aliases (companyId, companyName, rating, reviewSummary, pros, cons, medianSalary, medianBaseSalary, difficulty, outcome, jobTitle, jobLink, …) plus the raw upstream fields spread alongside.

## `report` (type: `string`):

HTML report with run status, success/error row counts, success rate, pages fetched, duration, and the inputs used — written even on fatal crash.

# 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 = {
    "query": "apple",
    "companyId": "1138",
    "jobTitle": "Software Engineer",
    "location": "New York"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/glassdoor-data-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 = {
    "query": "apple",
    "companyId": "1138",
    "jobTitle": "Software Engineer",
    "location": "New York",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/glassdoor-data-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "query": "apple",
  "companyId": "1138",
  "jobTitle": "Software Engineer",
  "location": "New York"
}' |
apify call sian.agency/glassdoor-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/glassdoor-data-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Glassdoor Scraper — Reviews, Salaries, Jobs & Interviews",
        "description": "Scrape Glassdoor at scale: company search, overview, reviews, salaries, interviews, jobs & salary estimates. 9 operations, one clean JSON dataset. Built for HR-tech, employer branding, recruiting intel and compensation benchmarking. The complete employer-intelligence bundle.",
        "version": "1.0",
        "x-build-id": "EG0fzVKApZb7bUjUf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~glassdoor-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-glassdoor-data-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/sian.agency~glassdoor-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-glassdoor-data-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/sian.agency~glassdoor-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-glassdoor-data-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": [
                    "operation"
                ],
                "properties": {
                    "operation": {
                        "title": "🎯 Operation — what do you want to scrape?",
                        "enum": [
                            "companySearch",
                            "companyOverview",
                            "companyReviews",
                            "companyJobs",
                            "companySalaries",
                            "companySalariesV2",
                            "companyInterviews",
                            "jobSearch",
                            "salaryEstimation"
                        ],
                        "type": "string",
                        "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **🔎 Company Search** — find employers by name/keyword (returns the `companyId` you need for the others)\n- **🏢 Company Overview** — full company profile: ratings, sub-ratings, CEO, size, HQ, competitors\n- **⭐ Company Reviews** — paginated employee reviews (pros, cons, rating, employment status)\n- **💼 Company Jobs** — jobs posted by a specific company (~40/page)\n- **💵 Company Salaries (role lookup)** — targeted comp for ONE role at a company (base / bonus / additional pay)\n- **📊 Company Salaries (bulk)** — paginated comp across ALL roles at a company (base / cash bonus / stock bonus)\n- **🗣️ Company Interviews** — interview questions, difficulty, outcome and process\n- **🔍 Job Search** — search jobs across Glassdoor by query + location\n- **📈 Salary Estimation** — salary estimate for a role + location (no company needed)\n\n💡 **TIP:** Run **Company Search** first to discover a `companyId`, then drill into Overview, Reviews, Salaries, Jobs, and Interviews per company.",
                        "default": "companySearch"
                    },
                    "query": {
                        "title": "🔎 Search Query",
                        "type": "string",
                        "description": "🔎 **Required for `Company Search` and `Job Search`.**\n\n- For **Company Search**: an employer name or keyword (e.g. `apple`, `goldman sachs`, `stripe`).\n- For **Job Search**: a job query (e.g. `software engineer`, `product manager`).\n\n⚠️ **Ignored** for the company-detail operations."
                    },
                    "companyId": {
                        "title": "🏢 Company ID",
                        "type": "string",
                        "description": "🏢 **Required for Overview, Reviews, Jobs, Salaries (both), and Interviews.**\n\nThe Glassdoor company (employer) ID — a number like `1138` (Apple).\n\n💡 **How to get it:** run **Company Search** first — the `companyId` field is returned for every result. It also appears in Glassdoor overview URLs: `.../Overview/Working-at-Apple-EI_IE1138...` → `1138`.\n\n⚠️ **Ignored** for Company Search, Job Search, and Salary Estimation."
                    },
                    "jobTitle": {
                        "title": "💵 Job Title",
                        "type": "string",
                        "description": "💵 **Required for `Company Salaries (role lookup)` and `Salary Estimation`.** Optional for `Company Salaries (bulk)` and `Company Interviews` to filter by role.\n\nA job title to look up compensation for (e.g. `Software Engineer`, `Product Manager`, `Data Scientist`).\n\n⚠️ Ignored for Search, Overview, Reviews, and Company Jobs."
                    },
                    "location": {
                        "title": "📍 Location",
                        "type": "string",
                        "description": "📍 **Required for `Job Search` and `Salary Estimation`.** Optional for Company Jobs / Salaries / Interviews to localize results.\n\nA free-form location (e.g. `New York`, `San Francisco, CA`, `London`). Pair with **Location Type** below to scope to city / state / country.\n\n⚠️ Ignored for Company Search and Overview."
                    },
                    "locationType": {
                        "title": "🌐 Location Type",
                        "enum": [
                            "ANY",
                            "CITY",
                            "STATE",
                            "COUNTRY"
                        ],
                        "type": "string",
                        "description": "How to interpret the **Location** value. `ANY` (default), `CITY`, `STATE`, or `COUNTRY`. Applies to Job Search, Salary Estimation, and the optional location filters on Company Jobs / Salaries / Interviews.",
                        "default": "ANY"
                    },
                    "domain": {
                        "title": "🌍 Glassdoor Domain",
                        "enum": [
                            "www.glassdoor.com",
                            "www.glassdoor.co.uk",
                            "www.glassdoor.ca",
                            "www.glassdoor.com.au",
                            "www.glassdoor.de",
                            "www.glassdoor.fr",
                            "www.glassdoor.es",
                            "www.glassdoor.it",
                            "www.glassdoor.nl",
                            "www.glassdoor.ie",
                            "www.glassdoor.co.in",
                            "www.glassdoor.com.br",
                            "www.glassdoor.com.mx",
                            "www.glassdoor.sg"
                        ],
                        "type": "string",
                        "description": "🌍 Which Glassdoor regional site to query. Defaults to `www.glassdoor.com` (US). Localizes employer data, salaries, and jobs.",
                        "default": "www.glassdoor.com"
                    },
                    "limit": {
                        "title": "🔢 Results limit (Company / Job Search)",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Optional. Number of results to return for `Company Search` (1–100, default 10) and per-call for `Job Search` (default 10). Ignored for other operations.",
                        "default": 10
                    },
                    "reviewSort": {
                        "title": "↕️ Review Sort Order",
                        "enum": [
                            "POPULAR",
                            "MOST_RECENT",
                            "HIGHEST_RATING",
                            "LOWEST_RATING"
                        ],
                        "type": "string",
                        "description": "Sort order for `Company Reviews`. `POPULAR` (default), `MOST_RECENT`, `HIGHEST_RATING`, `LOWEST_RATING`. Ignored for other operations.",
                        "default": "POPULAR"
                    },
                    "reviewLanguage": {
                        "title": "🗣️ Review Language",
                        "enum": [
                            "en",
                            "fr",
                            "nl",
                            "de",
                            "pt",
                            "es",
                            "it"
                        ],
                        "type": "string",
                        "description": "Optional. For `Company Reviews` — restrict reviews to a language. Default `en`.",
                        "default": "en"
                    },
                    "employmentStatuses": {
                        "title": "👔 Employment Status (Reviews)",
                        "enum": [
                            "",
                            "REGULAR",
                            "INTERN",
                            "PART_TIME",
                            "CONTRACT",
                            "FREELANCE"
                        ],
                        "type": "string",
                        "description": "Optional. For `Company Reviews` — filter by reviewer's employment status. `REGULAR`, `INTERN`, `PART_TIME`, `CONTRACT`, or `FREELANCE`. Leave blank for all.",
                        "default": ""
                    },
                    "onlyCurrentEmployees": {
                        "title": "✅ Only Current Employees (Reviews)",
                        "type": "boolean",
                        "description": "Optional. For `Company Reviews` — only return reviews from current employees.",
                        "default": false
                    },
                    "extendedRatingData": {
                        "title": "📊 Extended Rating Data (Reviews)",
                        "type": "boolean",
                        "description": "Optional. For `Company Reviews` — include extended rating breakdown data in the response.",
                        "default": false
                    },
                    "jobSort": {
                        "title": "↕️ Company-Jobs Sort Order",
                        "enum": [
                            "MOST_RELEVANT",
                            "MOST_RECENT"
                        ],
                        "type": "string",
                        "description": "Sort order for `Company Jobs`. `MOST_RELEVANT` (default) or `MOST_RECENT`. Ignored for other operations.",
                        "default": "MOST_RELEVANT"
                    },
                    "jobFunction": {
                        "title": "🧩 Job Function Filter",
                        "enum": [
                            "ANY",
                            "ADMINISTRATIVE",
                            "ARTS_AND_DESIGN",
                            "BUSINESS",
                            "CONSULTING",
                            "CUSTOMER_SERVICES_AND_SUPPORT",
                            "EDUCATION",
                            "ENGINEERING",
                            "FINANCE_AND_ACCOUNTING",
                            "HEALTHCARE",
                            "HUMAN_RESOURCES",
                            "INFORMATION_TECHNOLOGY",
                            "LEGAL",
                            "MARKETING",
                            "MILITARY_AND_PROTECTIVE_SERVICES",
                            "OPERATIONS",
                            "PRODUCT_AND_PROJECT_MANAGEMENT",
                            "RESEARCH_AND_SCIENCE",
                            "RETAIL_AND_FOOD_SERVICES",
                            "SALES",
                            "SKILLED_LABOR_AND_MANUFACTURING",
                            "TRANSPORTATION"
                        ],
                        "type": "string",
                        "description": "Optional. For `Company Jobs` and `Company Interviews` — filter by job function (e.g. `ENGINEERING`, `BUSINESS`, `CONSULTING`). Default `ANY`.",
                        "default": "ANY"
                    },
                    "maxAgeDays": {
                        "title": "📅 Max Job Age (days)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional. For `Company Jobs` — only return jobs posted within this many days. `0` = no limit (default).",
                        "default": 0
                    },
                    "salarySort": {
                        "title": "↕️ Salaries (bulk) Sort Order",
                        "enum": [
                            "MOST_SALARIES",
                            "HIGH_TO_LOW",
                            "MOST_RECENT"
                        ],
                        "type": "string",
                        "description": "Sort order for `Company Salaries (bulk)`. `MOST_SALARIES` (default), `HIGH_TO_LOW`, `MOST_RECENT`. Ignored for other operations.",
                        "default": "MOST_SALARIES"
                    },
                    "yearsOfExperience": {
                        "title": "📈 Years of Experience",
                        "enum": [
                            "ALL",
                            "LESS_THAN_ONE",
                            "ONE_TO_THREE",
                            "FOUR_TO_SIX",
                            "SEVEN_TO_NINE",
                            "TEN_TO_FOURTEEN",
                            "ABOVE_FIFTEEN"
                        ],
                        "type": "string",
                        "description": "Optional. For `Company Salaries (role lookup)` and `Salary Estimation` — scope the estimate by experience band. Default `ALL`.",
                        "default": "ALL"
                    },
                    "interviewSort": {
                        "title": "↕️ Interview Sort Order",
                        "enum": [
                            "POPULAR",
                            "MOST_RECENT",
                            "OLDEST",
                            "EASIEST",
                            "MOST_DIFFICULT"
                        ],
                        "type": "string",
                        "description": "Sort order for `Company Interviews`. `POPULAR` (default), `MOST_RECENT`, `OLDEST`, `EASIEST`, `MOST_DIFFICULT`. Ignored for other operations.",
                        "default": "POPULAR"
                    },
                    "pageSize": {
                        "title": "🔢 Interviews per page",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Optional. For `Company Interviews` — number of interviews per page (default 10).",
                        "default": 10
                    },
                    "receivedOfferOnly": {
                        "title": "🎁 Received Offer Only (Interviews)",
                        "type": "boolean",
                        "description": "Optional. For `Company Interviews` — only return interviews where the candidate received an offer.",
                        "default": false
                    },
                    "easyApplyOnly": {
                        "title": "⚡ Easy Apply Only (Job Search)",
                        "type": "boolean",
                        "description": "Optional. For `Job Search` — only return jobs with Easy Apply enabled.",
                        "default": false
                    },
                    "remoteOnly": {
                        "title": "🏠 Remote Only (Job Search)",
                        "type": "boolean",
                        "description": "Optional. For `Job Search` — only return remote jobs.",
                        "default": false
                    },
                    "minCompanyRating": {
                        "title": "⭐ Min Company Rating (Job Search)",
                        "type": "string",
                        "description": "Optional. For `Job Search` — only return jobs from companies with at least this Glassdoor rating (e.g. `4`). Leave blank for no filter.",
                        "default": ""
                    },
                    "reviewQuery": {
                        "title": "🔍 Keyword filter (Reviews)",
                        "type": "string",
                        "description": "Optional. For `Company Reviews` — keyword to filter review text. Leave blank for no filter.",
                        "default": ""
                    },
                    "maxPages": {
                        "title": "📄 Max pages to fetch",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "📄 **Applies to paginated operations** (Reviews, Company Jobs, Salaries bulk, Interviews, Job Search). Ignored for single-record operations (Company Search, Overview, Salaries role lookup, Salary Estimation).\n\n- Reviews / Salaries (bulk) / Interviews: ~10 rows per page\n- Company Jobs: ~40 jobs per page\n- Job Search: ~10 jobs per page (cursor-paginated)\n\n💡 **TIP:** Start small (1–3 pages) to preview before scaling. Pagination stops automatically at the last page.\n\n⚠️ Hard cap: 50 pages to prevent runaway runs.",
                        "default": 5
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
