Python wrapper for the RateMyProfessors GraphQL API
Project description
rmp-api
A Python library for querying the RateMyProfessors GraphQL API. Search for professors, fetch their ratings, and compute quality signals from the data.
No API key required. No scraping. Requires Python 3.10+.
What it does
- Search for schools and professors by name
- Fetch individual student ratings with comments, grades, tags, and difficulty scores
- Compute quality signals: recency-weighted rating, reliability score, easiness, would-take-again rate
- Compare multiple professors side-by-side on any signal
- Track how a professor's score has changed over time (by year, semester, or quarter)
- Filter ratings by course code, keyword, or delivery format
Documentation
Full docs at docs.aidentran.dev/rmp-api/ (Getting Started, API Reference, Examples, Troubleshooting).
Installation
pip install rmp-api
Or with uv:
uv add rmp-api
Or clone and install locally:
git clone https://github.com/AidenTran900/rmp-api.git
cd rate-my-prof-api
pip install -e .
Quick start
from rmp_api import (
search_schools,
search_professors,
get_professor_summary,
get_all_ratings,
get_courses,
filter_ratings_by_keywords,
compute_score,
)
# 1. Find a school
schools = search_schools("UC Berkeley")
school_id = schools[0].id
# 2. Find a professor
professors = search_professors("John DeNero", school_id)
professor_id = professors[0].id
# 3. Quick aggregate summary (single request, no pagination)
summary = get_professor_summary("John DeNero", school_id)
print(summary.avg_rating) # 4.2
print(summary.avg_difficulty) # 2.8
print(summary.would_take_again_percent) # 92.0
print(summary.link) # https://www.ratemyprofessors.com/professor/...
# 4. Courses taught
courses = get_courses(professor_id)
print(courses[:3]) # [{'courseName': 'CS61A', 'courseCount': 42}, ...]
# 5. All ratings (auto-paginated); filter to a course
ratings = get_all_ratings(professor_id, course_filter="CS61A")
# 6. Filter by keyword
hard_ratings = filter_ratings_by_keywords(ratings, "hard")
# 7. Compute quality signals
score = compute_score(ratings)
print(score.composite_score) # 0.82
print(score.raw_avg_rating) # 4.1
print(score.top_tags[:3]) # [('Respected', 14), ('Clear grading', 11), ...]
Notes
- Uses RateMyProfessors' public GraphQL endpoint. No auth required.
- This wraps an unofficial API!!! It may break if RMP changes their internal schema.
- Ratings are returned newest first.
- Results are cached per process. Call
.cache_clear()onsearch_schools,search_professors, orget_coursesto invalidate. - RMP may rate-limit heavy requests. Add
time.sleep(0.5)between calls when fetching many professors.
Built off snow4060/rmp-api.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rmp_api-0.1.2.tar.gz.
File metadata
- Download URL: rmp_api-0.1.2.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32fae8b3aeb966b51e08e95ab56c0a364b85874ca0a9cf3da5c1b81e520bc873
|
|
| MD5 |
d0cf8a5cb4a66a7bc55a377d99237891
|
|
| BLAKE2b-256 |
86dba81c86751ca59a6a15f2a86d551b6045d5faca65ef350af8975d884e1b59
|
Provenance
The following attestation bundles were made for rmp_api-0.1.2.tar.gz:
Publisher:
release.yml on AidenTran900/rmp-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmp_api-0.1.2.tar.gz -
Subject digest:
32fae8b3aeb966b51e08e95ab56c0a364b85874ca0a9cf3da5c1b81e520bc873 - Sigstore transparency entry: 1628936129
- Sigstore integration time:
-
Permalink:
AidenTran900/rmp-api@541c64f7490380c3fcc76e77a732eebf9c473c7c -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AidenTran900
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@541c64f7490380c3fcc76e77a732eebf9c473c7c -
Trigger Event:
push
-
Statement type:
File details
Details for the file rmp_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rmp_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ae5d51556c0bb5cb3329d90966e6c376fe21e44e7024bbdba88d121d076c7ab
|
|
| MD5 |
2c1e3f9bdf65864388eef04388382135
|
|
| BLAKE2b-256 |
c8ce7e198c7adae36f5e1ac8709d614d878fd1eafebfe76ba0ecf68a0d904295
|
Provenance
The following attestation bundles were made for rmp_api-0.1.2-py3-none-any.whl:
Publisher:
release.yml on AidenTran900/rmp-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmp_api-0.1.2-py3-none-any.whl -
Subject digest:
6ae5d51556c0bb5cb3329d90966e6c376fe21e44e7024bbdba88d121d076c7ab - Sigstore transparency entry: 1628936160
- Sigstore integration time:
-
Permalink:
AidenTran900/rmp-api@541c64f7490380c3fcc76e77a732eebf9c473c7c -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AidenTran900
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@541c64f7490380c3fcc76e77a732eebf9c473c7c -
Trigger Event:
push
-
Statement type: