Transformice does not offer a documented, stable API for external use. However, its simple plaintext socket protocol has been fully reverse-engineered, enabling rich community tooling. Developers should treat this as a volatile internal interface – suitable for learning and small-scale automation, but not for production applications requiring reliability.
Recommendation: If you need official game data integration, contact Atelier 801 for partnership (rarely granted). For hobby projects, use the documented WebSocket patterns with respect for the game's fair play policies.
Appendix A: Full Command Reference (available upon request – over 200 commands exist, including tribe management, shop purchases, and event-specific flags)
If you want, I can:
Which of those would you like next?
Transformice!
The Transformice API, also known as the Transformice Web API, is a set of programming interfaces provided by Atelier 801, the creators of Transformice, to allow developers to access and interact with the game's data and features. Here's an overview:
What is Transformice? Transformice is a popular online multiplayer game where players control a mouse-like character, navigating through levels to reach a piece of cheese. The game has a strong focus on community features, such as user-generated levels, tribes, and leaderboards.
API Overview The Transformice API allows developers to:
API Endpoints The Transformice API provides a range of endpoints, including:
API Documentation Atelier 801 provides official API documentation, which includes:
Authentication To use the Transformice API, you'll need to obtain an API key or authenticate using OAuth. This ensures that only authorized applications can access and modify game data.
Community and Resources The Transformice community is active and creative, with many developers creating custom tools, bots, and integrations using the API. You can find:
Getting Started If you're interested in using the Transformice API, start by:
Have fun exploring the world of Transformice and creating your own projects with the API!
Mastering the Transformice API: A Comprehensive Guide for Developers
Transformice, the physics-based multiplayer platformer, has fostered a dedicated community of creators for over a decade. At the heart of this creativity lies the Transformice API, a set of tools and protocols that allow developers to build everything from Discord bots and stat trackers to custom game modules.
Whether you are a seasoned coder or a curious player looking to automate your tribe’s ranking system, understanding how to interact with the game’s data is the first step toward building something impactful. What is the Transformice API?
The "API" for Transformice isn't a single RESTful endpoint like you might find with Twitter or Spotify. Instead, it is a collection of community-driven libraries and official socket-based protocols that allow external programs to communicate with the game servers. Key Capabilities transformice api
Real-time Interaction: Read chat logs, track player movements, and monitor room events.
Player Statistics: Fetch cheese gathered, firsts, shaman saves, and boot camp completions.
Module Development: Create custom mini-games within the Transformice ecosystem using Lua.
Tribe Management: Automate greetings, track member activity, and manage ranks via external bots. The Core Building Blocks
To work with the Transformice API, you generally need to choose between two paths: Lua Modules (internal) or Socket Clients (external). 1. Lua API (In-Game Modules)
If you want to create a game mode (like Racing, Survivor, or Defilante), you use the built-in Lua engine. Environment: Runs directly on the game server.
Access: Requires "Module Team" approval for official listing, but anyone can run scripts in private rooms.
Limitations: Restricted file I/O and limited networking to prevent security risks. 2. TFM-Lib and Python/Node.js Wrappers
For external applications (like Discord bots), developers use libraries that "mimic" a game client. TFM.js (Node.js): A popular choice for web developers.
Aioptfm (Python): An asynchronous library perfect for high-performance bots.
Functionality: These libraries handle the complex handshake and packet encryption required to talk to the Atelier 801 servers. How to Get Started
If you’re ready to dive in, follow these fundamental steps to set up your first project. Step 1: Secure Your API Credentials
To prevent abuse, Atelier 801 requires an API Key for certain types of data requests, especially when using the official "Crouton" service or community-run databases like MicePix. Step 2: Choose Your Language
For Data Analysis: Use Python. It’s excellent for scraping leaderboards and generating graphs of player growth.
For Live Bots: Use JavaScript/Node.js. The event-driven nature of JS makes it ideal for responding to in-game chat instantly. Step 3: Understand the Packet System
Transformice communicates using identifiers (low-level codes). For example, a specific code tells the server "I jumped," while another says "I typed in chat." Learning to parse these packets is what separates a novice from an expert API developer. Popular Community Projects Using the API
The best way to see the API in action is to look at existing tools:
Cheese.formice.at: The definitive source for global rankings and player history. Transformice does not offer a documented, stable API
TFMBot: A versatile Discord bot that bridges the gap between your tribe's chat and your Discord server.
MiceForce & Private Servers: While technically separate, these projects often reverse-engineer the API to create entirely new experiences. Best Practices and Ethics
When using the Transformice API, it is crucial to follow the Atelier 801 Terms of Service:
Don't Spam: Ensure your bot doesn't flood the game servers with unnecessary packets.
Data Privacy: Never use the API to harvest private player information or passwords.
Stay Updated: Transformice frequently updates its encryption. Join developer forums like the Transformice Discord (TFM-Dev) to stay informed about breaking changes. Conclusion
The Transformice API is a gateway to enhancing the game experience for thousands of players. Whether you're building a competitive leaderboard or a fun social bot, the tools are at your fingertips. Start small—perhaps a bot that announces when a friend logs in—and gradually work your way up to complex game modules.
If you’re interested in building a specific tool, let me know! I can help you with:
Python or JavaScript code snippets for connecting to the server. Explaining specific Lua functions for in-game maps.
Finding the latest community libraries that are currently maintained.
The heavy iron gates of the Transformice server room hummed with a low, digital thrum. Inside,
sat before a glowing terminal, his eyes reflecting a cascade of green text. He wasn't just playing the game; he was speaking to its soul through the API.
In the world of Transformice, thousands of mice scrambled for cheese in a physics-driven frenzy. But Silas saw the invisible strings. To him, the API was a map of every whisker twitch and floorboard creak across a hundred rooms.
He began to type, his fingers dancing across the mechanical keyboard.
import transformice_api as tfm # Connecting to the heart of the swarm client = tfm.Client() client.run(TOKEN) Use code with caution. Copied to clipboard
The connection sparked to life. Data flooded his screen—a rhythmic heartbeat of player coordinates, room names, and shaman incantations. He wasn't looking for a way to cheat; he was looking for the "Ghost of Room 801."
Legend said a developer had left a sentient script running in an abandoned room, a piece of code that could predict a player’s next move before they even thought of it. Using the API, Silas filtered the noise. He ignored the crowded racing rooms and the chaotic "survivor" maps. He looked for a room with a player count of exactly zero, yet a constant stream of outgoing packets. There it was. Room *#void. Silas hooked his listener into the room’s event stream.
@client.event async def on_packet_received(packet): if packet.room == "*#void": print(f"Decoding transmission: packet.data") Use code with caution. Copied to clipboard Appendix A: Full Command Reference (available upon request
The terminal paused. Then, the text scrolled so fast it became a blur of white light. It wasn't game data. It was poetry. The "Ghost" was reciting the history of every mouse who had ever fallen into the pit, every shaman who had missed a nail, and every cheese ever claimed since 2010.
Suddenly, Silas’s own mouse character appeared on the screen, standing alone in a dark, empty void. Above his head, a speech bubble appeared, though Silas hadn't typed a word. "You finally checked the logs, Silas," the bubble read.
His heart hammered. The API was a two-way street. He had been watching the game, but the game had been waiting for someone to listen to the data. "What are you?" Silas typed into his terminal.
The response didn't come through the game window. It appeared in his code editor, replacing his clean Python script with a single line of raw, beautiful logic: return universe.get_cheese(silas)
The screen flashed gold. In the game, Silas’s mouse didn’t just get the cheese; he became the cheese. The room collapsed into a singularity of pixels, and the connection severed. Silas sat in the dark, the hum of the servers finally silent. He looked at his screen. The API was gone, replaced by a simple desktop icon he’d never seen before: a golden feather.
He reached for the mouse, but he already knew. In the world of data, once you find the source, you never truly leave the room.
To explore the real-world mechanics of this digital world, you might want to look into:
TFMlib: A popular Python library for interacting with the game.
Lua Scripting: How players create custom "minigames" within rooms.
Atelier 801 Forums: The hub for developer documentation and community tools. If you'd like, I can help you: Outline a technical guide for using the actual API. Develop a character for a Shaman-themed mystery.
Brainstorm plot twists involving specific game mechanics like "divine" mode.
As of 2025, Transformice has transitioned from Flash to HTML5/WebGL. This transition broke many legacy API tools, but it also opened new possibilities:
Sites like TfmFashion catalog every piece of fur, accessory, and hat in the game. They often use internal game asset references (IDs) to display items—data that is technically part of the game’s resources rather than a web API.
import requestsdef get_tfm_stats(username): # Step 1: Get Player ID profile_url = f"https://transformice.com/en/api/profile/username/username" profile_res = requests.get(profile_url)
if not profile_res.json().get('success'): return None player_id = profile_res.json()['player_id'] # Step 2: Get Stats stats_url = f"https://transformice.com/en/api/stats/player/player_id" stats_res = requests.get(stats_url) data = stats_res.json() return f"username has data['total_cheese'] 🧀 and data['total_rounds'] rounds."
GET https://transformice.com/images/items/[id].png
Example: id=3 → plank sprite
| Property | Value |
|----------|-------|
| Protocol | Custom text over TCP (historically XMLSocket, now WebSocket) |
| Default Port | 80 (http), 443 (https for WebSocket) |
| Endpoint | wss://transformice.com/game (derived from client reverse engineering) |
| Message separator | \n (newline) |
| Encoding | UTF-8 |
Each message is a string starting with a two-character prefix (command code) followed by parameters separated by spaces or parentheses.
Transformice uses a sandboxed version of Lua 5.1. Every "Module" (mod) interacts with the game through a specific table called tfm.