ed.gov API: Compare US colleges on College Scorecard
Compares 2 to 5 US colleges from College Scorecard by enrollment, admissions, cost after aid, graduation, 10-year earnings and graduation debt. Missing figures are null; names not found are listed separately.
Unofficial. Not affiliated with or endorsed by ed.gov.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Colleges, required
colleges College names to compare, in the order to display them. Example: ["Ohio State University", "Purdue University"].
- Northwestern University
- Harvard University
- Xyzqzz Imaginary Academy Blorp
List of text 2 to 5 items.
Input as JSON
{ "colleges": [ "Northwestern University", "Harvard University", "Xyzqzz Imaginary Academy Blorp" ]}Output
{ "colleges": [ { "city": "Evanston", "type": "private nonprofit", "state": "IL", "currency_code": "USD", "official_name": "Northwestern University", "federal_school_id": 147767, "scorecard_page_link": "https://collegescorecard.ed.gov/school/?147767-Northwestern-University" , "undergraduate_students": 9201, "acceptance_rate_percent": 7.69, "graduation_rate_percent": 96.53, "median_debt_at_graduation_usd": 15000, "average_annual_cost_after_aid_usd": 29167, "median_earnings_10_years_after_entering_usd": 89363 }, { "city": "Cambridge", "type": "private nonprofit", "state": "MA", "currency_code": "USD", "official_name": "Harvard University", "federal_school_id": 166027, "scorecard_page_link": "https://collegescorecard.ed.gov/school/?166027-Harvard-University" , "undergraduate_students": 7601, "acceptance_rate_percent": 3.65, "graduation_rate_percent": 98.35, "median_debt_at_graduation_usd": 14000, "average_annual_cost_after_aid_usd": 19066, "median_earnings_10_years_after_entering_usd": 101817 } ], "not_found": [ "Xyzqzz Imaginary Academy Blorp" ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"collegescorecard.ed.gov/compare_colleges","input":{"colleges":["Northwestern University","Harvard University","Xyzqzz Imaginary Academy Blorp"]}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "collegescorecard.ed.gov/compare_colleges" , "input": { "colleges": [ "Northwestern University", "Harvard University", "Xyzqzz Imaginary Academy Blorp" ] }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "collegescorecard.ed.gov/compare_colleges" , "input": { "colleges": [ "Northwestern University", "Harvard University", "Xyzqzz Imaginary Academy Blorp" ] } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run collegescorecard.ed.gov/compare_colleges# with {"colleges":["Northwestern University","Harvard University","Xyzqzz Imaginary Academy Blorp"]}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "colleges" ], "properties": { "colleges": { "type": "array", "items": { "type": "string", "minLength": 1 }, "maxItems": 5, "minItems": 2, "description": "College names to compare, in the order to display them. Example: [\"Ohio State University\", \"Purdue University\"]." } }}Output schema
{ "type": "object", "required": [ "colleges", "not_found" ], "properties": { "colleges": { "type": "array", "items": { "type": "object", "required": [ "official_name", "city", "state", "type", "undergraduate_students", "acceptance_rate_percent", "average_annual_cost_after_aid_usd", "graduation_rate_percent", "median_earnings_10_years_after_entering_usd", "median_debt_at_graduation_usd", "currency_code", "scorecard_page_link", "federal_school_id" ], "properties": { "city": { "type": [ "string", "null" ] }, "type": { "type": [ "string", "null" ], "description": "Public, private nonprofit or private for-profit." }, "state": { "type": [ "string", "null" ] }, "currency_code": { "enum": [ "USD" ], "type": "string" }, "official_name": { "type": "string", "description": "Official college name." }, "federal_school_id": { "type": "integer" }, "scorecard_page_link": { "type": "string" }, "undergraduate_students": { "type": [ "integer", "null" ] }, "acceptance_rate_percent": { "type": [ "number", "null" ] }, "graduation_rate_percent": { "type": [ "number", "null" ] }, "median_debt_at_graduation_usd": { "type": [ "number", "null" ] }, "average_annual_cost_after_aid_usd": { "type": [ "number", "null" ], "description": "Average annual net price in US dollars." }, "median_earnings_10_years_after_entering_usd": { "type": [ "number", "null" ] } }, "additionalProperties": false }, "description": "Matched colleges in the same order as the input." }, "not_found": { "type": "array", "items": { "type": "string" }, "description": "Input names without a matching college." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
collegescorecard.ed.gov/compare_colleges- Returns
- official name, city, state, type, undergraduates, acceptance rate, cost after aid, graduation rate, earnings, debt, Scorecard link; names not found
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method collegescorecard.ed.gov/compare_colleges with the inputs above.
Ask your agent
- Compare University of Michigan, UCLA, and UNC Chapel Hill side by side: acceptance rate, average net price after aid, grad rate, and median earnings 10 years out.
- My daughter got into Texas A&M and Georgia Tech — which one has lower student debt at graduation and better earnings? Pull the federal College Scorecard numbers.
- Show me enrollment size, cost after financial aid, and graduation rates for Bowdoin, Williams, Amherst, Middlebury, and Swarthmore.
- Using ed.gov's Scorecard data, how do Arizona State University and University of Arizona stack up on admissions rate and typical debt?
- I'm deciding between Rutgers and Penn State — give me the official data on undergrad population, net cost, completion rate, and post-grad salaries.
See more
Finds a university's QS profile by name and returns its latest QS World University Ranking and overall score, location, student figures, faculty ratio, public tuition ranges and up to five listed subject ranks.
topuniversities.com/get_universityLists the QS World University Rankings, or a QS subject ranking, for an edition and optionally one country, with each university's displayed rank, location, overall score and the indicator scores published for that table.
topuniversities.com/list_university_rankingsLooks up a university on Times Higher Education and returns its latest displayed world ranking, overall and pillar scores, student statistics and subject rankings.
timeshighereducation.com/get_universityCompares the official fuel economy and estimated annual fuel cost of two to four cars by year, make and model, using FuelEconomy.gov. Selects a base version when no trim is given.
fueleconomy.gov/compare_carsGets NCAA college sports games for a date (or, for football, the week containing it) with scores, rankings, live status, TV networks and NCAA game links, optionally for one conference.
ncaa.com/get_scoresCompare two to four G2 software products in your chosen order, with ratings, review counts, pricing, trial availability, and category scores. Pricing and individual scores may be unavailable when G2 does not show them.
g2.com/compare_productsGets the latest NCAA.com Top 25 ranking for a college sport: AP, College Football Playoff, or D1Baseball for baseball. Coaches polls and polls not yet published for the current season are unavailable.
ncaa.com/get_rankingsFinds a school on GreatSchools by name, city and state. Returns its ratings and key facts; anything the profile does not publish is null.
greatschools.org/get_school