# Coursera Scraper (`antonionduarte/coursera-scraper`) Actor

Extract Coursera course data for market research, competitor analysis, and educational insights. This scraper fetches titles, ratings, partners, and skills, empowering you to analyze the online education landscape.

- **URL**: https://apify.com/antonionduarte/coursera-scraper.md
- **Developed by:** [António](https://apify.com/antonionduarte) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 249 total users, 7 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 4.47 out of 5 stars

## Pricing

from $12.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.

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

## Coursera Scraper

Coursera Scraper is an Apify actor designed to extract comprehensive course data from the Coursera platform. Whether you’re conducting market analysis, tracking educational trends, or performing competitor research, this tool streamlines the data extraction process and allows you to harness Coursera’s vast catalog of courses. The scraper fetches course information, including course titles, ratings, partners, skill tags, and more, making it ideal for anyone analyzing the world of online education.

### Why scrape Coursera?

Coursera is a premier online learning platform that offers thousands of courses from leading universities and institutions. By scraping Coursera data, you can:

- Monitor course ratings and popularity to understand what learners value.
- Identify top universities and partners offering courses in your niche.
- Track industry trends in technology, business, data science, and more.
- Compare similar courses across different providers to gain insights into course structure, pricing, and market positioning.

### Features

- Scrapes detailed course information, including name, URL, ratings, difficulty level, partner institutions, and associated skills.
- Allows configurable input parameters to refine the search query and number of pages to scrape.
- Stores all extracted data into a single dataset for simplified analysis.

### How much will it cost to scrape Coursera?

The access to the scraper itself costs $20/month.

### Paid Apify plan required

This Actor only runs for users on a **paid Apify plan**. Runs started from a free-plan account exit immediately with a clear status message, before any scraping takes place.

**Why this restriction exists:** A large influx of users abusing the free plan with multiple accounts in order to avoid paying for Actor usage made free-plan access unsustainable. Requiring a paid plan keeps the Actor reliable and fairly priced for the users who pay for it.

If you are on the free plan and want to use this Actor, upgrade to any paid Apify subscription (e.g., the Starter plan) and your runs will work normally.

### Usage

#### Input Parameters

The actor accepts the following input parameters:

- `query` (Required): A search term (e.g., "artificial intelligence") to find relevant courses.
- `pages` (Optional): The number of pages of search results to scrape. Defaults to 3 if not provided.

**Notes:**

- This scraper utilizes **Residential Proxies** for all requests to ensure reliable data extraction.
- The runtime may increase with larger page counts, as more requests are performed. Consider adjusting your parameters for optimal performance.

#### Example Input

```json
{
    "query": "artificial intelligence",
    "pages": 5
}
```

### Running the Actor

You can run the actor directly from the Apify platform or via API. Ensure you provide the necessary input parameters as specified above.

### Output

All scraped data is stored in a single dataset, accessible in the Storage section under Datasets. This dataset provides structured JSON records for each course, enabling easy integration into your analytics workflows.

#### Data Fields

**Courses Dataset** (default dataset):

- `id`: Unique course identifier.
- `name`: Course title.
- `url`: Direct link to the course page.
- `avgProductRating`: Average user rating of the course.
- `numProductRatings`: Number of ratings.
- `isCourseFree`: Indicates if the course is free.
- `isCreditEligible`: Indicates if the course offers academic credit.
- `isPartOfCourseraPlus`: Indicates if the course is included in Coursera Plus.
- `productDifficultyLevel`: Difficulty level (e.g., BEGINNER, INTERMEDIATE).
- `productDuration`: Estimated duration (e.g., ONE_TO_FOUR_WEEKS).
- `productType`: Type of product (e.g., COURSE, SPECIALIZATION).
- `skills`: List of skills associated with the course.
- `partners`: List of partner institutions offering the course.
- `imageUrl`: URL of the course image.

**NOTE:** Apify datasets support multiple export formats including JSON, CSV, and XLSX, so you can easily integrate scraped Coursera data into your workflows.

### Is it legal to scrape Coursera?

Always ensure that your data collection activities adhere to local and international laws and respect Coursera’s terms and policies. Scrape only publicly available information, avoid personal data, and maintain a legitimate purpose for data collection. If in doubt, consult legal counsel.

# Actor input Schema

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

Search term for courses (e.g., 'artificial intelligence')

## `pages` (type: `integer`):

Number of pages to scrape. Each page returns ~15 courses. Defaults to 3 if not set.

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

Proxy settings for the scraper. Residential proxies recommended to avoid blocking.

## Actor input object example

```json
{
  "query": "artificial intelligence",
  "pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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": "artificial intelligence",
    "pages": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("antonionduarte/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 = {
    "query": "artificial intelligence",
    "pages": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("antonionduarte/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 '{
  "query": "artificial intelligence",
  "pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call antonionduarte/coursera-scraper --silent --output-dataset

```

## MCP server setup

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