Cardiff University Modules API

Module records and module catalogues for taught modules. 5 operation(s), from Cardiff's own ModulesApi contract on the api.data.cardiff.ac.uk gateway (base path /modules/v1).

Operations 5

GET /{code}/occurrences/{occurrence} Returns specified module.
GET /{code}/assessments Returns the assessments for a module
GET /{code} Returns specified module.
GET / List all modules
GET /module-catalogues Returns the module catalogues

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cardiff-modules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cardiff-modules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: The Module API provides a simple interface for applications that want to retrieve lists of modules or information relating to a specific module taught in Cardiff University. Using the Modules API, clients can filter modules by school, language, level and year.
  version: v1
  title: ModulesApi Modules API
  termsOfService: http://www.cardiff.ac.uk/terms/
  contact:
    name: integration@cardiff.ac.uk
  x-operator: institution
  x-source-contract: openapi/_original/cardiff-modules.yaml
  x-rebased:
    date: '2026-08-30'
    rebase-method: derived
    source: openapi/_original/cardiff-modules.yaml
    note: >-
      Repaired by the API Evangelist university pipeline. The refine-openapis per-tag split
      had carried the CoursesApi title, description and base path onto this document; its
      paths come from cardiff-modules.yaml. Title, description and servers[] re-based from that parent.
      Was: title "CoursesApi Assessments Modules API", servers[0] "https://api.data.cardiff.ac.uk/courses/v1".
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.data.cardiff.ac.uk/modules/v1
security:
- default: []
tags:
- name: Modules
paths:
  /{code}/occurrences/{occurrence}:
    get:
      tags:
      - Modules
      summary: Returns specified module.
      description: This endpoint returns the module with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: occurrence
        in: path
        description: Specifies which occurrence to return for the module. Defaults to current year e.g. 14A
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns specified occurrence for the module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      assessments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Assessment'
                      module:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            code:
                              type: string
                            dateOfFirstClass:
                              type: string
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                            level:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            year:
                              type: string
                            subject:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            language:
                              type: string
                            occurrence:
                              type: string
                            type:
                              type: string
                            noOfPeriods:
                              type: string
                            credits:
                              type: string
                            school:
                              type: object
                              properties:
                                parent:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                            occurrenceName:
                              type: string
                            name:
                              type: string
                            semester:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            welshPerc:
                              type: string
                          required:
                          - code
                          - collaborators
                          - credits
                          - language
                          - moduleLeader
                          - name
                          - noOfPeriods
                          - type
                      descriptions:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            text:
                              type: string
                            title:
                              type: string
                          required:
                          - code
                          - text
                          - title
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /{code}/assessments:
    get:
      tags:
      - Modules
      summary: Returns the assessments for a module
      description: This endpoint returns a list of assessments with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: year
        in: query
        description: Academic year, used to filter which assessments are returned. Defaults to current year
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns a list of assessments for the specified module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  meta:
                    $ref: '#/components/schemas/Meta'
                  data:
                    type: object
                    properties:
                      assessments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Assessment'
      security:
      - default: []
      x-auth-type: Application
  /{code}:
    get:
      tags:
      - Modules
      summary: Returns specified module.
      description: This endpoint returns the module with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: year
        in: query
        description: Academic year, used to filter which occurrences are returned. Defaults to current year
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns specified module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      occurrences:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            dateOfFirstClass:
                              type: string
                            credits:
                              type: string
                            year:
                              type: string
                            name:
                              type: string
                            semester:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            occurrence:
                              type: string
                            welshPerc:
                              type: integer
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                          required:
                          - collaborators
                          - credits
                          - dateOfFirstClass
                          - dateOflastClass
                          - moduleLeader
                          - name
                          - occurrence
                          - semester
                          - welshPerc
                          - year
                      module:
                        type: object
                        properties:
                          code:
                            type: string
                          moduleLeader:
                            type: object
                            properties:
                              forename:
                                type: string
                              surname:
                                type: string
                              fullName:
                                type: string
                              title:
                                type: string
                              staffId:
                                type: string
                              username:
                                type: string
                              email:
                                type: string
                          level:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                          school:
                            type: object
                            properties:
                              parent:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                          credits:
                            type: string
                          subject:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                          name:
                            type: string
                          language:
                            type: string
                          noOfPeriods:
                            type: string
                          type:
                            type: string
                        required:
                        - code
                        - credits
                        - language
                        - name
                        - noOfPeriods
                        - type
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /:
    get:
      tags:
      - Modules
      summary: List all modules
      description: The root endpoint returns a list of modules available with the University.
      parameters:
      - name: year
        in: query
        description: Academic year filter, defaults to current year. Defaults to current year
        required: false
        schema:
          type: string
      - name: school
        in: query
        description: Returns modules linked to the specified school code e.g. SOCSI (Social Sciences)
        required: false
        schema:
          type: string
      - name: level
        in: query
        description: Returns modules linked to the specified level code e.g. L4 (Level 4 UG Certificate)
        required: false
        schema:
          type: string
      - name: staffId
        in: query
        description: Returns modules linked to the specified staff member
        required: false
        schema:
          type: string
      - name: subject
        in: query
        description: Returns modules linked to the specified subject code e.g. A300 (Clinical Medicine)
        required: false
        schema:
          type: string
      - name: language
        in: query
        description: Returns modules linked to the specified lenguage
        required: false
        schema:
          type: string
      - name: type
        in: query
        description: 'Filters modules by programme type. Accepted values: P (Postgraduate), R (Research) or U (Undergraduate). (Note: This parameter is case sensitive.)'
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of modules to return
        required: false
        schema:
          type: integer
          default: 500
      - name: offset
        in: query
        description: Offset of modules to return
        required: false
        schema:
          type: integer
      - name: sort
        in: query
        description: Sorts the data by column name, use "-" for descending
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List all modules
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      modules:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            level:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            school:
                              type: object
                              properties:
                                parent:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                            credits:
                              type: string
                            subject:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            name:
                              type: string
                            language:
                              type: string
                            noOfPeriods:
                              type: string
                            type:
                              type: string
                          required:
                          - code
                          - credits
                          - language
                          - moduleLeader
                          - name
                          - noOfPeriods
                          - type
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /module-catalogues:
    get:
      tags:
      - Modules
      summary: Returns the module catalogues
      description: This endpoint returns module catalogues data in json, html or doc format.  Searching by 1. School + Academic year + Level or 2. Module code + Occurence
      parameters:
      - name: school
        in: query
        description: School code e.g. "ARCHI"
        required: false
        schema:
          type: string
      - name: year
        in: query
        description: Academic year e.g. "2023"
        required: false
        schema:
          type: string
      - name: level
        in: query
        description: Level e.g. "L4"
        required: false
        schema:
          type: string
      - name: modulecode
        in: query
        description: Level e.g. "ART028"
        required: false
        schema:
          type: string
      - name: occurrence
        in: query
        description: Level e.g. "23A"
        required: false
        schema:
          type: string
      - name: filetype
        in: query
        description: File type e.g. "html" or "doc". If no input, return as a json data.
        required: false
        schema:
          type: string
      - name: sort
        in: query
        description: Sort string e.g. "code", "-code"
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Module catalogues in json format
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      modules:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            name:
                              type: string
                            type:
                              type: string
                            year:
                              type: string
                            credits:
                              type: string
                            language:
                              type: string
                            assessments:
                              type: array
                              items:
                                $ref: '#/components/schemas/Assessment'
                            descriptions:
                              type: array
                              items:
                                type: object
                                properties:
                                  descCode:
                                    type: string
                                  modCode:
                                    type: string
                                  position:
                                    type: string
                                  rank:
                                    type: string
                                  requiresTranslation:
                                    type: boolean
                                  text:
                                    type: string
                                  title:
                                    type: string
                                  welshHash:
                                    type: string
                                  welshText:
                                    type: string
                            level:
                              type: array
                              items:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  name:
                                    type: string
                            moduleLeader:
                              type: array
                              items:
                                type: object
                                properties:
                                  email:
                                    type: string
                                  forename:
                                    type: string
                                  fullName:
                                    type: string
                                  staffId:
                                    type: string
                                  surname:
                                    type: string
                                  title:
                                    type: string
                                  username:
                                    type: string
                            school:
                              type: array
                              items:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  name:
                                    type: string
                                  parent:
                                    type: string
                            semester:
                              type: array
                              items:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  name:
                                    type: string
                            subject:
                              type: array
                              items:
                                type: object
                                properties:
                                  code:
                                    type: string
                                  name:
                                    type: string
                          required:
                          - code
                          - name
                          - year
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
components:
  schemas:
    Meta:
      type: object
      required:
      - code
      - contentType
      - count
      - errorStatus
      properties:
        code:
          type: integer
          format: int32
        errorMessage:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
        count:
          type: integer
          format: int32
        errorStatus:
          type: boolean
        contentType:
          type: string
      title: meta
    Assessment:
      type: object
      required:
      - code
      - dueDay
      - duePeriod
      - dueWeek
      - examDuration
      - name
      - percentage
      - qualifyingMark
      - seq
      - type
      - typeCode
      properties:
        code:
          type: string
        dueDay:
          type: string
        duePeriod:
          type: string
        dueWeek:
          type: string
        examDuration:
          type: string
        name:
          type: string
        percentage:
          type: string
        qualifyingMark:
          type: string
        seq:
          type: string
        type:
          type: string
        typeCode:
          type: string
      title: assessment
  securitySchemes:
    default:
      type: oauth2
      flows:
        implicit:
          scopes:
            clearing: Allows users to see clearing data.
          authorizationUrl: https://api.data.cardiff.ac.uk/authorize