# Ratemyprofessors — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for professors by name and retrieve their ratings, reviews, and detailed profiles — including aggregate scores, difficulty ratings, student tags, and course-level feedback.

**Category:** Education | **Website:** [ratemyprofessors.com/](https://ratemyprofessors.com/) | **Docs:** [parse.bot/marketplace/cc64c1d8-6f42-49b9-b8cd-cf11e058754d/ratemyprofessors-com-api](https://parse.bot/marketplace/cc64c1d8-6f42-49b9-b8cd-cf11e058754d/ratemyprofessors-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-ratemyprofessors-com-api-cc64c1d8/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_professor_by_name

Convenience endpoint to get detailed data for a professor by their full name. Performs a search and returns the full profile of the best matching result. If an exact name match is found in the top 10 results it is preferred; otherwise the first result is used. Returns stale_input with kind 'input_not_found' if no match is found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Full name of the professor to look up |
| `school_id` | string | No | Optional school ID (base64-encoded) to filter the search by a specific school |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ratemyprofessors-com-api-cc64c1d8/get_professor_by_name \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>","school_id":"<string>"}'
```

### get_professor_details

Get detailed ratings, reviews, courses, and tags for a professor by their ID. Accepts either a base64-encoded ID (e.g. 'VGVhY2hlci0xNjA4NzAw') or a legacy numeric ID (e.g. '1608700') which will be auto-converted. Returns aggregate rating stats, top tags, courses taught, and the 5 most recent reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `professor_id` | string | Yes | Professor ID, either base64-encoded (e.g. 'VGVhY2hlci0xNjA4NzAw') or legacy numeric (e.g. '1608700') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ratemyprofessors-com-api-cc64c1d8/get_professor_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"professor_id":"<string>"}'
```

### search_professors

Search for professors by name and optionally filter by school. Returns a list of matching professors with basic rating info. The total field reports the server-side match count (capped at 10000); use limit to control how many results are returned per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return (up to 250) |
| `query` | string | Yes | Professor name to search for |
| `school_id` | string | No | Optional school ID (base64-encoded) to filter results by a specific school |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ratemyprofessors-com-api-cc64c1d8/search_professors \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>","school_id":"<string>"}'
```
