University API
The University API provides information about universities in the United States and Canada. Free users can search by name or country - premium users have access to advanced filters including location, enrollment, faculty ratios, and tuition.
From 10,194 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 220ms | 230ms | 292ms | 460ms | 1086ms |
Didn't find what you were looking for? Suggest an improvement
/v1/university GET
https://api.api-ninjas.com/v1/university
Returns information about universities matching the provided filters. At least one filter parameter is required. Free users can use name or country - all other filters are premium-only.
Parameters
nameoptionalThe name of the university to search for. Can be a partial match (e.g., "Harvard" will match "Harvard University"). At least one filter parameter (excluding offset/limit) must be provided.
countryoptionalThe country to filter by. Must be
USAorCanada(case-insensitive). At least one filter parameter (excluding offset/limit) must be provided.cityoptional premium onlyThe city where the university is located.
stateoptional premium onlyThe state or province where the university is located.
min_faculty_ratiooptional premium onlyMinimum student-to-faculty ratio as a number (e.g.,
15for 15:1 ratio).max_faculty_ratiooptional premium onlyMaximum student-to-faculty ratio as a number (e.g.,
20for 20:1 ratio).min_enrolledoptional premium onlyMinimum number of enrolled students.
max_enrolledoptional premium onlyMaximum number of enrolled students.
min_tuitionoptional premium onlyMinimum annual tuition cost (in USD).
max_tuitionoptional premium onlyMaximum annual tuition cost (in USD).
offsetoptional premium onlyThe number of results to skip. Must be zero or a positive integer. Default is
0.limitoptional premium onlyThe maximum number of results to return. Must be between
1and30. Default is10for premium users, fixed at5for free users.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, or an error if the request is unsuccessful. Not every field is returned for every university — fields marked optional below are only included when data is available for that particular record.
nameThe full name of the university.
degree_typesoptionalAn array of degree types offered by the university (e.g., "Bachelor's degree", "Master's degree").
addressoptionalThe street address of the university.
cityThe city where the university is located.
stateThe state or province abbreviation where the university is located (e.g., "MA" for Massachusetts).
postal_codeoptionalThe postal/zip code of the university.
countryoptionalThe country where the university is located (e.g., "USA", "Canada").
countyoptionalThe county where the university is located.
timezoneoptionalThe timezone of the university location (e.g., "EST", "PST").
latitudeoptionalThe latitude coordinate of the university location.
longitudeoptionalThe longitude coordinate of the university location.
phoneThe contact phone number of the university.
emailoptionalThe contact email address of the university. Only returned for some records.
websiteThe official website URL of the university.
institution_typeThe type of institution (e.g., "Private (Not For Profit)", "Public").
yearsoptionalThe typical duration of undergraduate programs (e.g., "4 Years").
enrollmentoptionalThe number of enrolled students as a string.
student_faculty_ratiooptionalThe student-to-faculty ratio (e.g., "7 to 1").
tuitionoptionalThe annual tuition cost in USD. Only returned for records where tuition data is available; frequently omitted.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/university?name=HarvardHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/university?name=Harvard&country=USA" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the University API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the University API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the University API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the University API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What coverage does the University API provide?
The University API returns information about universities in the United States and Canada; you can filter results by setting thecountryparameter to eitherUSAorCanada(case-insensitive). To look up cities or countries more broadly, see the related City API and Country API.How do I search for a specific university by name?
Pass thenameparameter, which supports partial matches (for example, 'Harvard' will match 'Harvard University'), and at least one filter parameter must be provided. Free users can search bynameorcountry, while advanced filters require a premium plan.What fields does the University API response include?
Each result is a JSON object with fields such asname,degree_types,address,city,state,country,latitude,longitude,website,institution_type,enrollment,student_faculty_ratio, andtuition; on a failed request you instead receive an error.Can I filter universities by enrollment, tuition, or location?
Yes, premium users can use advanced filters includingcity,state,min_enrolled,max_enrolled,min_tuition,max_tuition,min_faculty_ratio, andmax_faculty_ratio, plusoffsetandlimitfor pagination; these require a premium plan, which you can start by registering.