Skip to main content

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() on search_schools, search_professors, or get_courses to invalidate.
  • RMP may rate-limit heavy requests. Add time.sleep(0.5) between calls when fetching many professors.

Built off snow4060/rmp-api.

Metadata

Release files for rmp-api 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rmp-api 0.1.2
File Size Uploaded Provenance Actions
rmp_api-0.1.2.tar.gz 38.5 kB With provenance Details for rmp_api-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rmp-api 0.1.2
File Interpreter ABI Platform Actions
rmp_api-0.1.2-py3-none-any.whl Python 3 none any Details for rmp_api-0.1.2-py3-none-any.whl

Total release size: 59.4 kB

Release files / rmp_api-0.1.2.tar.gz

Download URL rmp_api-0.1.2.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
32fae8b3aeb966b51e08e95ab56c0a364b85874ca0a9cf3da5c1b81e520bc873
BLAKE2b-256 checksum
How to use checksums
86dba81c86751ca59a6a15f2a86d551b6045d5faca65ef350af8975d884e1b59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

Release files / rmp_api-0.1.2-py3-none-any.whl

Download URL rmp_api-0.1.2-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ae5d51556c0bb5cb3329d90966e6c376fe21e44e7024bbdba88d121d076c7ab
BLAKE2b-256 checksum
How to use checksums
c8ce7e198c7adae36f5e1ac8709d614d878fd1eafebfe76ba0ecf68a0d904295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

Security for rmp-api 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rmp_api-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page