{
  "openapi": "3.0.1",
  "info": {
    "title": "MIT OpenCourseWare Scraper",
    "description": "Scrape MIT OpenCourseWare (ocw.mit.edu) - 2,500+ free MIT courses with full metadata: title, department, level, instructors, topics, resource types, descriptions, and image URLs. Search by keyword, browse by department or level, or fetch a single course by URL.",
    "version": "0.1",
    "x-build-id": "OQ7phXMBLbha6n6jt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~mit-open-course-ware-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-mit-open-course-ware-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~mit-open-course-ware-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-mit-open-course-ware-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~mit-open-course-ware-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-mit-open-course-ware-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byDepartment",
              "byLevel",
              "byUrl"
            ],
            "type": "string",
            "description": "What to scrape. 'search' — text search across all courses; 'byDepartment' — all courses in a department; 'byLevel' — filter by course level; 'byUrl' — single course by its OCW URL.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text keyword search (mode=search). Examples: 'machine learning', 'quantum mechanics', 'algorithms'."
          },
          "department": {
            "title": "Department (mode=byDepartment)",
            "enum": [
              "Aeronautics and Astronautics",
              "Anthropology",
              "Architecture",
              "Athletics, Physical Education and Recreation",
              "Biological Engineering",
              "Biology",
              "Brain and Cognitive Sciences",
              "Chemical Engineering",
              "Chemistry",
              "Civil and Environmental Engineering",
              "Comparative Media Studies/Writing",
              "Concourse",
              "Earth, Atmospheric, and Planetary Sciences",
              "Economics",
              "Edgerton Center",
              "Electrical Engineering and Computer Science",
              "Engineering Systems Division",
              "Experimental Study Group",
              "Global Studies and Languages",
              "Health Sciences and Technology",
              "History",
              "Institute for Data, Systems, and Society",
              "Linguistics and Philosophy",
              "Literature",
              "Materials Science and Engineering",
              "Mathematics",
              "Mechanical Engineering",
              "Media Arts and Sciences",
              "Music and Theater Arts",
              "Nuclear Science and Engineering",
              "Physics",
              "Political Science",
              "Science, Technology, and Society",
              "Sloan School of Management",
              "Special Programs",
              "Urban Studies and Planning",
              "Women's and Gender Studies"
            ],
            "type": "string",
            "description": "Department name to browse. Use exact name from the dropdown or partial name for substring match."
          },
          "level": {
            "title": "Level (mode=byLevel)",
            "enum": [
              "Undergraduate",
              "Graduate"
            ],
            "type": "string",
            "description": "Course level to browse."
          },
          "courseUrl": {
            "title": "Course URL (mode=byUrl)",
            "type": "string",
            "description": "Direct OCW course URL, e.g. https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-spring-2020/"
          },
          "filterDepartment": {
            "title": "Filter by department (search/byLevel modes)",
            "type": "string",
            "description": "Narrow results to a specific department when using search or byLevel mode (substring match on department name)."
          },
          "filterLevel": {
            "title": "Filter by level (search/byDepartment modes)",
            "enum": [
              "",
              "Undergraduate",
              "Graduate"
            ],
            "type": "string",
            "description": "Narrow results to 'Undergraduate' or 'Graduate' when using search or byDepartment mode."
          },
          "minYear": {
            "title": "Min year",
            "minimum": 1990,
            "maximum": 2030,
            "type": "integer",
            "description": "Only include courses taught in or after this year (parsed from the term, e.g. 2010)."
          },
          "maxYear": {
            "title": "Max year",
            "minimum": 1990,
            "maximum": 2030,
            "type": "integer",
            "description": "Only include courses taught in or before this year."
          },
          "containsKeyword": {
            "title": "Contains keyword (post-filter)",
            "type": "string",
            "description": "Case-insensitive substring that must appear in the course title or description."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum number of courses to output. MIT OCW has ~2,500 courses total."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}