GnistAI GnistAI
Log in

Getting Started with University Directory

Search universities worldwide by name and country — domains, web pages, and location.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Education

Data source: Hipolabs Universities API

Overview

University Directory wraps Hipolabs Universities API, handling authentication, pagination, and rate limits for you. This tutorial covers all 2 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-university": {
      "url": "https://context.gnist.ai/mcp/university/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (2)

search_universities

Search universities worldwide by name and/or country. Returns university name, country, domains, and web pages. At least one of name or country should be provided for meaningful results. Args: name: Partial university name to search for. country: Country name to filter by. limit: Maximum number of results to return (default 20). Returns: Dictionary with 'count' and 'universities' list. Each university has name, country, alpha_two_code, state_province, domains, and web_pages.

ParameterTypeRequiredDescription
nameanyoptionalPartial university name to search for (e.g. 'MIT', 'Oxford', 'technol'). Optional.
countryanyoptionalCountry name to filter by (e.g. 'United States', 'Norway', 'Germany'). Optional.
limitintegeroptionalMaximum number of results to return (1-100, default 20). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/university/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_universities", "arguments": {"name": "'MIT'"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/university/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'name': "'MIT'"}, 'name': 'search_universities'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/university/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/university/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does University Directory provide?

Search universities worldwide by name and country — domains, web pages, and location. It exposes 2 tools: search_universities, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the University Directory API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials