# Brilliant.org Courses Scraper (`crawlerbros/brilliant-courses-scraper`) Actor

Scrape Brilliant.org's interactive learning catalog - math, computer science, data analysis, AI, and science courses. Get course descriptions, chapter/lesson breakdowns, lesson counts, exercise counts, prerequisites, and related next-step courses.

- **URL**: https://apify.com/crawlerbros/brilliant-courses-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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/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.

- **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

## Brilliant.org Courses Scraper

Scrape [Brilliant.org](https://brilliant.org)'s interactive learning catalog — math, computer science, data analysis, AI, and science courses. Get full course descriptions, chapter/lesson breakdowns, lesson and exercise counts, prerequisites, and related "next step" courses. No auth, no proxy, no cookies required.

### What this actor does

- **Two output modes:** `courses` (one record per course, chapters/lessons nested inside) and `lessons` (flattened, one record per lesson)
- **Full catalog discovery:** automatically pulls the complete list of ~65 public courses from Brilliant's own sitemap — no manual slug list needed
- **Filters:** keyword, free-vs-premium access level, lesson-count range, category (learning path / topic taxonomy)
- **Rich course metadata:** prerequisites, next-step course recommendations, concepts covered, lesson/exercise counts
- **Empty fields are omitted**

### Output per course (mode=courses)

- `id`, `slug`, `title`, `description`, `introText`, `imageUrl`, `versionName`
- `learningPath` — Brilliant's topic taxonomy / category slug (e.g. `computer-science`, `foundational-math`)
- `lessonCount`, `exerciseCount` — course size stats
- `premiumOnly`, `desktopOnly` — access flags
- `conceptsInclude[]` — topic tags covered by the course
- `prereqAndNextStepNotes` — free-text guidance on prerequisites
- `prerequisites[]`, `nextSteps[]` — related courses (`{title, url}`)
- `collaborators[]` — partner organizations credited on the course (`{name, link, image}`), e.g. Microsoft on "Quantum Computing". Empty on most courses, omitted when absent.
- `chapters[]` — ordered chapter list, each with `slug`, `name`, `descriptionBullet1/2`, `accessStatus` (`AVAILABLE`/`LOCKED`), `locked` (bool), `lessonCount`, and nested `lessons[]` (`slug`, `title`, `url`, `premiumLocked`)
- `chapterCount`
- `courseUrl` / `sourceUrl` — canonical course page
- `recordType: "course"`, `scrapedAt`

### Output per lesson (mode=lessons)

- `courseSlug`, `courseTitle`, `coursePremiumOnly`, `learningPath`
- `chapterSlug`, `chapterName`, `chapterLocked`
- `lessonSlug`, `lessonTitle`, `premiumLocked`
- `lessonUrl` / `sourceUrl`
- `recordType: "lesson"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `courses` | `courses` or `lessons` |
| `courseSlugs` | array | – | Exact course slugs to fetch; empty = entire public catalog |
| `keyword` | string | – | Substring match on title/description/intro text |
| `accessFilter` | select | – | `free` / `premium` / any |
| `learningPath` | select | – | Category / topic taxonomy filter (13 known values, e.g. `computer-science`, `python`, `data-analysis`) |
| `minLessonCount` / `maxLessonCount` | int | – | Course size range |
| `maxItems` | int | `65` | Hard cap on emitted records |

#### Example: entire free catalog, courses view

```json
{
  "mode": "courses",
  "accessFilter": "free",
  "maxItems": 65
}
```

#### Example: lesson-level breakdown of specific courses

```json
{
  "mode": "lessons",
  "courseSlugs": ["how-llms-work", "pre-algebra"],
  "maxItems": 200
}
```

#### Example: AI/ML-related courses by keyword

```json
{
  "mode": "courses",
  "keyword": "neural",
  "maxItems": 20
}
```

### Use cases

- **Curriculum research** — build a searchable index of Brilliant's course catalog by topic and difficulty proxy (lesson count)
- **EdTech competitive analysis** — track catalog breadth, free-vs-premium mix, and course sizing over time
- **Learning-path design** — use `prerequisites`/`nextSteps` to map recommended course sequences
- **Content audits** — flatten to lesson level to count total lessons/exercises across the whole platform

### Limitations

- Brilliant.org's public catalog totals roughly 65 courses; `maxItems` above that in `courses` mode simply returns everything available.
- Individual `lessonUrl` links redirect anonymous visitors back to the parent course overview page (Brilliant requires a free account to play through a specific lesson) — the URL itself is valid and resolves successfully, it just lands on the course page rather than the lesson for logged-out visitors.
- Lesson *content* (the interactive problems themselves) requires a logged-in session and is out of scope — this actor scrapes catalog/syllabus metadata only (titles, structure, counts), not paywalled lesson content.
- `learningPath` is Brilliant's own internal topic-taxonomy slug (13 known values, e.g. `foundational-math`, `computer-science`, `python`); it's not a human-facing category label shown in Brilliant's UI, but it groups courses consistently and can be used as a `category` filter/facet.
- Brilliant doesn't gate whole courses behind Premium — every course currently exposes its first 2 chapters free and locks the rest (`chapters[].locked`/`accessStatus`), so `premiumOnly` is `false` for every course in the catalog today and `accessFilter: "premium"` currently returns 0 records. The filter is kept because `premiumOnly` is a real field Brilliant's API exposes (and may be used for future premium-only courses); use `chapters[].locked` per-chapter if you need today's actual free/paywall boundary.

### FAQ

**Why is `premiumOnly` sometimes missing from a record?** It isn't — Brilliant marks every course with a boolean access flag, so this field is present on virtually every successfully scraped course. If you don't see it, the course page failed to embed course data (rare) and the record was skipped.

**What's the difference between `courses` and `lessons` mode?** `courses` mode gives you one row per course with the full chapter/lesson tree nested inside (best for a catalog overview). `lessons` mode flattens that tree so every lesson is its own row with course/chapter context columns (best for lesson-level counting or spreadsheet analysis).

**Is proxy or login required?** No. Every course's syllabus/metadata is rendered server-side on the public course page and readable without an account.

**How fresh is the data?** Real-time — each run reads Brilliant's own sitemap and course pages directly, and picks up new/updated courses as soon as Brilliant publishes them.

# Actor input Schema

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

Output granularity. `courses` emits one record per course (chapters/lessons nested inside). `lessons` emits one flattened record per lesson.

## `courseSlugs` (type: `array`):

Exact course slugs to fetch (e.g. `how-llms-work`, `pre-algebra`). Leave empty to fetch the entire public course catalog (~65 courses, from Brilliant's own sitemap).

## `keyword` (type: `string`):

Case-insensitive substring match against course title, description, and intro text.

## `accessFilter` (type: `string`):

Filter by whether the course requires a Premium subscription.

## `learningPath` (type: `string`):

Filter by Brilliant's topic taxonomy ("learning path") the course belongs to.

## `minLessonCount` (type: `integer`):

Drop courses with fewer lessons than this.

## `maxLessonCount` (type: `integer`):

Drop courses with more lessons than this.

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

Hard cap on emitted records. The full catalog is ~65 courses (mode=courses) or ~2500 lessons (mode=lessons).

## Actor input object example

```json
{
  "mode": "courses",
  "courseSlugs": [],
  "keyword": "",
  "accessFilter": "",
  "learningPath": "",
  "minLessonCount": 0,
  "maxItems": 65
}
```

# Actor output Schema

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

Dataset containing all scraped Brilliant.org courses or lessons.

# 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",
    "courseSlugs": [],
    "keyword": "",
    "accessFilter": "",
    "learningPath": "",
    "minLessonCount": 0,
    "maxItems": 65
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/brilliant-courses-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 = {
    "mode": "courses",
    "courseSlugs": [],
    "keyword": "",
    "accessFilter": "",
    "learningPath": "",
    "minLessonCount": 0,
    "maxItems": 65,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/brilliant-courses-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 '{
  "mode": "courses",
  "courseSlugs": [],
  "keyword": "",
  "accessFilter": "",
  "learningPath": "",
  "minLessonCount": 0,
  "maxItems": 65
}' |
apify call crawlerbros/brilliant-courses-scraper --silent --output-dataset

```

## MCP server setup

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