Search professors on Rate My Professors. Send a name such as smith or chen. The response is { results, pagination } for the cards rendered on the first view. Pass results[].id to /v2/ratemyprofessors/professor.
When a card prints them, difficulty and would_take_again_percent are numbers. N/A on the card becomes null.
GET https://api.piloterr.com/v2/ratemyprofessors/search?query=smith
GET https://api.piloterr.com/v2/ratemyprofessors/search?query=chen
GET and POST take the same query. smith includes professor 1064107, Kevin Smith, Psychology at Rio Hondo College, with a numeric difficulty and would-take-again percent. The professor call for 1064107 returns the same id, name, school, difficulty, and percent.
| Parameter |
Required |
Example |
query |
yes |
smith |
query is required. A URL must be on ratemyprofessors.com and look like a professor search (/search/professors or q=). Another host returns 400. There is no page parameter.
The site shows the first cards and a header count. pagination.page is 1. pagination.next is null because further professors load inside the page and the HTML has no next URL. Do not invent one. pagination.per_page is the number of cards parsed, 5 for smith and for chen. pagination.total_results is the count in the header. For smith that header is capped at 10000. pagination.total_pages is null.
Ids are unique on the page.
| Field |
Type |
Meaning |
results[].id |
string |
Professor id |
results[].name |
string |
Name as printed |
results[].url |
string |
https://www.ratemyprofessors.com/professor/{id} |
results[].school |
string or null |
School |
results[].department |
string or null |
Department |
results[].rating |
number or null |
Quality rating |
results[].ratings_count |
number or null |
Number of ratings |
results[].would_take_again_percent |
number or null |
Percent who would take the professor again. null when the card shows N/A |
results[].difficulty |
number or null |
Difficulty. null when the card shows N/A |
pagination.page |
integer |
1 |
pagination.per_page |
integer or null |
Cards returned |
pagination.total_results |
number or null |
Header count, capped by the site |
pagination.total_pages |
null |
No page count |
pagination.next |
null |
No next URL |
- Find id
1064107 for Kevin Smith in Psychology at Rio Hondo College from the keyword smith.
- Compare
difficulty and would_take_again_percent across the first chen cards before opening a profile.
- Keep the header
total_results as the site's capped count, and treat next null as the end of this response.
| Code |
Meaning |
400 |
Empty query or a domain outside ratemyprofessors.com |
401 |
Missing API key |
404 |
The page was not a professor search |
500 |
The fetch failed |
Rate My Professors Professor