# MIT OpenCourseWare API

> MIT OpenCourseWare returns course listings and materials as a workflow and API.

MIT OpenCourseWare finds courses by required topic or search words and orders matches by relevance. Search courses can filter by level or lecture videos and returns course details and available materials.

- Page: https://fous.com/tools/mit-opencourseware
- Handle: `@mit-opencourseware`
- Category: [Education](https://fous.com/tools/category/education)
- Source website: https://ocw.mit.edu
- Last verified: Sep 29, 2026

## Methods

### Search courses

Operation `search_courses`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find free MIT OpenCourseWare courses on a topic, in relevance order. Optionally limit to a course level or courses with lecture videos.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `level` | string | no | `"undergraduate"` | Course level, for example undergraduate. |
| `topic` | string | yes | `"linear algebra"` | Topic or search words, for example linear algebra. |
| `max_results` | integer | no | `5` | Maximum courses to return, for example 20. |
| `with_video_lectures` | boolean | no | `true` | Only include courses with lecture videos, for example true. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "level": {
      "enum": [
        "any",
        "undergraduate",
        "graduate"
      ],
      "type": "string",
      "default": "any",
      "description": "Course level, for example undergraduate.",
      "examples": [
        "undergraduate",
        "graduate"
      ]
    },
    "topic": {
      "type": "string",
      "minLength": 1,
      "description": "Topic or search words, for example linear algebra.",
      "examples": [
        "linear algebra",
        "quantum mechanics",
        "zxqvnonexistent543210"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum courses to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        5
      ]
    },
    "with_video_lectures": {
      "type": "boolean",
      "default": false,
      "description": "Only include courses with lecture videos, for example true.",
      "examples": [
        true
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "level": "undergraduate",
      "topic": "linear algebra",
      "max_results": 5,
      "with_video_lectures": true
    },
    {
      "topic": "linear algebra"
    },
    {
      "level": "graduate",
      "topic": "quantum mechanics",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `courses` | array |  | Matching courses in relevance order. |
| `courses[].level` | string or null | `"Undergraduate"` |  |
| `courses[].title` | string | `"Linear Algebra"` |  |
| `courses[].department` | string or null | `"Mathematics"` |  |
| `courses[].course_link` | string | `"https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/"` |  |
| `courses[].description` | string or null | `"This course covers matrix theory and linear algebra, emphasizing topics useful in other disciplines such as physics, ec` |  |
| `courses[].instructors` | array |  |  |
| `courses[].course_number` | string or null | `"18.06SC"` |  |
| `courses[].semester_year` | string or null | `"Fall 2011"` |  |
| `courses[].available_materials` | array |  |  |

**Example input**

```json
{
  "level": "undergraduate",
  "topic": "linear algebra",
  "max_results": 5,
  "with_video_lectures": true
}
```

**Example output**

```json
{
  "courses": [
    {
      "level": "Undergraduate",
      "title": "Linear Algebra",
      "department": "Mathematics",
      "course_link": "https://ocw.mit.edu/courses/18-06sc-linear-algebra-fall-2011/",
      "description": "This course covers matrix theory and linear algebra, emphasizing topics useful in other disciplines such as physics, economics and social sciences, natural sciences, and engineering. It parallels the …",
      "instructors": [
        "Prof. Gilbert Strang"
      ],
      "course_number": "18.06SC",
      "semester_year": "Fall 2011",
      "available_materials": [
        "Lecture Videos",
        "Lecture Notes",
        "Problem-solving Videos"
      ]
    },
    {
      "level": "Undergraduate",
      "title": "Linear Algebra",
      "department": "Mathematics",
      "course_link": "https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/",
      "description": "This is a basic subject on matrix theory and linear algebra. Emphasis is given to topics that will be useful in other disciplines, including systems of equations, vector spaces, determinants, eigenval…",
      "instructors": [
        "Prof. Gilbert Strang"
      ],
      "course_number": "18.06",
      "semester_year": "Spring 2010",
      "available_materials": [
        "Lecture Videos",
        "Instructor Insights",
        "Problem Sets"
      ]
    },
    {
      "level": "Undergraduate",
      "title": "A Vision of Linear Algebra",
      "department": "Mathematics",
      "course_link": "https://ocw.mit.edu/courses/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/",
      "description": "This collection of videos presents Professor Strang’s updated vision of how linear algebra could be taught.",
      "instructors": [
        "Prof. Gilbert Strang"
      ],
      "course_number": "RES.18-010",
      "semester_year": "Spring 2020",
      "available_materials": [
        "Lecture Videos"
      ]
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@mit-opencourseware",
  "visibility": "public",
  "operation": "search_courses",
  "version": 1,
  "input": {
    "level": "undergraduate",
    "topic": "linear algebra",
    "max_results": 5,
    "with_video_lectures": true
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@mit-opencourseware\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_courses\",\n  \"version\": 1,\n  \"input\": {\n    \"level\": \"undergraduate\",\n    \"topic\": \"linear algebra\",\n    \"max_results\": 5,\n    \"with_video_lectures\": true\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@mit-opencourseware",
  "visibility": "public",
  "operation": "search_courses",
  "version": 1,
  "input": {
    "level": "undergraduate",
    "topic": "linear algebra",
    "max_results": 5,
    "with_video_lectures": true
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/mit-opencourseware`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_courses`: Search courses. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-mit-opencourseware https://api.fous.com/mcp/tools/mit-opencourseware --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find MIT courses on a subject
- Identify courses with lecture videos
- Compare courses by level and department
- Review course instructors and available materials

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this MIT OpenCourseWare tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a MIT OpenCourseWare account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from ocw.mit.edu when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What MIT courses cover a topic?

Search courses finds matching courses for a required topic or search words, ordered by relevance.

### Which courses include lecture videos?

Search courses can return only courses with lecture videos when that filter is enabled.

### What materials are available for a course?

Search courses returns available materials for each matching course.

## Related

- [Coursera API](https://fous.com/tools/coursera.md): Coursera offers courses, certificates, projects, and degrees; search results follow Coursera’s order, and publicly displayed prices and availability may vary by location.
- [Class Central API](https://fous.com/tools/class-central.md): Find online courses across learning platforms.
- [Udemy API](https://fous.com/tools/udemy.md): Online courses in professional and personal skills.
- [Open Library API](https://fous.com/tools/open-library.md): Open Library returns book search results, catalog details, and author works; availability reflects listed editions, not current loan availability, and catalog details may be missing.
- [College Scorecard API](https://fous.com/tools/college-scorecard.md): College Scorecard returns US college costs and outcomes, including admissions, graduation, debt, and earnings; some figures may be missing, and comparisons cover 2–5 colleges.
- [OpenAlex API](https://fous.com/tools/openalex.md): OpenAlex is an open catalog of scholarly research and connections, offering ranked papers and institution research summaries with annual output, leading topics, and coauthors.
- [QS Top Universities API](https://fous.com/tools/qs-top-universities.md): QS Top Universities provides rankings and profiles with latest world ranks, student figures, up to five subject ranks and listed tuition; subject editions may differ.
- [Open Charge Map API](https://fous.com/tools/open-charge-map.md): Public electric-vehicle charging location listings.
- [All Education tools](https://fous.com/tools/category/education)
