# LeetCode Interview Questions Scraper (`solidcode/leetcode-interview-questions-scraper`) Actor

\[💰 $4 / 1K] Extract LeetCode interview experience posts by company — post title, full candidate write-up, role and level tags, upvotes, views, comment counts, author, and publish date. Search multiple companies and filter by date. Great for interview prep and hiring research.

- **URL**: https://apify.com/solidcode/leetcode-interview-questions-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** Jobs, Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 results

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## LeetCode Interview Questions Scraper

Pull real interview-experience write-ups from any company's LeetCode discussion tag — the full candidate narrative, topic tags, upvotes, views, comment counts, and publish date, one clean row per post. Filter by company, sort by newest, most upvoted, or hottest, and collect as many posts as you need across several companies in a single run. Built for software engineers prepping for interviews, technical recruiters benchmarking their hiring bar, and content teams who need structured interview intel without reading through LeetCode's discuss feed post by post.

### Why This Scraper?

- **Full candidate write-up on every row** — the complete interview narrative (rounds, questions asked, offer outcome), not a 249-character preview; individual posts run to thousands of words.
- **Batch multiple companies in one run** — pass an array like `["Google", "Amazon", "Meta"]` and every post is stamped with the company it came from, so you never re-run for each name.
- **Up to ~3,000 posts per company** — set the per-company cap to `0` to pull a company's entire interview-experience history up to LeetCode's display ceiling.
- **Three native sort orders** — Newest First, Most Upvoted, and Hottest, mapped to LeetCode's own discuss ordering; Most Upvoted surfaces all-time top write-ups with thousands of upvotes.
- **Per-post engagement metadata** — upvotes, view count, and comment count on every row, so you can rank posts by how much the community actually valued them.
- **Topic tags as a clean array** — the company tag on every post, plus role, level (L4 / E5 / SDE-II) and round type wherever the author tagged them.
- **Date filtering for fresh posts only** — set a start date and, under Newest sorting, collection stops the moment it reaches older posts, so you never pay for stale intel.
- **Any company with a LeetCode interview tag** — Google, Amazon, Meta, Microsoft, Apple, Netflix, and thousands more; Meta resolves automatically even though LeetCode files it under "facebook".
- **Standalone, link-ready rows** — every post carries its canonical URL and ISO 8601 publish date, plus the author username where the poster isn't anonymous (LeetCode anonymizes most interview write-ups), so rows drop straight into a spreadsheet with no second lookup.

### Use Cases

**Interview Preparation**
- Study the exact question rounds candidates faced at your target company
- Build a company-specific question bank from real, recent write-ups
- Compare interview loops and difficulty across Google, Amazon, and Meta
- Track how a company's process shifts over time using date filtering

**Recruiting & Hiring Research**
- Benchmark your interview bar against what candidates report at competitors
- See which questions and formats candidates remember most (highest upvotes)
- Understand candidate sentiment and friction points in the hiring funnel
- Research level expectations (L5, E5, SDE-II) straight from tagged posts

**Content Creation**
- Source authentic interview stories for newsletters, blogs, and courses
- Curate the most-upvoted interview experiences by company
- Build "inside the interview loop" roundups with real quotes and outcomes

**Career & Market Research**
- Gauge hiring activity by tracking post volume and recency per company
- Compare compensation and offer signals mentioned across write-ups
- Spot which companies are actively interviewing right now

**Data & Analytics**
- Feed structured interview data into dashboards and search tools
- Enrich prep platforms with fresh, company-tagged interview content
- Run sentiment or topic analysis over thousands of candidate narratives

### Getting Started

#### Simplest — one company

```json
{
    "companies": ["Google"]
}
````

#### Top write-ups across several companies

```json
{
    "companies": ["Amazon", "Meta"],
    "sortBy": "mostVotes",
    "maxPostsPerCompany": 200
}
```

#### Fresh posts, full target list

```json
{
    "companies": ["Google", "Microsoft", "Apple"],
    "sortBy": "newest",
    "maxPostsPerCompany": 500,
    "startDate": "2025-01-01"
}
```

### Input Reference

#### Companies

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `companies` | array | `["Google"]` | Company names to collect interview experience posts for, such as Google, Amazon, or Meta. Add as many as you like — each is collected in turn. |

#### Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sortBy` | select | `Newest First` | Order posts are collected in: Newest First, Most Upvoted, or Hottest. |
| `maxPostsPerCompany` | integer | `100` | Maximum number of posts to collect per company. Set to `0` to collect every available post. Keeping a limit helps control cost. |
| `startDate` | string | *(none)* | Only collect posts published on or after this date. Use `YYYY-MM-DD`, for example `2024-01-15`. Leave empty to collect posts of any age. Works best with Newest First sorting. |

### Output

Each interview post is one flat row. Here's a representative result:

```json
{
    "company": "Google",
    "title": "Google L4 SWE Interview Experience — Onsite (Mountain View)",
    "url": "https://leetcode.com/discuss/post/5891234/google-l4-swe-interview-experience/",
    "content": "I applied through a referral in March. After a recruiter call there was one phone screen with a medium graph question, then a 4-round onsite: two coding rounds, one system design, and one behavioral. The system design round focused on designing a rate limiter...",
    "author": "leetcoder_2026",
    "upvoteCount": 342,
    "viewCount": 18540,
    "commentCount": 27,
    "tags": ["Google", "Interview"],
    "creationDate": "2026-05-14T15:58:17.618855+00:00",
    "topicId": 8397122
}
```

| Field | Type | Description |
|-------|------|-------------|
| `company` | string | Company the post was found under (the company you searched). |
| `title` | string | Post title. |
| `url` | string | Canonical link to the LeetCode discussion post. |
| `content` | string | The full candidate interview-experience write-up. |
| `author` | string | Username of the poster; `null` when the post was made anonymously (common on interview write-ups). |
| `upvoteCount` | integer | Number of upvotes the post received. |
| `viewCount` | integer | Number of times the post has been viewed. |
| `commentCount` | integer | Number of comments on the post. |
| `tags` | array | Topic tags the author applied — always the company, plus role, level, and round type where they tagged them. |
| `creationDate` | string | Publish timestamp in ISO 8601 format. |
| `topicId` | integer | LeetCode's unique identifier for the post. |

### Tips for Best Results

- **Preview first** — start with `maxPostsPerCompany` at 10–50 to confirm the data matches your needs, then scale up. A small limit is collected exactly, so a 10-post preview costs 10 results.
- **Expect anonymous authors** — LeetCode anonymizes the majority of interview posts, so `author` is `null` on most rows. Use `url` or `topicId` as your row key instead.
- **Pull a full history** — set `maxPostsPerCompany` to `0` to collect everything a company has, up to LeetCode's ceiling of roughly 3,000 posts.
- **Searching Meta? Just type "Meta"** — LeetCode files Meta's interviews under the "facebook" tag, and the scraper resolves that alias for you automatically.
- **Combine `startDate` with Newest First for fresh-only pulls** — under Newest sorting, collection stops as soon as it reaches a post older than your date, so you never pay for stale results. Under Most Upvoted or Hottest the date becomes a simple filter instead.
- **Use Most Upvoted for the best write-ups** — the top posts often carry thousands of upvotes and the most detailed round-by-round breakdowns.
- **Batch your whole target list** — adding several companies to one run is faster and cheaper than a separate run per company; each row is stamped with its company.
- **Rank after export** — sort your dataset by `upvoteCount` or `viewCount` to surface the write-ups the community valued most.

### Pricing

**From $4.00 per 1,000 results** — a flat, predictable rate that undercuts other LeetCode interview scrapers on the store. Bronze, Silver, and Gold subscribers pay progressively less; the table below shows total cost at each Apify loyalty tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $0.48 | $0.45 | $0.43 | $0.40 |
| 1,000 | $4.80 | $4.50 | $4.25 | $4.00 |
| 10,000 | $48.00 | $45.00 | $42.50 | $40.00 |
| 100,000 | $480.00 | $450.00 | $425.00 | $400.00 |

A "result" is one interview post row in your dataset. No compute or time-based charges — you pay per result, plus a small fixed per-run start fee.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor collects publicly visible interview-experience posts for legitimate interview preparation, hiring research, and content creation. Users are responsible for complying with applicable laws and LeetCode's Terms of Service. Respect the authors behind these write-ups: do not use collected data for spam, harassment, or any unlawful purpose, and handle any personal information found in post text responsibly.

# Actor input Schema

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

Companies to collect interview experience posts for, such as "Google", "Amazon", or "Meta". Add as many as you like — each is collected in turn.

## `sortBy` (type: `string`):

The order in which posts are collected for each company.

## `maxPostsPerCompany` (type: `integer`):

Maximum number of posts to collect for each company. Set to 0 to collect all available posts — LeetCode itself only shows about 3,000 posts per company, so 0 collects up to that ceiling. Keeping a limit helps control cost.

## `startDate` (type: `string`):

Only collect posts published on or after this date. Use the format YYYY-MM-DD, for example 2024-01-15. Leave empty to collect posts of any age. Works best with "Newest First" sorting.

## Actor input object example

```json
{
  "companies": [
    "Google"
  ],
  "sortBy": "newest",
  "maxPostsPerCompany": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of interview posts with company, title, engagement metrics, date, and link.

## `details` (type: `string`):

Full per-post rows including the complete candidate write-up, tags, and author.

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "companies": [
        "Google"
    ],
    "sortBy": "newest",
    "maxPostsPerCompany": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/leetcode-interview-questions-scraper").call(input);

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "companies": ["Google"],
    "sortBy": "newest",
    "maxPostsPerCompany": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/leetcode-interview-questions-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 '{
  "companies": [
    "Google"
  ],
  "sortBy": "newest",
  "maxPostsPerCompany": 100
}' |
apify call solidcode/leetcode-interview-questions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=solidcode/leetcode-interview-questions-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LeetCode Interview Questions Scraper",
        "description": "[💰 $4 / 1K] Extract LeetCode interview experience posts by company — post title, full candidate write-up, role and level tags, upvotes, views, comment counts, author, and publish date. Search multiple companies and filter by date. Great for interview prep and hiring research.",
        "version": "1.0",
        "x-build-id": "buAYpus70mcaMfmE4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/solidcode~leetcode-interview-questions-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-solidcode-leetcode-interview-questions-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/solidcode~leetcode-interview-questions-scraper/runs": {
            "post": {
                "operationId": "runs-sync-solidcode-leetcode-interview-questions-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/solidcode~leetcode-interview-questions-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-solidcode-leetcode-interview-questions-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",
                "properties": {
                    "companies": {
                        "title": "Company Names",
                        "type": "array",
                        "description": "Companies to collect interview experience posts for, such as \"Google\", \"Amazon\", or \"Meta\". Add as many as you like — each is collected in turn.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sortBy": {
                        "title": "Sort Posts By",
                        "enum": [
                            "newest",
                            "mostVotes",
                            "hottest"
                        ],
                        "type": "string",
                        "description": "The order in which posts are collected for each company.",
                        "default": "newest"
                    },
                    "maxPostsPerCompany": {
                        "title": "Max Posts Per Company",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of posts to collect for each company. Set to 0 to collect all available posts — LeetCode itself only shows about 3,000 posts per company, so 0 collects up to that ceiling. Keeping a limit helps control cost.",
                        "default": 100
                    },
                    "startDate": {
                        "title": "Posts From Date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Only collect posts published on or after this date. Use the format YYYY-MM-DD, for example 2024-01-15. Leave empty to collect posts of any age. Works best with \"Newest First\" sorting."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
