How to scrape Glassdoor - reviews and salary data with Python and proxies - DataImpulse

For Glassdoor collection covered by express written permission, this Python glassdoor scraper template uses Playwright to inspect review pages, extract selected text fields, and follow up to two pages. It requires page-specific selectors; salary extraction is not implemented.

The workflow below uses a Playwright example with selectors you verify against the page. It stops when access or extraction cannot be validated; it does not promise access through login walls or challenges.


Key Facts

  • A successful collection means validated records, not merely an HTTP 200 response.
  • Logged-out visibility does not establish permission to automate collection.
  • A login wall means the requested content is unavailable in that session.
  • Salary comparisons need matching currency, location, pay period, and compensation type.
  • The Python example limits collection to two pages per run.

Glassdoor scraper: scope and quick answer

The Glassdoor Access framework is a four-part routine: check access rules, request the public page through a residential IP, parse the review fields, then pace and store.

A glassdoor scraper turns accessible page content into structured records through navigation, validation, extraction, and export. Keep review records separate from company ratings and aggregate salary observations.

Before extraction, confirm that the page shows the intended company’s review cards. After extraction, compare the rating, title, date, and retained text with those cards.

For reviews, select only the rating, title, review date, and necessary pros or cons text. For salaries, retain aggregate figures and their labels. Exclude reviewer names, profile links, and unnecessary employment details; inspect retained text for identifying information.

Glassdoor’s Terms of Use prohibit automated scraping without its express written permission. Confirm that your permission covers the intended collection before running this workflow; robots.txt does not grant authorization. Consult our web scraping legal guide for additional context.

How a Glassdoor scraper collects data in 4 steps


Which Glassdoor API and third-party scraper options should you consider?

Prefer authorized official Glassdoor API access where it is available for your intended use. A third-party service labeled a Glassdoor API is not automatically an official Glassdoor integration.

Glassdoor hosts an API Terms document describing reviews, salaries, and other content, but it does not establish current enrollment or endpoint availability. The API help page returned a CSS error on November 10, 2026. Confirm current access, supported datasets, and permitted uses directly with Glassdoor.

Option Documented scope Selection check
Bright Data Glassdoor scrapers The official page lists company overview, reviews, and job-listing scrapers. Review the specific output schema. The Glassdoor Reviews documentation and pricing lists pay-as-you-go pricing of $1.50 per 1,000 records (as of November 2026). Do not infer aggregate salary coverage from review or job fields.
Apify platform Actors accept JSON input and can run through an API, according to Apify’s Actor documentation. No specific Glassdoor Actor was evaluated for this article; Glassdoor coverage and pricing are not compared.

Competitor data: taken from each provider’s official pricing and documentation pages linked in this article, collected on November 10, 2026.

Choose an official API if your agreement covers the required fields, a managed scraper if its documented schema fits, or local Playwright automation if you can maintain selectors and validate the output.

For hiring datasets, define job-posting fields separately using our job-posting collection guide.


Step 1 – Set up Python and Playwright

Install Playwright and Chromium, then record your dependency versions before collection. The following is an example, not a verified Glassdoor integration.

These installation commands follow the official Playwright Python setup documentation:

python -m pip install playwright
python -m playwright install chromium
python --version
python -m pip show playwright

Use the Python blocks in Steps 2, 3, and 6 together, in order. They require a permitted company review URL, a company identifier, and CSS selectors checked against that page. The code deliberately contains no assumed Glassdoor class names, internal endpoints, or embedded application-state keys.

Before running it, inspect one accessible page. Identify the review-card container, field selectors relative to each card, and the next-page link. Confirm that a rating selector matches the review’s overall rating rather than a category rating. Mark optional fields with a blank selector if they are unavailable.


Step 2 – Load and validate an accessible page

Validate the requested content after navigation, even when the response is HTTP 200. This example uses a visible browser and a manual page check before extraction.

The helper below applies a navigation timeout, rejects unsuccessful responses, and requires confirmation that the intended company reviews are visible without a login wall or challenge. Its navigation calls follow the Playwright Page API.

Before answering yes, confirm that the review list has finished loading and is no longer changing. Waiting for the first card does not establish that all cards are ready; unattended collection needs a page-specific completion check before calling cards.all().

import csv
import io
import json
from datetime import datetime, timezone
from urllib.parse import urljoin, urlsplit
from playwright.sync_api import sync_playwright


def validate_page(page, url):
    response = page.goto(url, wait_until="domcontentloaded", timeout=30000)
    if response is None or not response.ok:
        raise RuntimeError("Stop: unsuccessful navigation")
    answer = input("Correct company reviews visible, no access wall? [yes/no] ")
    if answer.strip().lower() != "yes":
        raise RuntimeError("Stop: page content is not validated")

This manual gate is intentional: the example has no verified automatic classifier for Glassdoor login or challenge pages. Do not approve a page simply because its header or company name appears. Confirm that the review cards themselves are accessible and fully rendered.

For unattended operation, first validate a page classifier against permitted examples of data pages, empty results, login pages, and challenges. Keep those outcomes separate instead of treating every empty extraction as a selector failure.


Step 3 – Extract and paginate reviews with the Glassdoor scraper

Extract fields from verified review cards, remove duplicate records, and follow only the observed next-page link. The example stops after two pages, on empty extraction, or when a page contributes no new records.

Enter selectors confirmed in the browser; markup can change. The extraction uses documented Playwright Locator methods. A blank selector, no matching element, or empty field text becomes null. Multiple matches or a hidden field stop extraction, while a missing rating or title rejects the card.

The code accepts records with nonempty rating and title text. It does not validate rating values or field meaning; compare extracted records with their source cards before treating them as validated data.

company = input("Company identifier: ").strip()
url = input("Permitted review URL: ").strip()
card_css = input("Verified review-card CSS selector: ").strip()
fields = ("rating", "title", "date", "pros", "cons")
selectors = {name: input(f"Relative CSS for {name}: ").strip()
             for name in fields}
next_css = input("Verified next-link CSS, or blank: ").strip()
if not company or not card_css or not all(selectors[k] for k in fields[:2]):
    raise ValueError("Company, card, rating, and title selectors are required")


def extract_cards(page):
    cards = page.locator(card_css)
    cards.first.wait_for(state="visible", timeout=10000)
    result = []
    for card in cards.all():
        row = {}
        for name, selector in selectors.items():
            if not selector:
                row[name] = None
                continue

            field = card.locator(selector)
            count = field.count()
            if count == 0:
                row[name] = None
            elif count != 1 or not field.is_visible():
                raise RuntimeError(f"Stop: ambiguous or hidden field: {name}")
            else:
                row[name] = field.inner_text().strip() or None
        if row["rating"] and row["title"]:
            result.append(row)
    return result

Continue with the bounded navigation loop:

rows, seen, visited = [], set(), set()
origin = urlsplit(url).netloc
with sync_playwright() as p:
    browser = p.chromium.launch(headless=False)
    try:
        page = browser.new_page()
        for page_number in range(2):
            if url in visited or urlsplit(url).netloc != origin:
                break
            visited.add(url)
            validate_page(page, url)
            batch = extract_cards(page)
            if not batch:
                raise RuntimeError("Stop: no valid review cards")
            added = 0
            for row in batch:
                key = json.dumps([company, row], sort_keys=True)
                if key in seen:
                    continue
                seen.add(key)
                rows.append(dict(row, company=company, source_url=page.url,
                    collected_at=datetime.now(timezone.utc).isoformat()))
                added += 1
            if not added or not next_css or page_number == 1:
                break
            link = page.locator(next_css)
            if link.count() != 1 or not link.is_visible():
                break
            href = link.get_attribute("href")
            if not href or link.get_attribute("aria-disabled") == "true":
                break
            url = urljoin(page.url, href)
    finally:
        browser.close()

This pagination example requires an actual next-page link with an href. If the interface uses a button instead, stop and adapt the navigation after inspecting its behavior; do not invent page-number URLs.

The duplicate key uses company identity and extracted content. It can merge distinct reviews with identical text and miss edited duplicates. Prefer a verified stable review identifier when one is visible and appropriate to retain. Inspect sample records against the page before accepting the run.


Step 4 – Collect comparable salary data

Collect aggregate salary observations separately from reviews, preserving the context needed to compare them. Do not treat missing compensation fields as zero or assume every salary figure represents annual base pay.

Field What to retain
Company and role The displayed employer and role, including seniority when visible
Location and currency The displayed geographic scope and explicit currency label
Pay period Hourly, monthly, annual, or unknown
Compensation type Base pay, additional pay, total compensation, or unknown
Statistic The stated median, average, or range, without relabeling it
Sample size The displayed count, otherwise null
Provenance Source URL, collection timestamp, and displayed reporting period

Apply the same page-validation gate and use salary-specific selectors checked against visible labels. The review extraction example does not extract salary records. Preserve the original text alongside any parsed numeric value so normalization can be audited.

Salary comparison answer: Compare observations only after matching location, currency, pay period, role scope, and compensation type. An annual total-compensation range and an hourly base-pay figure are different measures; converting one requires explicit assumptions.

Keep advertised job compensation separate from employee-reported aggregates. Our Indeed scraper guide covers a related job-listing workflow.


Step 5 – Handle throttling, blocks and proxy sessions

Use timeouts and a bounded retry policy for transient failures, but stop on login requirements, access denials, or challenges. A proxy changes network routing; it cannot establish permission or guarantee access.

  • Timeout: record the failed attempt. For a later production implementation, allow at most two retries with increasing delays, such as 2 and 4 seconds.
  • HTTP 429 or 503: inspect Retry-After. If the requested wait exceeds the run’s time budget, end the run instead of retrying early.
  • HTTP 401, HTTP 403, login wall, or challenge: stop and review access. Do not rotate addresses in a retry loop to continue.
  • HTTP 200 with no valid records: classify the page before changing selectors or retrying.

For an authorized HTTP endpoint, Requests documents connect and read timeouts, and urllib3 documents Retry, including total retry bounds, backoff_factor, and respect_retry_after_header. These settings do not configure Playwright browser navigation. The browser example above stops on navigation failure and performs no automatic retries.

Proxy choice answer: DataImpulse is our product. Its residential proxies start at $1 per GB on pay-as-you-go billing, with country targeting included and sticky sessions available.

For an authorized workflow that needs a country-specific route, select the country and keep a sticky session through the page sequence. Proxies are optional infrastructure, not a prerequisite for the Python example. There is no basis here to claim that datacenter addresses necessarily fail or that rotation prevents blocks.

Use our proxy selection guide to assess routing requirements separately from extraction and validation.


Step 6 – Export your data

Export only records that pass field checks and data-minimization review. Keep collection timestamps and source URLs so a record can be traced to its observation.

This continuation creates JSON and CSV text, prints the JSON, and saves the CSV to a file, using the documented Python json module and csv module. Review and redact identifying details in retained text before running it.

if not rows:
    raise RuntimeError("Nothing validated for export")
json_text = json.dumps(rows, ensure_ascii=False, indent=2)
buffer = io.StringIO(newline="")
writer = csv.DictWriter(buffer, fieldnames=list(rows[0]))
writer.writeheader()
writer.writerows(rows)
csv_text = buffer.getvalue()
print(json_text)
with open("reviews.csv", "w", encoding="utf-8", newline="") as output:
    output.write(csv_text)

This saves the canonical CSV to reviews.csv. Apply a spreadsheet-specific formula-injection policy before opening it in spreadsheet software.

JSON preserves null values; a blank CSV cell needs a documented missing-value convention. Before opening review text in spreadsheet software, apply a formula-injection policy for cells beginning with formula-triggering characters. Keep any spreadsheet-safe transformation separate from the canonical dataset.


Validation status and run log

For each permitted run, record the date, dependency versions, selectors, attempted URLs, access outcomes, accepted records, and duplicate removals. No Glassdoor performance results are available.


Frequently Asked Questions

Can I scrape Glassdoor reviews without logging in?

Only attempt collection where you have authorization and the required review fields are accessible in the current session. If access requires signing in, this example stops. Being logged out does not settle whether automated collection is permitted.

Does a Glassdoor review bypass guarantee access?

No. A successful HTTP response can still contain a login page, challenge, or incomplete content. Validate actual review records before accepting a page as successful.

Is there an official Glassdoor API for reviews and salaries?

Glassdoor hosts an API Terms document describing reviews, salaries, and other content, but it does not establish current enrollment or endpoint availability. The API help page returned a CSS error on November 10, 2026. Confirm current access, supported datasets, and permitted uses directly with Glassdoor.

Why use a browser instead of a simple HTTP request?

Choose the collection method based on whether the authorized response contains the required data. This tutorial uses a visible browser so the operator can inspect the rendered page before extraction. Browser automation alone does not resolve an access restriction.

Do I need residential proxies to scrape Glassdoor?

They are not mandatory for the example. Consider proxy routing when an authorized project has a specific geographic or session requirement. A proxy does not guarantee that reviews will be accessible.

Can I collect reviewer names or individual salary details?

This workflow excludes reviewer identities and individual salary records. Keep only the review fields necessary for the analysis and aggregate salary observations. Review free-text fields for identifying details before export.

What should I do when the scraper returns zero reviews?

Check whether the page is a login wall, challenge, genuine empty result, or changed layout. Inspect the rendered page and verify selectors before another attempt. Record the outcome as unknown or failed collection unless an empty result is confirmed.


Add proxy routing when your authorized workflow needs it

If country targeting and session continuity fit your project, consider DataImpulse residential proxies. Keep access validation, extraction, and retry limits in your application, and evaluate a small permitted sample before expanding collection.

Last updated: November 10, 2026.