# Coursera Scraper — Extract Courses, Ratings & Enrollment Data (`forlex/coursera-scraper`) Actor

Scrape Coursera courses, specializations & certificates. Get title, provider, rating, skills, enrollment count & more. No login required. Flat $0.005/item.

- **URL**: https://apify.com/forlex/coursera-scraper.md
- **Developed by:** [Forlex Lab](https://apify.com/forlex) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### 📚 Coursera Scraper — Extract Courses, Ratings & Enrollment Data

> **Extract structured course data from Coursera** — search by keyword, apply powerful filters, or use start URLs. Get title, provider, rating, skills, enrollment count, difficulty & duration per course. **Flat $0.005/item** — simple, predictable, and scalable pricing.

[![Apify Store](https://img.shields.io/badge/Apify%20Store-Live-brightgreen)](#)
[![Pay Per Event](https://img.shields.io/badge/Pricing-Pay%20Per%20Event-blue)](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event)
[![No Auth Required](https://img.shields.io/badge/Auth-None%20Required-success)](#)

***

### 🚀 Why This Actor?

| Feature | This Actor | Competitors |
|---------|-----------|-------------|
| **Price per item** | **$0.005 flat** | $0.02+ or Pay-per-compute |
| **Compute Costs** | **Included** | Hidden (You pay for their slow code) |
| **Speed & Arch** | **Ultra-Fast (Cheerio)** | Slow (Playwright/Puppeteer) |
| **Data Richness** | **Skills, Badges, Enrollment** | Title & URL only |
| **Input Fields** | **Rich Filters (Lang, Level)** | Confusing and broken |

***

### ✨ Features

- 🔍 **2 Search Modes** — keyword search (e.g. `"python"`, `"data science"`) or direct Coursera search URLs.
- 📄 **Rich Output** — title, provider, rating, # reviews, difficulty, duration, skills list, badges, Coursera Plus flag.
- 🌐 **Powerful Filters** — Language, Difficulty Level, Duration, and Product Type (Course, Specialization, Certificate, Degree).
- 🔬 **Deep Scrape Mode** — navigate each course page to extract enrollment count, full description, and price.
- 💰 **Flat Pricing** — ~$0.00005 Base + $0.005/item. No hidden compute fees.
- 📦 **Multiple Export Formats** — JSON, CSV, Excel, XML, HTML Table.

***

### 🎯 Use Cases

| Audience | Applications |
|----------|--------------|
| **EdTech Founders** | Identify trending skills, gaps in the market, and underserved course topics |
| **Market Researchers** | Analyze MOOC trends, provider dominance, and rating distributions at scale |
| **Lead Generation** | Find top-rated instructors and universities for outreach and partnerships |
| **Competitor Analysts** | Track enrollment growth, ratings, and pricing of rival courses over time |

***

### 💡 Quick Start

#### 1. Sign Up (Free $5 Credit)

[![Create Free Account](https://img.shields.io/badge/Create%20Free%20Account-%245%20Credit-00D4AA?style=for-the-badge)](https://apify.com?fpr=5uxnkx)

> Uses our referral link — you get **$5 free credit** to test immediately. No credit card required.

#### 2. Run Your First Search

```json
{
  "searchKeywords": ["python"],
  "maxItems": 50,
  "difficultyLevel": "Beginner",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

#### 3. Download Results

Results appear in the **Dataset** tab. Export as JSON, CSV, Excel, XML, or HTML Table.

***

### ⚙️ Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchKeywords` | array | No\* | — | Keywords to search (e.g. `["python", "data science"]`). *Required if no `startUrls`. |
| `startUrls` | array | No* | — | Direct Coursera search or course page URLs. |
| `language` | string | No | `All` | Filter by language (English, Spanish, French…) |
| `difficultyLevel` | string | No | `All` | Filter by level (Beginner, Intermediate, Advanced, Mixed) |
| `duration` | string | No | `All` | Filter by duration (1-4 Weeks, 1-3 Months, 3-6 Months) |
| `learningProduct` | string | No | `All` | Filter by type (Courses, Specializations, Professional Certificates, Degrees) |
| `deepScrape` | boolean | No | `false` | Navigate each course page for enrollment count, description & price |
| `maxItems` | integer | No | `100` | Max items to return (1–10,000) |
| `proxyConfiguration` | object | Yes | `Apify Proxy` | Proxies are required for Coursera |

***

### 📊 Output Example

Each item in the dataset contains the following fields:

```json
{
  "title": "Crash Course on Python",
  "url": "https://www.coursera.org/learn/python-crash-course",
  "productType": "COURSE",
  "provider": "Google",
  "rating": 4.77,
  "numRatings": 40492,
  "difficultyLevel": "Beginner",
  "duration": "1-3 months",
  "skills": ["Python Programming", "Computer Programming", "Data Structures", "Debugging"],
  "languages": ["English"],
  "imageUrl": "https://s3.amazonaws.com/coursera-course-photos/...",
  "isPartOfCourseraPlus": true,
  "badges": ["Free Trial"],
  "description": "Offered by Google. Learn Python foundations to write simple programs...",
  "enrolled": 41419421,
  "price": null,
  "scrapedAt": "2026-07-04T13:14:02.696Z"
}
```

#### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Course title |
| `url` | string | Full Coursera URL |
| `productType` | string | COURSE, SPECIALIZATION, PROFESSIONAL\_CERTIFICATE, or DEGREE |
| `provider` | string | Institution (Google, Stanford, University of Michigan…) |
| `rating` | number | Average star rating (0–5) |
| `numRatings` | number | Total number of reviews |
| `difficultyLevel` | string | Beginner / Intermediate / Advanced / Mixed |
| `duration` | string | Estimated time to complete |
| `skills` | array | List of skills taught |
| `languages` | array | Available languages |
| `isPartOfCourseraPlus` | boolean | Included in Coursera Plus subscription |
| `badges` | array | Course badges (e.g. Free Trial) |
| `enrolled` | number | Learners enrolled *(deep scrape only)* |
| `description` | string | Course description *(deep scrape only)* |
| `price` | string | Course price if visible *(deep scrape only)* |
| `scrapedAt` | string | ISO 8601 timestamp |

> Download the dataset in **JSON, HTML, CSV, or Excel** from the Dataset tab.

***

### 💰 Pricing (Pay Per Event)

| Event | Rate |
|-------|-------|
| **Actor Start** (`apify-actor-start`) | $0.00005 (Apify default) |
| **Result Item** (`apify-default-dataset-item`) | **$0.005** |

**Examples:**

- 100 items: ~$0.00005 + 100 × $0.005 = **$0.50**
- 1,000 items: ~$0.00005 + 1,000 × $0.005 = **$5.00**
- 10,000 items: ~$0.00005 + 10,000 × $0.005 = **$50.00**

***

### 🔧 Integration (API)

#### Node.js

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

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('forlex/coursera-scraper').call({
  searchKeywords: ['machine learning'],
  difficultyLevel: 'Beginner',
  maxItems: 100,
});

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

#### Python

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

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("forlex/coursera-scraper").call(
    run_input={
        "searchKeywords": ["data science"],
        "maxItems": 100,
        "deepScrape": False,
    }
)

items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in items:
    print(item["title"], item["provider"], item["rating"])
```

***

### 💡 Tips & Advanced Options

- **Optimize speed**: Use `deepScrape: false` for fast bulk collection of search results. Enable `deepScrape` only when you need enrollment counts or descriptions.
- **Reduce costs**: Start with `maxItems: 10` to validate your keyword before scaling up.
- **Combine filters**: Use `difficultyLevel` + `duration` + `learningProduct` together to narrow down exactly what you need.
- **Start URLs**: For precise scraping, paste a Coursera search URL directly into `startUrls` (e.g., `https://www.coursera.org/search?query=python&productDifficultyLevel=Beginner`).

***

### ❓ FAQ, Disclaimers & Support

#### Is it legal to scrape Coursera?

Web scraping of publicly available data is generally legal. This Actor only extracts publicly visible course information and does not bypass any login walls or access private data. Always review the target website's Terms of Service before scraping.

#### What if the Actor stops working?

Websites change their structure regularly. If you encounter issues, please report them in the [Issues tab](https://console.apify.com/actors/rlctYUIz3MCe3V85o/issues) and we'll fix it promptly.

#### Can I get a custom solution?

Yes! If you need additional fields, scheduled runs, or a scraper for a different platform, reach out through the Issues tab.

***

<div align="center">

**Built with ❤️ by Rifky · Powered by [Apify](https://apify.com?fpr=5uxnkx)**

</div>

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to search for (e.g., 'python', 'machine learning').

## `startUrls` (type: `array`):

Optional: Start URLs to scrape directly instead of searching.

## `language` (type: `string`):

Filter by Language.

## `difficultyLevel` (type: `string`):

Filter by Difficulty Level.

## `duration` (type: `string`):

Filter by Duration.

## `learningProduct` (type: `string`):

Filter by Product Type.

## `deepScrape` (type: `boolean`):

If true, navigates into each course page to extract deeper data (syllabus, price). Slower but richer data.

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

Maximum number of items to scrape.

## `proxyConfiguration` (type: `object`):

Proxy configuration.

## Actor input object example

```json
{
  "searchKeywords": [
    "python",
    "machine learning"
  ],
  "language": "All",
  "difficultyLevel": "All",
  "duration": "All",
  "learningProduct": "All",
  "deepScrape": false,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "searchKeywords": [
        "python",
        "machine learning"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("forlex/coursera-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 = {
    "searchKeywords": [
        "python",
        "machine learning",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("forlex/coursera-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 '{
  "searchKeywords": [
    "python",
    "machine learning"
  ],
  "maxItems": 10
}' |
apify call forlex/coursera-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forlex/coursera-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/rlctYUIz3MCe3V85o/builds/ec1z6K4sncheCMtFM/openapi.json
