{"openapi":"3.1.0","info":{"title":"Quadfile friendly API","version":"0.2.0","description":"Task-oriented, no-auth JSON endpoints for source-linked college facts, school search, comparisons, sources, and field definitions. The structured CDS extracts are licensed CC BY 4.0; credit them with: Common Data Set extracts from Quadfile (https://www.quadfile.org), CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Figures as published in each school's Common Data Set. Federal IPEDS, College Scorecard and FSA facts keep their own source credit. The code is MIT-licensed.","license":{"name":"CC BY 4.0","identifier":"CC-BY-4.0"}},"servers":[{"url":"https://www.quadfile.org"}],"paths":{"/api/schools/search":{"get":{"summary":"Search schools","parameters":[{"name":"X-Quadfile-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Short app name (for example my-app-name). Optional. Helps us count API usage by client; no API key is required."},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Name or alias. Required unless ipeds_id is given."},{"name":"ipeds_id","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{6}$"},"description":"Exact lookup by six-digit IPEDS unit id. Takes precedence over q."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"School search results"},"400":{"description":"Missing q (error: missing_query) or malformed ipeds_id (error: invalid_ipeds_id)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/schools/{school_id}/facts":{"get":{"summary":"Get source-labeled school facts","parameters":[{"name":"X-Quadfile-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Short app name (for example my-app-name). Optional. Helps us count API usage by client; no API key is required."},{"name":"school_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"categories","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated categories. Valid: identity, admissions, enrollment, cost, aid, finance, outcomes, sources. Use finance for endowment values and spending (IPEDS Part H, fiscal years 2020+); unknown categories are ignored."}},{"name":"fields","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated field keys. V1 keys include: city, state, coverage_status, undergraduate_enrollment, applied, admitted, enrolled_first_year, acceptance_rate, yield_rate, sat_composite_p50, act_composite_p50, sat_submit_rate, act_submit_rate, ed_offered, ed_applicants, ed_admitted, ea_offered, wait_list_offered, avg_net_price, net_price_0_30k, pell_grant_rate, federal_loan_rate, non_need_aid_share_first_year_ft, avg_non_need_grant_first_year_ft, retention_rate_ft, graduation_rate_6yr, earnings_10yr_median, median_debt_completers, nonpayment_rate"}}],"responses":{"200":{"description":"Facts with provenance","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"school_id":{"type":"string"},"facts":{"type":"array","items":{"$ref":"#/components/schemas/PublicFact"}}}}}}},"308":{"description":"308 redirect to the same endpoint under the canonical school_id, when the requested slug is an alias. Follow redirects.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"description":"No recognized categories (error: invalid_categories)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Unknown school (error: school_not_found)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/schools/{school_id}/sources":{"get":{"summary":"Get source ledger for a school","parameters":[{"name":"X-Quadfile-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Short app name (for example my-app-name). Optional. Helps us count API usage by client; no API key is required."},{"name":"school_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Source ledger"},"308":{"description":"308 redirect to the same endpoint under the canonical school_id, when the requested slug is an alias. Follow redirects.","headers":{"Location":{"schema":{"type":"string"}}}},"404":{"description":"Unknown school","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/compare":{"get":{"summary":"Compare schools across friendly fact fields","parameters":[{"name":"X-Quadfile-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Short app name (for example my-app-name). Optional. Helps us count API usage by client; no API key is required."},{"name":"schools","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated canonical school IDs. At most 25 are read; extras are ignored."}},{"name":"categories","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated categories. Valid for compare: identity, admissions, enrollment, cost, aid, outcomes, sources. The finance category is facts-only (per-school endpoint), not comparable."}},{"name":"fields","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sparse comparison matrix"},"400":{"description":"missing_schools, invalid_categories, or unsupported_categories (finance is not comparable)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/facts/{school_id}":{"get":{"summary":"Flat quick-citation facts for one school (deprecated)","deprecated":true,"description":"Deprecated: use /api/schools/{school_id}/facts. Flat summary of the most recent extracted Common Data Set filing (applied, admitted, enrolled, acceptance and yield rates, source URLs). Counts come from the year-aware projection, which covers 2024-25 and later filings; older filings return null counts. The raw block keeps legacy keys but fills them only where the CDS question number means what the key says for that year (see raw_note).","parameters":[{"name":"X-Quadfile-Client","in":"header","required":false,"schema":{"type":"string"},"description":"Short app name (for example my-app-name). Optional. Helps us count API usage by client; no API key is required."},{"name":"school_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Flat fact object","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"school_id":{"type":"string"},"school_name":{"type":"string"},"cds_year":{"oneOf":[{"type":"string"},{"type":"null"}]},"applied":{"oneOf":[{"type":"integer"},{"type":"null"}]},"admitted":{"oneOf":[{"type":"integer"},{"type":"null"}]},"enrolled":{"oneOf":[{"type":"integer"},{"type":"null"}]},"acceptance_rate_pct":{"oneOf":[{"type":"number"},{"type":"null"}]},"yield_rate_pct":{"oneOf":[{"type":"number"},{"type":"null"}]},"deprecated":{"type":"boolean"},"replacement":{"type":"string"},"raw_note":{"type":"string"},"source_url":{"oneOf":[{"type":"string"},{"type":"null"}]},"archive_url":{"type":"string"},"raw":{"type":"object","additionalProperties":true}}}}}},"308":{"description":"308 redirect to the same endpoint under the canonical school_id, when the requested slug is an alias. Follow redirects.","headers":{"Location":{"schema":{"type":"string"}}}},"404":{"description":"No extracted filing (error: school_not_found_or_not_extracted)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/mcp":{"post":{"summary":"MCP Streamable HTTP endpoint","description":"JSON-RPC MCP server. Paste https://www.quadfile.org/api/mcp as a Claude custom connector. No API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"JSON-RPC result"}}}},"/api/fields":{"get":{"summary":"List V1 friendly field definitions","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","description":"Single category filter. Valid: identity, admissions, enrollment, cost, aid, finance, outcomes, sources."}}],"responses":{"200":{"description":"Field dictionary"}}}},"/api/snapshots":{"get":{"summary":"List public snapshot files","description":"Links to schools.jsonl, school_facts.jsonl, sources.jsonl, and field_dictionary.json. Files are usually regenerated from live data within the hour (check generated_at); the dated path is an alias, not a frozen copy.","responses":{"200":{"description":"Snapshot manifest links"}}}}},"components":{"schemas":{"PublicFact":{"type":"object","additionalProperties":true,"required":["key","label","value","display_value","unit","category","source","quality"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"display_value":{"type":"string"},"unit":{"oneOf":[{"type":"string"},{"type":"null"}]},"category":{"type":"string"},"source":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"quality":{"type":"object","properties":{"flag":{"type":"string"},"note":{"oneOf":[{"type":"string"},{"type":"null"}]}}}}}}}}