# BestColleges Program Rankings & Tuition Scraper (`nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper`) Actor

Scrape ranked US college programs and school profiles from BestColleges (bestcolleges.com). Fetch ranked schools with tuition, admission rates, retention, and earnings data; school profiles; or program pages from subject hubs.

- **URL**: https://apify.com/nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, Lead generation, Jobs
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## BestColleges Program Rankings & Tuition Scraper

Scrape **BestColleges** — the US college rankings and school-data site at [bestcolleges.com](https://www.bestcolleges.com). Fetch ranked schools from any program ranking page (computer science, nursing, business, psychology, and 60+ more), pull detailed school profiles, and enumerate program pages from subject hubs. No auth, no proxy.

### What this actor does

- **Three modes:** `byProgram` (ranked schools), `bySchool` (profile), `bySubject` (program enumeration)
- **Ranking data:** rank, superlative ("Best for…"), program links, ranking year
- **School stats:** in/out-of-state tuition (undergrad + grad), admission rate, retention rate, earnings after 6 years, online-enrollment share, accreditation
- **Filters:** rank range, US state codes, ranking school year
- **Empty fields are omitted**

### Output per ranked school (mode=byProgram)

- `rank` — position in the ranking
- `schoolId`, `rankingId`
- `schoolName`, `city`, `stateName`, `stateCode`
- `schoolUrl`, `programUrl`, `programName`
- `superlativeTitle` — e.g. "Best for Personalized Portfolio-Building"
- `undergradTuitionInState`, `undergradTuitionOutOfState`, `gradTuitionInState`, `gradTuitionOutOfState`
- `admissionRate`, `retentionRate`, `earningsAfterSixYears`, `totalStudentsEnrolled`
- `percentOnlineEnrollment`, `percentOnlinePrograms`
- `schoolLevel`, `accreditation`, `isPrivate`
- `blurb` — editor's summary
- `rankingName`, `schoolYear`, `rankingType`, `rankingStatus`
- `sourceUrl`
- `recordType`, `scrapedAt`

#### Output per school profile (mode=bySchool)

- `schoolId`, `title`, `blurb`, `image`
- `city`, `state`, `stateCode`, `url`
- `inStateTuitionUndergrad`, `outOfStateTuitionUndergrad`, `inStateTuitionGrad`, `outOfStateTuitionGrad`
- `totalEnrollmentUndergrad`, `totalEnrollmentGrad`, `percentAdmittedUndergrad`
- `totalBachelorsPrograms`, `graduationRateTotalCohort`, `studentFacultyRatio`, `fulltimeRetentionRate`
- `percentOnlineEnrollment`
- `isPremium`, `isPrivate`, `notForProfit`, `isHbcu`, `militaryFriendly`
- `religiousAffiliation`, `generalizedReligiousTerm`, `accreditorStatus`, `admissionTestScores`, `openAdmissionPolicy`, `hasHlf`
- `sourceUrl`
- `recordType`, `scrapedAt`

#### Output per program page (mode=bySubject)

- `uri`, `title`, `sourceUrl`
- `recordType`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `byProgram` | `byProgram` / `bySchool` / `bySubject` |
| `programUri` | string | `computer-science/bachelors` | Ranking page path (mode=byProgram) |
| `schoolUri` | string | – | School profile path (mode=bySchool) |
| `subjectUri` | string | – | Subject hub path (mode=bySubject) |
| `rankMin` | int | – | Keep ranks ≥ this |
| `rankMax` | int | – | Keep ranks ≤ this (top-N) |
| `stateCodes` | array | – | US state codes, e.g. `["NY","CA"]` |
| `schoolYear` | int | – | Ranking year, e.g. `2026` |
| `maxItems` | int | `50` | Hard cap (1–1000) |

#### Example: top-20 online CS bachelor's programs

```json
{
  "mode": "byProgram",
  "programUri": "computer-science/bachelors",
  "rankMax": 20
}
```

#### Example: all ranked nursing schools in NY and CA

```json
{
  "mode": "byProgram",
  "programUri": "nursing/bachelors",
  "stateCodes": ["NY", "CA"]
}
```

#### Example: school profile

```json
{
  "mode": "bySchool",
  "schoolUri": "university-of-colorado-boulder"
}
```

#### Example: enumerate finance programs from a subject hub

```json
{
  "mode": "bySubject",
  "subjectUri": "business/bachelors"
}
```

### Use cases

- **Higher-ed research** — compare program rankings and school stats side by side
- **Counseling / advising** — shortlist schools by cost, admission rate, and outcomes
- **Market analysis** — track tuition and enrollment trends across ranking years
- **Content pipelines** — feed ranking pages into guides and comparison tools
- **Prospective students** — filter ranked schools by state and affordability

### FAQ

**What is BestColleges?** An independent publisher of US college rankings, program guides, and school profiles (bestcolleges.com).

**Do I need an account or API key?** No. All modes read public page data.

**Where does the data come from?** Each ranking page embeds its full ranking JSON (schools, ranks, stats) directly in the page; school profiles embed their stats the same way. The actor reads those embedded payloads.

**How do I find ranking page paths?** Browse bestcolleges.com — e.g. `/computer-science/bachelors/`, `/nursing/masters/`, `/business/bachelors/finance/`. Use `bySubject` on a hub like `/business/bachelors/` to enumerate the program pages in that section.

**Why are some tuition fields missing?** Schools that don't report a figure simply omit it; empty fields are always dropped.

**What does `superlativeTitle` mean?** BestColleges' editors tag each ranked school with a reason it was chosen, e.g. "Best for Working Adults".

**How fresh is the data?** BestColleges publishes annual rankings; each page carries its ranking year (`schoolYear`) so you can filter by edition.

**Is this affiliated with BestColleges?** No, this is a third-party actor using the public website.

### Limitations

- Only pages that carry embedded rankings work with `byProgram` (program ranking pages). State resource pages and blog articles contain no ranking data.
- `bySubject` enumerates links from the hub page's HTML; deep program pages under other sections may need their own hub paths.
- The internal school-search API (`api.mobius.highereducation.com`) requires a session token from the site and is not used; school discovery happens through ranking pages and subject hubs instead.
- `bySchool` currently returns 0 records for most school slugs: bestcolleges.com's `/schools/{slug}/` pages are served as a client-side-rendered shell (a site-side server error — the HTTP 200 page carries no profile data). The actor reports a status message in that case. School data remains fully available through `byProgram` (which carries tuition, admission rate, earnings, and accreditation per school).
- Some program hubs (e.g. `business/bachelors`) intermittently serve the same empty shell from datacenter IPs; the actor retries those fetches automatically, and pages that stay broken produce a clean 0 with a status message.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

## `programUri` (type: `string`):

Ranking page path, e.g. `computer-science/bachelors`, `nursing/masters`, `business/bachelors/finance`, or a full URL.

## `schoolUri` (type: `string`):

School profile path, e.g. `university-of-colorado-boulder`, or a full URL.

## `subjectUri` (type: `string`):

Subject hub path, e.g. `business/bachelors`, `healthcare`, `nursing`, or a full URL.

## `rankMin` (type: `integer`):

Drop schools ranked worse than this (lower is better).

## `rankMax` (type: `integer`):

Drop schools ranked better than this (e.g. `10` keeps only the top 10).

## `stateCodes` (type: `array`):

Only emit schools in these US states (e.g. `NY`, `CA`).

## `schoolYear` (type: `integer`):

Only emit schools from this ranking year (e.g. `2026`).

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "byProgram",
  "programUri": "computer-science/bachelors",
  "stateCodes": [],
  "maxItems": 50
}
```

# Actor output Schema

## `schools` (type: `string`):

Dataset containing all scraped BestColleges school records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "byProgram",
    "programUri": "computer-science/bachelors",
    "stateCodes": [],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "byProgram",
    "programUri": "computer-science/bachelors",
    "stateCodes": [],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "byProgram",
  "programUri": "computer-science/bachelors",
  "stateCodes": [],
  "maxItems": 50
}' |
apify call nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/bestcolleges-program-rankings-and-tuition-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uCkGJlviVUcd8Xosy/builds/2hMc1gcIW9qB77gY8/openapi.json
