Integrate swdl into your applications
The swdl 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://swdld.obnoxious.lol/api
Retrieve all game entries from the database.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://swdld.obnoxious.lol/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://swdld.obnoxious.lol/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.
import requests
API_KEY = "YOUR_API_KEY_HERE"
BASE_URL = "https://swdld.obnoxious.lol/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']}")
# Download an entry
entry_id = entries[0]["id"]
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://swdld.obnoxious.lol/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;
}
// 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://swdld.obnoxious.lol/api/list
# Download an entry
curl -H "Authorization: Bearer YOUR_API_KEY" \
-L -o game.nsp \
https://swdld.obnoxious.lol/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: