# Coursera Courses and Specializations Lookup (`xyrelith-data/coursera-courses-and-specializations-lookup`) Actor

Browse Coursera's public catalog of individual courses or specializations and get each one's title, slug, description, workload, difficulty level, course type and direct Coursera URL.

- **URL**: https://apify.com/xyrelith-data/coursera-courses-and-specializations-lookup.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** AI, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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

## Coursera Courses and Specializations Lookup

Coursera's public catalog API exposes two kinds of listings: standalone courses and multi-course specializations. This actor pages through either catalog and returns each entry as a flat record, so you can build a course dataset without opening Coursera's site yourself.

### What this actor does

- Browses either the course catalog or the specialization catalog, chosen with the `mode` input
- Pages through the catalog automatically, stopping once `maxItems` is reached or the catalog runs out of entries
- Narrows results to entries whose title or description matches a keyword
- Builds a direct `coursera.org/learn/<slug>` URL for every entry that has a slug
- Omits any field Coursera's catalog doesn't publish for a given entry instead of returning an empty value

### Output per entry

- `courseId` — Coursera's internal numeric ID for the course or specialization
- `title` — catalog name
- `slug` — URL slug used to build `courseUrl`
- `description` — catalog description text, truncated to 500 characters
- `workload` — estimated time commitment as published by Coursera (e.g. `"4-6 hours/week"`)
- `level` — difficulty level (e.g. `Beginner`, `Intermediate`, `Advanced`)
- `courseType` — Coursera's internal course-type code
- `courseUrl` — direct link to the course or specialization page on coursera.org
- `recordType` — always `course`
- `scrapedAt` — ISO 8601 timestamp of when the record was fetched

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `courses` | `courses` to browse the course catalog, or `specializations` to browse the specialization catalog |
| `searchQuery` | string | – | Keyword to narrow results by title or description |
| `maxItems` | integer | `20` | Maximum number of entries to return (1–200) |

#### Example: browse courses matching a keyword

```json
{
  "mode": "courses",
  "searchQuery": "machine learning",
  "maxItems": 20
}
```

#### Example: browse specializations

```json
{
  "mode": "specializations",
  "maxItems": 15
}
```

#### Example: larger pull of general courses

```json
{
  "mode": "courses",
  "maxItems": 150
}
```

### Use cases

- **EdTech research** — build a dataset of Coursera's current course and specialization offerings for comparison against other platforms
- **Content curation** — find courses on a given topic to recommend or link to from a learning resource site
- **Catalog monitoring** — track how Coursera's workload and difficulty-level labeling changes for a topic over time
- **Market analysis** — compare the depth of course vs. specialization offerings across subject areas

### FAQ

**What's the difference between `courses` and `specializations` mode?**
`courses` returns individual Coursera courses. `specializations` returns Coursera's bundled multi-course programs instead — the output fields are the same, but the catalog and the records in it are different.

**Does `searchQuery` run a real search on Coursera?**
It narrows the browsed catalog to entries whose title or description contains your keyword; it does not call a separate search endpoint, since Coursera's public catalog API only exposes browse-style access.

**Why is `description` cut off at 500 characters?**
That's the catalog's own summary length as returned by the API; the actor doesn't fetch each course's individual page for the full-length description.

**Why might a record be missing `workload` or `level`?**
Not every catalog entry has those fields populated on Coursera's side — the actor only includes a field when the catalog actually provides a value for it.

**How current is the data?**
Every run queries Coursera's public catalog live, so results reflect whatever is published at run time.

**Is this affiliated with Coursera?**
No. This is an independent tool that reads Coursera's publicly accessible catalog API and is not affiliated with or endorsed by Coursera.

# Actor input Schema

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

Select what data to fetch from Coursera.

## `searchQuery` (type: `string`):

Optional keyword to filter results by title or description (client-side).

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

Maximum number of courses to return.

## Actor input object example

```json
{
  "mode": "courses",
  "searchQuery": "machine learning",
  "maxItems": 20
}
```

# Actor output Schema

## `courses` (type: `string`):

Dataset containing all scraped Coursera courses or specializations.

# 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 = {
    "mode": "courses",
    "searchQuery": "machine learning",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/coursera-courses-and-specializations-lookup").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 = {
    "mode": "courses",
    "searchQuery": "machine learning",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/coursera-courses-and-specializations-lookup").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 '{
  "mode": "courses",
  "searchQuery": "machine learning",
  "maxItems": 20
}' |
apify call xyrelith-data/coursera-courses-and-specializations-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/coursera-courses-and-specializations-lookup"
        }
    }
}
```

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/O7omCC1afSjWcQSHI/builds/iXbsCqoQorlmB62MF/openapi.json
