A simple API to fetch professor ratings from RateMyProfessors. Code taken from https://github.com/snow4060/rmp-api and translated to Python.
Publicly running version is available at https://rmp.akramb.com/
pip install -r requirements.txt
uvicorn main:app --reloadThe API runs on http://localhost:8000
Note
The {school_id} parameter supports both numeric legacy IDs (e.g., 1452) and RMP's Base64 IDs (e.g., U2Nob29sLTE0NTI=). Numeric IDs are automatically encoded.
Search for schools by name.
Example:
GET /schools/ottawa
Response:
[
{
"id": "U2Nob29sLTE0NTI=",
"legacyId": 1452,
"name": "University of Ottawa",
"city": "Ottawa",
"state": "ON",
"numRatings": 12345,
"avgRatingRounded": 3.5
}
]Get professor rating info.
Query Parameters:
ratings(bool, default:false): Include individual student ratings (comments, scores, etc).related(bool, default:false): Include related professors from the same school.
Example:
GET /professor/U2Nob29sLTE0NTI=/Steve%20Desjardins?ratings=true
Response (found):
{
"found": true,
"id": 14890,
"firstName": "Steve",
"lastName": "Desjardins",
"name": "Steve Desjardins",
"department": "Mathematics",
"school": {
"name": "University of Ottawa",
"id": 1452,
"city": "Ottawa",
"state": "ON"
},
"avgRating": 4.5,
"avgDifficulty": 2.1,
"numRatings": 307,
"wouldTakeAgainPercent": 92.3077,
"courses": [
{ "name": "MAT1320", "count": 98 },
{ "name": "MAT2384", "count": 52 },
{ "name": "MAT1322", "count": 46 }
],
"tags": [
"Tough grader",
"Amazing lectures",
"Respected"
],
"ratings": [
{
"comment": "Great prof, explains things well...",
"clarity": 5,
"helpful": 5,
"difficulty": 3,
"date": "2026-01-13 23:23:51 +0000 UTC",
"class": "MAT1320",
"grade": "D+",
"tags": ["Amazing lectures", "Respected"],
"takeAgain": 1,
"textbook": -1
}
],
"relatedProfessors": []
}Tip
By default, ratings and relatedProfessors are excluded to keep response sizes small.
**Response (not found):**
```json
{
"found": false
}
Both endpoints are rate limited to 15 requests per minute per IP.