Overview
The IRC4Fun API provides programmatic access to IRC network data, account management, and WebServ integration. All endpoints return JSON responses and follow REST conventions.
Base URL: https://irc4fun.net/api/
Authentication
Endpoints are organised into three security tiers. Public endpoints need no authentication.
Token and staff endpoints require an API token sent via the
Authorization header:
Obtaining a Token
- Go to Account Settings → API Tokens.
- Create a new token. Copy the full token immediately — it is shown only once.
- Your token starts with zero endpoint access. An administrator must grant your token permission to specific endpoints via the admin panel.
Even after a token is created, each individual endpoint must be approved before the token can use it. This ensures administrators retain full control over what every integration can access.
Security Tiers
| Tier | Auth Required | Description |
|---|---|---|
| PUBLIC | None | General network info — channels, servers, commands, stats |
| TOKEN | API token + admin approval | Sensitive data — user lists, opers, credential checks |
Public Endpoints
No authentication required. Available to everyone.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/irc/stats/ |
Network statistics (users, channels, opers online) |
| GET | /api/irc/latency/ |
Server latency measurements |
| GET | /api/irc/channels/ |
List all visible channels |
| GET | /api/irc/channels/{name}/ |
Details for a specific channel |
| GET | /api/irc/servers/ |
List linked servers |
| GET | /api/irc/servers/{name}/ |
Details for a specific server |
| GET | /api/irc/commands/ |
Available IRC service commands |
Token-Required Endpoints
Require a valid API token with the endpoint explicitly enabled by an administrator. These expose sensitive information such as user hostmasks, IP addresses, and operator identities.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/irc/opers/ |
List IRC operators |
| GET | /api/irc/opers/{name}/ |
Details for a specific operator |
| GET | /api/irc/users/ |
List connected users (includes hostmasks) |
| GET | /api/irc/users/{nick}/ |
Details for a specific user |
| POST | /api/irc/check-credentials/ |
Verify NickServ password for a nick |
NetStats Endpoints
NetStats exposes public JSON endpoints used by the website, and a token-protected API surface for external integrations.
Public (website)
No authentication required. These are used by the /network/* pages.
| Method | Endpoint | Description |
|---|---|---|
| GET | /network/netstats/api/index.json |
Machine-readable NetStats endpoint index |
| GET | /network/data/status/ |
Network snapshot + top users/channels today + recent history |
| GET | /network/data/channel/{channel}/ |
Channel profile payload (URL-encode # as %23) |
| GET | /network/data/user/{nick}/ |
User profile payload |
| GET | /network/data/countries/ |
Country distribution |
| GET | /network/data/clients/ |
IRC client distribution |
| GET | /network/data/history/ |
Recent network history points |
| GET | /network/data/operators/ |
IRC operators (from services) |
| GET | /network/data/servers/ |
Linked servers (from services) |
Token-protected (external integrations)
Requires Authorization: Token <your-token> and admin-approved endpoint access.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/netstats/ |
NetStats API index (token) |
| GET | /api/netstats/status/ |
Network snapshot + leaderboards + recent history (token) |
| GET | /api/netstats/channel/{channel}/ |
Channel profile payload (token) |
| GET | /api/netstats/user/{nick}/ |
User profile payload (token) |
| GET | /api/netstats/countries/ |
Country distribution (token) |
| GET | /api/netstats/clients/ |
IRC client distribution (token) |
| GET | /api/netstats/history/ |
Recent network history points (token) |
| GET | /api/netstats/operators/ |
IRC operators (token) |
| GET | /api/netstats/servers/ |
Linked servers (token) |
check-credentials Request Body
Usage Examples
Fetch Network Stats (no auth)
Fetch NetStats Status (token required)
List Channels (no auth)
List Users (token required)
Check Credentials (token required)
Python Bot Example
Rate Limits & Notes
- All responses are
application/json. - Channel names containing
#must be URL-encoded as%23. - Tokens that have been revoked will return
401 Unauthorized. - If your token lacks permission for an endpoint, you will receive
403 Forbidden. - Tokens can be created from your Account Settings page. An administrator must then approve endpoint access.