API
Developer
REST API
Reference
Courses

Courses

The courses endpoint allows users to get information on courses offered at UCI.

Get a course with the given course number

Code sample

curl "https://api-next.peterportal.org/v1/rest/courses/COMPSCI162"

Response

{
  "id": "COMPSCI162",
  "department": "COMPSCI",
  "courseNumber": "162",
  "courseNumeric": 162,
  "school": "Donald Bren School of Information and Computer Sciences",
  "title": "Formal Languages and Automata",
  "courseLevel": "Upper Division (100-199)",
  "minUnits": 4,
  "maxUnits": 4,
  "description": "Formal aspects of describing and recognizing languages by grammars and automata.  Parsing regular and context-free languages. Ambiguity, nondeterminism. Elements of computability; Turning machines, random access machines, undecidable problems, NP-completeness.",
  "departmentName": "Computer Science",
  "instructorHistory": ["goodrich", "whayes", "mikes", "vazirani"],
  "prerequisiteTree": {
    "AND": [
      "I&C SCI 6B",
      "I&C SCI 6D",
      {
        "OR": ["MATH 2B", "AP CALCULUS BC"]
      },
      {
        "OR": ["CSE 46", "I&C SCI 46"]
      }
    ]
  },
  "prerequisiteList": [
    "I&C SCI 46",
    "CSE 46",
    "MATH 2B",
    "AP CALCULUS BC",
    "I&C SCI 6B",
    "I&C SCI 6D"
  ],
  "prerequisiteText": "(I&C SCI 46 OR CSE 46) AND (MATH 2B OR AP CALCULUS BC) AND I&C SCI 6B AND I&C SCI 6D",
  "prerequisiteFor": [],
  "repeatability": "",
  "gradingOption": "",
  "concurrent": "",
  "sameAs": "LSCI 102.",
  "restriction": "School of Info & Computer Sci students have first consideration for enrollment. Cognitive Sciences Majors have first consideration for enrollment. Language Science Majors have first consideration for enrollment. Computer Science Engineering Majors have first consideration for enrollment.",
  "overlap": "",
  "corequisites": "",
  "geList": [],
  "geText": "",
  "terms": [
    "2023 Spring",
    "2022 Winter",
    "2021 Spring",
    "2020 Spring",
    "2019 Spring",
    "2018 Winter",
    "2017 Winter",
    "2015 Fall",
    "2015 Winter",
    "2014 Winter"
  ]
}

Get courses that match the specified constraints

Query parameters

department string

The department the course(s) are in.

courseNumber string

The course number of the course(s).

courseNumeric string

The numeric part of the course number of the course(s).

titleContains string

A substring of the courses' titles.

courseLevel ANY | LowerDiv | UpperDiv | Graduate

The course level of the courses. Case-sensitive. Defaults to ANY.

minUnits string

The minimum number of units that can be earned by taking any of the courses.

maxUnits string

The maximum number of units that can be earned by taking any of the courses.

descriptionContains string

A substring of the courses' descriptions.

taughtByInstructors string | string[]

The UCInetID(s) of the instructor(s), one of whom have taught one of the courses.

geCategory ANY | GE-1A | GE-1B | GE-2 | GE-3 | GE-4 | GE-5A | GE-5B | GE-6 | GE-7 | GE-8

The GE category of the courses. Case-sensitive. Defaults to ANY.

taughtInTerms string | string[]

The term(s) in which the course(s) were taught.

Code sample

curl "https://api-next.peterportal.org/v1/rest/courses"

Response

Get all courses belonging to a department
curl "https://api-next.peterportal.org/v1/rest/courses?department=COMPSCI"
[{ "id": "COMPSCI103", "...": "..." }, "..."]
Get all COMPSCI courses with the same numeric part
curl "https://api-next.peterportal.org/v1/rest/courses?department=COMPSCI&courseNumeric=122"
[
  { "id": "COMPSCI122A", "...": "..." },
  { "id": "COMPSCI122B", "...": "..." },
  { "id": "COMPSCI122C", "...": "..." },
  { "id": "COMPSCI122D", "...": "..." }
]
Get all graduate COMPSCI courses
curl "https://api-next.peterportal.org/v1/rest/courses?department=COMPSCI&courseLevel=Graduate"
[{ "id": "COMPSCI200S", "...": "..." }, "..."]
Get all courses taught by mikes and/or eppstein
curl "https://api-next.peterportal.org/v1/rest/courses?taughtByInstructors=mikes,eppstein"
[
  {
    "id": "COMPSCI161",
    "foo": "...",
    "instructorHistory": ["...", "eppstein", "...", "mikes", "..."],
    "bar": "..."
  },
  {
    "id": "COMPSCI162",
    "foo": "...",
    "instructorHistory": ["...", "mikes", "..."],
    "bar": "..."
  },
  {
    "id": "COMPSCI163",
    "foo": "...",
    "instructorHistory": ["...", "eppstein", "..."],
    "bar": "..."
  }
]
Get all GE-2 courses
curl "https://api-next.peterportal.org/v1/rest/courses?geCategory=GE-2"
[{ "id": "ARTHIS55", "...": "..." }, "..."]
Get all COMPSCI upper division courses that were taught in 2023 Spring or 2023 Winter
curl "https://api-next.peterportal.org/v1/rest/courses?department=COMPSCI&courseLevel=UpperDiv&taughtInTerms=2023%20Spring,2023%20Winter"
[
  { "id": "COMPSCI111", "...": "...", "terms": ["2023 Spring", "..."] },
  "...",
  { "id": "COMPSCI116", "...": "...", "terms": ["2023 Winter", "..."] },
  "...",
  {
    "id": "COMPSCI121",
    "...": "...",
    "terms": ["2023 Spring", "2023 Winter", "..."]
  }
]

Get all courses

Code sample

curl "https://api-next.peterportal.org/v1/rest/courses/all"

Response

[
  {
    "id": "ACENG139W",
    "...": "..."
  },
  {
    "id": "ACENG200",
    "...": "..."
  },
  "..."
]