API Docs

8f623f8b4ee4e7e1c12e6698a

📡 API Information

Base URL: https://api.catquery.com

GET /health
Description
Returns the health status and metrics of the bot including uptime, memory, CPU usage, channel counts, WebSocket connections, and messages per minute.
Examples
Get health metrics without dependencies (basic status)
GET /health
{
  "status": "ok",
  "uptime": "N/A",
  "memory": "N/A",
  "cpu": "N/A",
  "channelsJoined": 0,
  "totalChannels": 0,
  "ws": 0,
  "msgsPerMin": 0
}
Get health metrics with full bot status
GET /health
{
  "status": "ok",
  "uptime": "2h 34m",
  "memory": "156.3 MB",
  "cpu": "2.5%",
  "channelsJoined": 42,
  "totalChannels": 50,
  "ws": 3,
  "msgsPerMin": 1234
}
GET /nameChanges
Description
Returns the username change history for a specific Twitch user. Requires userId query parameter.
Examples
Get username change history for a user
GET /nameChanges?userId=123456789
{
  "nameChanges": [
    {
      "id": 1,
      "user_id": "123456789",
      "old_username": "oldusername",
      "new_username": "newusername",
      "changed_at": "2025-11-22T10:00:00Z"
    },
    {
      "id": 2,
      "user_id": "123456789",
      "old_username": "previousname",
      "new_username": "oldusername",
      "changed_at": "2025-10-15T08:30:00Z"
    }
  ]
}
Error when userId parameter is missing
GET /nameChanges
{
  "error": "userId parameter is required"
}