API & MCP

Two read-only ways into GetCourt data: a plain JSON API and an MCP server for AI assistants.

Both return exactly what an upcoming game already shows on the site — sport, level, time, court and how many spots are left. Games on courts that are still in moderation are never returned.

JSON API

No key and no session needed — the games list is public.

GET https://getcourt.co/api/v1/games
GET https://getcourt.co/api/v1/games/:id

Query parameters

Parameter Meaning
city City name as it appears on the court, e.g. Belgrade. Can be repeated.
sport Sport name, e.g. Tennis, Padel, Squash.
skill_level Skill level, e.g. Beginner.
with_spots true — only games that still have a free spot.
urgent true — only games with an urgent player search.
from Earliest date, ISO 8601 (YYYY-MM-DD).
to Latest date, ISO 8601 (YYYY-MM-DD).
upcoming false — include games that have already been played. Upcoming only by default.
limit How many games to return: 1–100, 25 by default.

Recurring games always pass the date filters: their next occurrence is computed on the fly rather than stored, so an answer can contain a game outside the requested range.

Request

curl "https://getcourt.co/api/v1/games?city=Belgrade&sport=Tennis&with_spots=true&limit=2"

Response

{
  "games": [
    {
      "id": 1042,
      "date": "2026-09-12",
      "time": "19:00",
      "duration_minutes": 90,
      "recurring": false,
      "sport": "Tennis",
      "skill_level": "Intermediate",
      "surface": "Hard",
      "environment": "outdoor",
      "kind": "game",
      "with_coach": false,
      "urgent_player_search": true,
      "comment": "Doubles, bring a spare ball",
      "players": { "taken": 3, "total": 4, "spots_left": 1 },
      "court": {
        "id": 17,
        "name": "Tennis Club Ada",
        "city": "Belgrade",
        "country_code": "RS",
        "latitude": 44.79,
        "longitude": 20.41,
        "indoor": false,
        "outdoor": true,
        "free": false,
        "url": "https://getcourt.co/courts/17"
      },
      "url": "https://getcourt.co/games/1042"
    }
  ]
}

Participants never leave the app: the answer says how many spots are taken, never who took them.

MCP server

The same data as a Model Context Protocol server, so an assistant can look for games itself instead of reading pages.

  • Endpoint: POST /mcp, Streamable HTTP over JSON-RPC 2.0, batches included.
  • Protocol versions: 2025-06-18, 2025-03-26, 2024-11-05.
  • Authorisation: Authorization: Bearer <token>. A missing or wrong token answers 401. While not a single token has been issued, the endpoint is off entirely and answers 404.
  • Getting a token: issue it yourself in Account → Security once your email is verified or Telegram is linked. It lasts six months from your last request, so a token in use never expires — and you can revoke it there at any time.

Tools

Tool Meaning
search_games Search upcoming games by city, sport, level, date range, free spots and urgent search.
get_game Fetch one game by its numeric id.

Client configuration

Most MCP clients take a JSON config like this:

{
  "mcpServers": {
    "getcourt": {
      "type": "http",
      "url": "https://getcourt.co/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

Or call it directly

curl -X POST https://getcourt.co/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"search_games","arguments":{"city":"Belgrade","with_spots":true}}}'

Limits

  • JSON API: 60 requests per minute per IP.
  • MCP: 120 requests per minute per IP — one question usually costs several calls.
  • Both are read-only: nothing here creates a game or joins one.