Discorddiscord.js example below

A CS2 Discord bot in one file.

A /cs2live slash command that posts every match in progress with the map and score, written with discord.js. Add results, transfers and rankings the same way.

  • Slash command example
  • Live, results, transfers
  • 500 free requests / month
GET /cs2/live200 OK
$ curl "https://api.citoapi.com/api/v1/cs2/live" \ -H "x-api-key: $CITO_API_KEY"
{  "data": [    ...    {      "team1Name": "SINNERS",      "team2Name": "Ninjas in Pyjamas",      "currentMap": "de_ancient",      "currentMapScore": { "team1": 3, "team2": 0 },      "currentRound": 3    }  ]}

Seamless Integration with our MCP Server

Give Claude, Cursor and ChatGPT the CS2 data. One command writes the MCP config; agents call live scoreboard, team map stat, opening duel and transfer tools instead of inventing match IDs, and your key stays on your machine.

MCPInstall the Cito MCP server
Claude
Cursor
OpenAI
Python
Cito API
Next.js
Discord
Slack
GitHub

Commands a CS2 server wants

Each command is one API call.

/cs2live

Every match in progress with map score and round.

/results

The latest finished matches.

/schedule

What is on next today.

/rank

The VRS or world ranking top 10.

/player

A player's recent form.

Transfer alerts

Post new roster moves to a channel.

The /cs2live command

Needs DISCORD_TOKEN, DISCORD_APP_ID and CITO_API_KEY.

bot.mjs
// bot.mjs  (discord.js v14, Node 18+)
import { Client, GatewayIntentBits, REST, Routes, SlashCommandBuilder } from "discord.js";

const command = new SlashCommandBuilder().setName("cs2live").setDescription("CS2 matches in progress");
await new REST({ version: "10" })
  .setToken(process.env.DISCORD_TOKEN)
  .put(Routes.applicationCommands(process.env.DISCORD_APP_ID), { body: [command.toJSON()] });

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on("interactionCreate", async (interaction) => {
  if (!interaction.isChatInputCommand() || interaction.commandName !== "cs2live") return;
  const res = await fetch("https://api.citoapi.com/api/v1/cs2/live", {
    headers: { "x-api-key": process.env.CITO_API_KEY },
  });
  const { data } = await res.json();
  const lines = data.slice(0, 10).map(
    (m) =>
      `**${m.team1Name}** ${m.team1Score}-${m.team2Score} **${m.team2Name}** · ` +
      `${m.currentMap ?? "TBA"} ${m.currentMapScore?.team1 ?? 0}-${m.currentMapScore?.team2 ?? 0}`,
  );
  await interaction.reply(lines.join("\n") || "No CS2 matches live right now.");
});

client.login(process.env.DISCORD_TOKEN);

Endpoints you can ship with

The endpoints behind each bot command.

Live matches

Poll the live list for every match in progress, open one match for its round, timer, bomb and players, or keep an SSE stream open and get each update pushed.

View docs
  • GET/api/v1/cs2/live

    Matches in progress: series score, map in play, map score, current round.

  • GET/api/v1/cs2/live/{matchId}/state

    One live match: score, round, round timer, bomb status and players.

  • GET/api/v1/cs2/live/{matchId}/scoreboard

    Series score, current map and round, and each player's kills, deaths, money and equipment.

  • GET/api/v1/cs2/live/{matchId}/rounds

    Round-by-round results so far: winner, side and how each round ended.

  • GET/api/v1/cs2/live/stream

    Server-Sent Events push of every live update. Every plan; counts like polling.

  • GET/api/v1/cs2/live/ws

    WebSocket with a room per match. Scale and Enterprise; Pro with the Live WebSockets add-on.

Frequently asked questions

Bots, limits and alerts

Something missing? Email support@citoapi.com.

How do I make a CS2 Discord bot?

Register a slash command with discord.js and answer it with a call to /cs2/live. The example above is complete.

How many requests does a bot use?

One per command, plus any polling for alerts. A free key has 500 a month; a busy server wants Starter or Pro.

Can the bot post live score updates automatically?

Yes. Poll /cs2/live or listen to /cs2/live/stream, and post when a map score changes.

Can I post transfer news?

Yes. Poll /cs2/transfers/recent and post transfers you have not seen before.

Can I run a public bot on the free plan?

Free is for building and testing. A bot used by other servers needs a paid plan with commercial use.

See pricing

Ship a CS2 live score bot

Get a free key and register /cs2live.