# Udemy Scraper (`datahamster/udemy-scraper`) Actor

Udemy scraper for courses by keyword, category or URL: live price with sale and list price, rating, reviews, students, lectures, hours, level, language, last update, category. Free/paid, rating, language and level filters. Monitor mode alerts on new courses and price drops. No login.

- **URL**: https://apify.com/datahamster/udemy-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Business, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.12 / 1,000 result items

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Udemy Scraper

Scrape Udemy courses by keyword, by category or from course URLs. Each row has the live price (sale price, list price and discount), rating, reviews, students, lectures, total hours, level, language, last update, publish date, category and subcategory. Run it as a monitor to get only new courses and price drops. No login, no cookies.

**Try it:** the prefilled example returns 30 courses in about 15 seconds. Results cost $1.40 per 1,000.

### Why this one

- **Price-drop and new-course monitor.** Save the input as a task and run it in `monitor` mode: each run returns only courses that were published since the last run, and known courses whose price dropped (`changeType: "price_drop"` with `previousPrice`). Set `priceAlerts` to `any` to get price rises too. Webhook and Telegram summaries are built in. Neither of the two most used Udemy actors has a monitor mode.
- **Real filters, checked twice.** Free or paid, minimum rating, language and level are sent to Udemy and then checked again on every row, so a free-only run never returns a paid course.
- **Sale prices.** `price` is what a buyer pays right now, `listPrice` the undiscounted price, plus `discountPercent` and `isDiscounted`, read live from Udemy's pricing service for every row.
- **Keywords, categories and URLs in one run, one row per course.** A course found by two keywords or by a keyword and a category is returned once.
- **Price.** $0.0014 per course, no start fee and no minimum charge.

### What you get

Real row from a run on 12 November 2026 (keyword `python`):

| Field | Value |
|---|---|
| `title` | `100 Days of Code™: The Complete Python Pro Bootcamp` |
| `url` | `https://www.udemy.com/course/100-days-of-code/` |
| `price` / `listPrice` / `currency` | `129.99` / `129.99` / `USD` |
| `rating` / `reviewsCount` | `4.67` / `439921` |
| `students` | `1900351` |
| `lectures` / `totalHours` | `604` / `56.8` |
| `level` / `language` | `All Levels` / `en` |
| `lastUpdated` / `publishedAt` | `2026-11-10` / `2020-10-30T17:18:33Z` |
| `category` / `subcategory` | `Development` / `Programming Languages` |
| `badges` | `["Bestseller"]` |

Fields: `id`, `courseId`, `url`, `slug`, `title`, `headline`, `isFree`, `price`, `listPrice`, `discountPercent`, `isDiscounted`, `currency`, `rating`, `reviewsCount`, `students`, `lectures`, `practiceTestQuestions`, `totalHours`, `level`, `locale`, `language`, `lastUpdated`, `publishedAt`, `category`, `subcategory`, `badges`, `isPracticeTest`, `hasCaptions`, `instructorCount`, `image`, `query`, `rank`, `foundVia`, `detailsFetched`, `scrapedAt`. Monitor rows add `changeType` (`new`, `price_drop`, `price_rise`), `previousPrice` and `priceChange`.

### Use cases

- Track the prices of competing courses in your niche and get a message when one goes on sale.
- Watch a topic (`kubernetes`, `prompt engineering`) or a category and get the new courses as they are published.
- Build a catalog of free courses in a language with a minimum rating.
- Compare students, ratings and course length across a category for market research.

### Related actors

- [YouTube Search Scraper](https://apify.com/datahamster/youtube-search-scraper): videos by keyword with views and channel stats.
- [Medium Articles](https://apify.com/datahamster/medium-articles): articles by tag or author with claps and reading time.
- [Google Trends Scraper](https://apify.com/datahamster/google-trends-scraper): interest over time for the topics you teach.

### How it works

1. **Keywords** go to the search Udemy's own site uses (`courseSearch`), 60 courses per page, with your filters and sort.
2. **Categories** (a category page URL like `https://www.udemy.com/courses/development/programming-languages/` or a name like `Development`) are read from Udemy's category listing with the same filters.
3. **Prices** for each page of courses come from Udemy's pricing service in one request.
4. **Details** (`includeDetails`, on by default) read each course's page data for category, subcategory, publish date and captions. Turn it off for faster runs with search fields only.

If Udemy refuses a request, the actor retries through a datacenter and then a residential proxy. A run where every source is refused ends with `emptyReason: "blocked"` in the run summary, never as an empty "no matches" run.

### Input

| Field | Meaning | Default |
|---|---|---|
| `keywords` | Search terms, e.g. `python`, `excel` | empty |
| `categories` | Category page URLs or names, e.g. `Development`, `business/entrepreneurship` | empty |
| `courseUrls` | Course URLs, slugs or ids to read directly | empty |
| `price` | `any`, `free` or `paid` | `any` |
| `minRating` | Minimum average rating, e.g. `4.5` | empty |
| `languages` | Language codes, e.g. `en`, `de`, `es` | empty |
| `levels` | `beginner`, `intermediate`, `expert`, `all` | empty |
| `sort` | `relevance`, `newest`, `highest-rated`, `most-reviewed` | `relevance` |
| `maxResultsPerQuery` | Courses per keyword or category (up to 10,000) | `100` |
| `includeDetails` | Category, subcategory and publish date per course | `true` |
| `maxItems` | Stop after this many rows | `100` |
| `mode` | `scrape`, or `monitor` (only new courses and price changes) | `scrape` |
| `priceAlerts` | Monitor: `drop`, `any` or `off` | `drop` |

### Pricing

| Event | Price |
|---|---|
| result | $0.0014 per course ($1.40 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0014 per new course or price change in monitor mode |

Store discounts: Silver 10% off, Gold and higher 20% off. Platform usage is paid by you and is small: Udemy answers without a proxy on most runs. Filtered and duplicate courses are never charged.

**Found it useful?** A short review on the Store page helps other people find this actor. If something is wrong, open an issue on the actor page.

### Limits

- Prices are in US dollars as Udemy shows them to a visitor in the United States. Udemy sets regional prices, so a visitor in another country may see a different amount.
- Udemy returns at most 10,000 courses for one search or category. Narrow a broad keyword with filters if you need every course.
- `sort: most-reviewed` works for keywords only. Category listings sort by popularity, rating or newest.
- Keywords and categories are separate sources: a run with both returns the keyword results and the category results, without intersecting them.
- A monitor's "new" means published recently: a course published long ago that only now enters your top results is recorded silently, not alerted. Without `includeDetails`, keyword rows have no publish date and every unseen course counts as new.
- Course URLs are returned as they are, without the price, language, level or rating filters.
- Privacy: course data only. Instructor names and profiles are not collected (most instructors are private persons); `instructorCount` says how many there are.

### FAQ

**Does it need a Udemy account?** No. It reads what Udemy shows a logged-out visitor.

**Why is `price` empty on some rows?** Udemy's pricing service refused that request on every proxy. The rest of the row is complete; the run summary counts it in `priceWalls`.

**What happens when nothing matches?** No rows are pushed and nothing is charged. `RUN_SUMMARY` in the run's key-value store says why (`emptyReason`) and how many courses the filters dropped.

### Changelog

- 0.1: initial release. Keyword, category and course-URL sources, free/paid, rating, language and level filters, live sale prices, course details, new-course and price-drop monitor.

# Actor input Schema

## `keywords` (type: `array`):

Search terms, one per line, e.g. "python", "excel", "prompt engineering". Each keyword is a separate search; a course found by several is returned once.

## `categories` (type: `array`):

Udemy category or subcategory pages, e.g. "https://www.udemy.com/courses/development/programming-languages/", or names like "Development" or "business/entrepreneurship". Read with the same filters as keywords.

## `courseUrls` (type: `array`):

Course pages to read directly, e.g. "https://www.udemy.com/course/100-days-of-code/", a slug or a numeric course id. Useful for a price-drop monitor on a fixed list. Filters do not apply to these.

## `price` (type: `string`):

Keep only free or only paid courses.

## `minRating` (type: `number`):

Keep only courses with at least this average rating, e.g. 4.5. Leave empty for any rating.

## `languages` (type: `array`):

Course language codes, e.g. "en", "de", "es", "pt". Leave empty for all languages.

## `levels` (type: `array`):

Keep only courses of these levels. Leave empty for all.

## `sort` (type: `string`):

Order in which Udemy returns courses.

## `maxResultsPerQuery` (type: `integer`):

How many courses to read for each keyword and each category (Udemy serves up to 10,000).

## `includeDetails` (type: `boolean`):

Read each course's details for category, subcategory, publish date and captions. Turn off for faster runs with search fields only.

## `priceAlerts` (type: `string`):

In monitor mode, which price changes of known courses are returned.

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

Stop after this many courses (you pay only for returned rows).

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "keywords": [
    "python",
    "excel"
  ],
  "price": "any",
  "sort": "relevance",
  "maxResultsPerQuery": 15,
  "includeDetails": true,
  "priceAlerts": "drop",
  "maxItems": 30,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "keywords": [
        "python",
        "excel"
    ],
    "maxResultsPerQuery": 15,
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/udemy-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 = {
    "keywords": [
        "python",
        "excel",
    ],
    "maxResultsPerQuery": 15,
    "maxItems": 30,
}

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

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "python",
    "excel"
  ],
  "maxResultsPerQuery": 15,
  "maxItems": 30
}' |
apify call datahamster/udemy-scraper --silent --output-dataset

```

## MCP server setup

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

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

## OpenAPI specification

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