RateMyProfessors API Client
An unofficial, typed Python client for RateMyProfessors. All data is fetched via RMP's GraphQL API — no HTML scraping or browser automation required.
Disclaimer: This library is unofficial and may break if RMP changes their internal API. Use responsibly and respect rate limits.
Features #
- Strong typing via Pydantic models
- Automatic retries with configurable max attempts
- Token-bucket rate limiting (default 60 req/min)
- In-memory caching for ratings pages
- Cursor-based pagination for all list/search endpoints
- Clear error hierarchy for precise exception handling
- Built-in helpers for ingestion workflows (sentiment, comment validation, course codes)
Requirements #
- Python 3.10 or later
- Works with type checkers (Pydantic models, fully typed API)
Installation #
pip install ratemyprofessors-client
Quick Start #
from rmp_client import RMPClient
with RMPClient() as client:
prof = client.get_professor("2823076")
print(prof.name, prof.overall_rating)
for rating in client.iter_professor_ratings(prof.id):
print(rating.date, rating.quality, rating.comment)
Documentation #
- Usage — Quickstart examples for every endpoint
- Configuration — Tuning retries, rate limits, timeouts, and headers
- API Reference — Full method and type reference
- Extras — Ingestion helpers (sentiment, comment validation, course mapping)