Integrate moddingcartel into your applications
The moddingcartel API allows you to programmatically access game entries and download information. To use the API, you'll need an API key.
⚠️ Keep your API key secure and never share it publicly!
There are two ways to authenticate API requests:
Authorization: Bearer YOUR_API_KEY_HERE
?api_key=YOUR_API_KEY_HERE
https://moddingcartel.com/api
Retrieve all game entries from the database.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://moddingcartel.com/api/list
{
"entries": [
{
"id": "123456",
"name": "Super Mario Odyssey",
"source": "/games/super_mario_odyssey.nsp",
"type": "filepath",
"file_type": "nsp",
"size": 5606900000,
"created_at": "2026-02-13T12:00:00",
"created_by": "admin",
"metadata": {
"description": "A 3D platform game",
"version": "1.3.0"
}
}
]
}
Download a specific game entry by its ID.
entry_id (path parameter) - The unique ID of the entrycurl -H "Authorization: Bearer YOUR_API_KEY" \
https://moddingcartel.com/api/download/123456
If the entry is a URL, the API will redirect to it. If it's a local file, the API will serve the file for download.
Add a game to your Send to Switch queue. Supports both API key and cookie-based authentication.
entry_id (required) - The unique ID of the entry to sendcurl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entry_id": "123456"}' \
https://moddingcartel.com/api/send-to-switch
curl -X POST -H "Content-Type: application/json" \
-b "session=YOUR_SESSION_COOKIE" \
-d '{"entry_id": "123456"}' \
https://moddingcartel.com/api/send-to-switch
{
"success": true,
"message": "Game added to send queue"
}
Get pending items from your send queue. Used by the send_to_switch client.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://moddingcartel.com/api/send-queue
{
"success": true,
"queue": [
{
"queue_item_id": "789",
"entry_id": "123456",
"entry_name": "Super Mario Odyssey",
"entry_source": "/games/super_mario_odyssey.nsp",
"entry_size": 5606900000,
"status": "pending",
"created_at": "2026-02-17T02:00:00"
}
]
}
Update progress information for a queue item. Used by the send_to_switch client.
queue_item_id (required) - The unique ID of the queue itemprogress_percent (optional) - Progress percentage (0-100)bytes_transferred (optional) - Number of bytes transferredtransfer_speed (optional) - Transfer speed in bytes per secondstatus (optional) - Status update ('processing', 'completed', 'failed')error_message (optional) - Error message if failedcurl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"queue_item_id": "789",
"progress_percent": 45,
"bytes_transferred": 2523105000,
"transfer_speed": 5242880
}' \
https://moddingcartel.com/api/send-queue/progress
{
"success": true,
"message": "Progress updated"
}
Best for programmatic access and client applications.
Authorization: Bearer YOUR_API_KEY
For web applications making requests from the browser. Cookies are automatically included when using credentials: 'same-origin' in fetch() or withCredentials: true in axios.
// JavaScript fetch with cookies
fetch('/api/send-to-switch', {
method: 'POST',
credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ entry_id: '123456' })
});
import requests
API_KEY = "YOUR_API_KEY_HERE"
BASE_URL = "https://moddingcartel.com/api"
headers = {
"Authorization": f"Bearer {API_KEY}"
}
# List all entries
response = requests.get(f"{BASE_URL}/list", headers=headers)
entries = response.json()["entries"]
for entry in entries:
print(f"{entry['name']} - {entry['file_type']}")
# Send a game to Switch
entry_id = entries[0]["id"]
send_response = requests.post(
f"{BASE_URL}/send-to-switch",
headers=headers,
json={"entry_id": entry_id}
)
if send_response.json()["success"]:
print(f"Added {entries[0]['name']} to send queue!")
# Download an entry
download_response = requests.get(
f"{BASE_URL}/download/{entry_id}",
headers=headers,
allow_redirects=True
)
# Save file
with open(f"{entries[0]['name']}.{entries[0]['file_type']}", "wb") as f:
f.write(download_response.content)
const axios = require('axios');
const API_KEY = 'YOUR_API_KEY_HERE';
const BASE_URL = 'https://moddingcartel.com/api';
const headers = {
'Authorization': `Bearer ${API_KEY}`
};
// List all entries
async function listEntries() {
const response = await axios.get(`${BASE_URL}/list`, { headers });
return response.data.entries;
}
// Send to Switch
async function sendToSwitch(entryId) {
const response = await axios.post(
`${BASE_URL}/send-to-switch`,
{ entry_id: entryId },
{ headers }
);
return response.data;
}
// Download an entry
async function downloadEntry(entryId) {
const response = await axios.get(
`${BASE_URL}/download/${entryId}`,
{
headers,
responseType: 'stream'
}
);
return response.data;
}
// Usage
listEntries().then(entries => {
console.log(`Found ${entries.length} entries`);
entries.forEach(entry => {
console.log(`${entry.name} - ${entry.file_type}`);
});
});
# List all entries
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://moddingcartel.com/api/list
# Download an entry
curl -H "Authorization: Bearer YOUR_API_KEY" \
-L -o game.nsp \
https://moddingcartel.com/api/download/123456
Currently, there are no enforced rate limits, but please be respectful and avoid making excessive requests. We monitor API usage and may implement rate limits in the future if necessary.
| Status Code | Description |
|---|---|
200 |
Success |
401 |
Unauthorized - Invalid or missing API key |
404 |
Not Found - Entry doesn't exist |
500 |
Internal Server Error |
If you need help or have questions about the API: