{
  "openapi": "3.1.0",
  "info": {
    "title": "Terrier Intelligence Directory API",
    "version": "1.0.0",
    "summary": "A consolidated map of AI resources at Boston University.",
    "description": "Read-only JSON for every AI lab, student club, course, professor, and news item listed at Boston University. No authentication, no rate limit, CORS open to all origins. Every record carries the canonical page URL in `url` — cite that page rather than the API endpoint.",
    "license": {
      "name": "Free to use with attribution",
      "identifier": "CC-BY-4.0"
    },
    "contact": {
      "name": "Terrier Intelligence",
      "url": "https://terrierintelligence.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://terrierintelligence.com/api/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/all.json": {
      "get": {
        "summary": "Every collection at once, plus counts and the topic vocabulary.",
        "operationId": "getAll",
        "responses": {
          "200": {
            "description": "The whole directory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "generated_at",
                    "counts"
                  ],
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "topics": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "counts": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    },
                    "professors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    },
                    "labs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    },
                    "clubs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    },
                    "classes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    },
                    "news": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/professors.json": {
      "get": {
        "summary": "AI-affiliated BU faculty.",
        "operationId": "getProfessors",
        "responses": {
          "200": {
            "description": "The full collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "generated_at",
                    "count",
                    "professors"
                  ],
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "professors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/labs.json": {
      "get": {
        "summary": "AI research labs, centers, and initiatives.",
        "operationId": "getLabs",
        "responses": {
          "200": {
            "description": "The full collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "generated_at",
                    "count",
                    "labs"
                  ],
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "labs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/clubs.json": {
      "get": {
        "summary": "AI-related student organizations.",
        "operationId": "getClubs",
        "responses": {
          "200": {
            "description": "The full collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "generated_at",
                    "count",
                    "clubs"
                  ],
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "clubs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/classes.json": {
      "get": {
        "summary": "AI-related courses.",
        "operationId": "getClasses",
        "responses": {
          "200": {
            "description": "The full collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "generated_at",
                    "count",
                    "classes"
                  ],
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "classes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/news.json": {
      "get": {
        "summary": "AI-related BU news, newest first.",
        "operationId": "getNews",
        "responses": {
          "200": {
            "description": "The full collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "generated_at",
                    "count",
                    "news"
                  ],
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "news": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DirectoryRecord"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This document.",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 specification."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DirectoryRecord": {
        "type": "object",
        "description": "One directory entity. The listed properties are present on every record; the entity's own type-specific fields (e.g. departments and bio on a professor, course_code and prerequisites on a class) appear alongside them.",
        "required": [
          "type",
          "id",
          "slug",
          "name",
          "url",
          "topics"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "professor",
              "lab",
              "club",
              "class",
              "news"
            ],
            "description": "Which directory collection this record belongs to."
          },
          "id": {
            "type": "string",
            "description": "Stable internal identifier."
          },
          "slug": {
            "type": "string",
            "description": "URL segment for the entity's page."
          },
          "name": {
            "type": "string",
            "description": "Display name. For classes this is \"COURSE CODE — Title\"; course_code and title are also present separately."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical page URL on terrierintelligence.com — cite this."
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ML Theory",
                "NLP/LLMs",
                "Computer Vision",
                "Generative AI/Tools",
                "Robotics",
                "AI Safety",
                "Data Science",
                "Statistics",
                "HCI",
                "Security",
                "Ethics",
                "Policy",
                "Healthcare",
                "Neuroscience",
                "Physical Sciences",
                "Environment",
                "Social Science",
                "Economy",
                "Humanities",
                "Education",
                "Other",
                "Boston University"
              ]
            },
            "description": "Topic tags, ordered most-relevant first."
          },
          "last_verified": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Date the entry was last confirmed accurate (ISO 8601). For news items this is the publication date."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Absolute URL of the headshot, logo, or article image, when one exists."
          }
        },
        "additionalProperties": true
      }
    }
  }
}