Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 2.05 KB

File metadata and controls

69 lines (53 loc) · 2.05 KB

Bilkent Offerings API

A simple Spring Boot API that scrapes course offerings data from Bilkent STARS website and provides it in JSON format.

The scraper uses Selenium WebDriver to load the course list, click through interactive elements, and extract section details.

Scrapes real-time data from STARS and returns clean JSON of course offerings. Scraper also uses a Redis cache to cache recent responses for low latency.

API Endpoints

GET /api/{department}

Path Parameter:

Parameter Type Required Description
department String Yes Department code (e.g., CS, ME, EE)

Query Parameters:

Parameter Type Required Default Description
courseCode String No "" Optional course code (e.g., 102) — if provided, returns only sections for this course
section String No all All sections are shown at default
semester String No 20243 Semester code — defaults to 20243

Redis Cache

  • Technology: Redis
  • Purpose: Cache recently scraped course sections for faster response and reduced scraping.
  • TTL: Cached results expire after 5 minutes by default.

Cache key structure:

courseSections::{department}:{courseCode}:{semester}:{section}

Example Request

http GET /api/CS?courseCode=102&section=1&semester=20243

Example Response

[
  {
    "courseCode": "CS 102",
    "section": 1,
    "instructor": "John Doe",
    "capacity": 60,
    "enrolled": 15,
    "available": 45
  },
  {
    "courseCode": "CS 102",
    "section": 2,
    "instructor": "John Doe",
    "capacity": 50,
    "enrolled": 40,
    "available": 10
  }
]

Notes