API Documentation
Complete guide to the CODDB MW23 API. Access weapon data, operators, attachments, and more programmatically.
Quick Start
The CODDB MW23 API provides programmatic access to all Call of Duty: Modern Warfare 2023 game data. All endpoints return JSON and require no authentication.
Base URL
https://coddb.net/api/v1
Format
JSON
Authentication
None required
Rate Limit
No limits
Weapons API
GET
/api/v1/weapons
Get all weapons with filtering and pagination
Parameters
| Parameter | Type | Description |
|---|---|---|
game |
string | Filter by game: MW2, MW3 |
type |
string | Filter by weapon type |
limit |
integer | Results per page (1-200, default: 50) |
offset |
integer | Pagination offset (default: 0) |
Example Request
curl "https://coddb.net/api/v1/weapons?game=MW2&limit=10"
GET
/api/v1/weapons/{id}
Get specific weapon by ID
Example Request
curl "https://coddb.net/api/v1/weapons/iw9_ar_mike4_mp"
Response
{
"data": {
"id": "iw9_ar_mike4_mp",
"name": "M4",
"type": "Assault Rifle",
"game": "MW2",
"stats": { ... }
}
}
GET
/api/v1/weapons/types
Get all available weapon types
Operators API
GET
/api/v1/operators
Get all operators with pagination
Parameters
| Parameter | Type | Description |
|---|---|---|
limit |
integer | Results per page (1-200, default: 50) |
offset |
integer | Pagination offset (default: 0) |
Example Request
curl "https://coddb.net/api/v1/operators?limit=20"
GET
/api/v1/operators/{id}
Get specific operator by ID
Attachments API
GET
/api/v1/attachments
Get all attachments with pagination
Parameters
| Parameter | Type | Description |
|---|---|---|
limit |
integer | Results per page (1-200, default: 50) |
offset |
integer | Pagination offset (default: 0) |
Example Request
curl "https://coddb.net/api/v1/attachments?limit=100"
Search API
GET
/api/v1/search
Search across all content types
Parameters
| Parameter | Type | Description |
|---|---|---|
q |
string | Search query (required, min: 2 chars) |
type |
string | Content type: weapons, operators, attachments, all |
limit |
integer | Results per type (1-100, default: 20) |
Example Request
curl "https://coddb.net/api/v1/search?q=M4&type=weapons"
Statistics API
GET
/api/v1/stats
Get database statistics and counts
Example Request
curl "https://coddb.net/api/v1/stats"
Response
{
"weapons": {
"total": 447,
"by_game": { "MW2": 234, "MW3": 213 },
"by_type": { ... }
},
"operators": { "total": 128 },
"attachments": { "total": 33836 }
}
Response Format
All API responses follow a consistent format:
Successful Response
{
"data": [...], // The requested data
"meta": { // Pagination info (when applicable)
"total": 447,
"count": 50,
"limit": 50,
"offset": 0,
"has_more": true
}
}
Error Response
{
"error": "Resource not found",
"message": "No weapon found with ID: invalid_id"
}
Code Examples
JavaScript (Fetch)
fetch('https://coddb.net/api/v1/weapons?game=MW2')
.then(response => response.json())
.then(data => {
console.log(data.data); // Array of weapons
console.log(data.meta.total); // Total count
});
Python (Requests)
import requests
response = requests.get('https://coddb.net/api/v1/weapons', {
'params': {'game': 'MW2', 'limit': 100}
})
data = response.json()
weapons = data['data']
PHP (cURL)
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://coddb.net/api/v1/weapons?game=MW2',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
Node.js (Axios)
const axios = require('axios');
async function getWeapons() {
const response = await axios.get('https://coddb.net/api/v1/weapons', {
params: { game: 'MW2', limit: 100 }
});
return response.data;
}


