Save over 30% when you subscribe to an annual subscription plan!

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.

Checking API status...

/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

  • name  optional

    The 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.

  • country  optional

    The country to filter by. Must be USA or Canada (case-insensitive). At least one filter parameter (excluding offset/limit) must be provided.

  • city  optional premium only

    The city where the university is located.

  • state  optional premium only

    The state or province where the university is located.

  • min_faculty_ratio  optional premium only

    Minimum student-to-faculty ratio as a number (e.g., 15 for 15:1 ratio).

  • max_faculty_ratio  optional premium only

    Maximum student-to-faculty ratio as a number (e.g., 20 for 20:1 ratio).

  • min_enrolled  optional premium only

    Minimum number of enrolled students.

  • max_enrolled  optional premium only

    Maximum number of enrolled students.

  • min_tuition  optional premium only

    Minimum annual tuition cost (in USD).

  • max_tuition  optional premium only

    Maximum annual tuition cost (in USD).

  • offset  optional premium only

    The number of results to skip. Must be zero or a positive integer. Default is 0.

  • limit  optional premium only

    The maximum number of results to return. Must be between 1 and 30. Default is 10 for premium users, fixed at 5 for free users.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

Returns a JSON array of objects, each with the following properties:

  • name

    The full name of the university.

  • degree_types

    An array of degree types offered by the university (e.g., "Bachelor's degree", "Master's degree").

  • address

    The street address of the university.

  • city

    The city where the university is located.

  • state

    The state or province abbreviation where the university is located (e.g., "MA" for Massachusetts).

  • postal_code

    The postal/zip code of the university.

  • country

    The country where the university is located (e.g., "USA", "Canada").

  • county

    The county where the university is located.

  • timezone

    The timezone of the university location (e.g., "EST", "PST").

  • latitude

    The latitude coordinate of the university location.

  • longitude

    The longitude coordinate of the university location.

  • phone

    The contact phone number of the university.

  • email

    The contact email address of the university.

  • website

    The official website URL of the university.

  • institution_type

    The type of institution (e.g., "Private (Not For Profit)", "Public").

  • years

    The typical duration of undergraduate programs (e.g., "4 Years").

  • enrollment

    The number of enrolled students as a string.

  • student_faculty_ratio

    The student-to-faculty ratio (e.g., "7 to 1").

  • tuition

    The annual tuition cost in USD.

Sample Request Live Demo!

name
https://api.api-ninjas.com/v1/university?name=Harvard

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [ { "name": "Harvard University", "degree_types": [ "Associate's degree", "Bachelor's degree", "Postbaccalaureate certificate", "Master's degree", "Post-master's certificate" ], "address": "Massachusetts Hall", "city": "Cambridge", "state": "MA", "postal_code": "02138", "country": "USA", "county": "Middlesex", "timezone": "EST", "latitude": "42.3802", "longitude": "-71.1347", "phone": "(617) 495-1000", "website": "http://www.harvard.edu/", "institution_type": "Private (Not For Profit)", "years": "4 Years", "enrollment": "27651", "student_faculty_ratio": "7 to 1" } ]

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.