{
  "openapi": "3.1.0",
  "info": {
    "title": "RustAtlas public read-only API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://rustatlas.org"
    }
  ],
  "paths": {
    "/api/v1/call/search_servers": {
      "post": {
        "operationId": "search_servers",
        "description": "Search the public Rust server list. Counts are observed snapshots, not guaranteed live. Limited to 20 results per page.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "region": {
                    "type": "string",
                    "enum": [
                      "Europe",
                      "North America",
                      "Asia",
                      "Oceania"
                    ]
                  },
                  "min_players": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "wiped_within_hours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 720
                  },
                  "sort": {
                    "type": "string",
                    "enum": [
                      "players",
                      "name",
                      "wipe"
                    ]
                  },
                  "page": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "search_servers_get",
        "description": "Search the public Rust server list. Counts are observed snapshots, not guaranteed live. Limited to 20 results per page.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Europe",
                "North America",
                "Asia",
                "Oceania"
              ]
            }
          },
          {
            "name": "min_players",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000
            }
          },
          {
            "name": "wiped_within_hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 720
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "players",
                "name",
                "wipe"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/get_server": {
      "post": {
        "operationId": "get_server",
        "description": "Get public server facts, stored connect address, wipe estimates and observation timestamps. Estimates are not confirmed wipe events.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9999999999
                  }
                },
                "additionalProperties": false,
                "required": [
                  "server_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "get_server_get",
        "description": "Get public server facts, stored connect address, wipe estimates and observation timestamps. Estimates are not confirmed wipe events.",
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9999999999
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/population_report": {
      "post": {
        "operationId": "population_report",
        "description": "Calculate population summary from available history. 7d/30d are bucket maxima, so their averages are averages of bucket maxima, not time-weighted population. Coverage describes returned buckets only.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9999999999
                  },
                  "range": {
                    "type": "string",
                    "enum": [
                      "24h",
                      "7d",
                      "30d"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "server_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "population_report_get",
        "description": "Calculate population summary from available history. 7d/30d are bucket maxima, so their averages are averages of bucket maxima, not time-weighted population. Coverage describes returned buckets only.",
        "parameters": [
          {
            "name": "server_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9999999999
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/compare_servers": {
      "post": {
        "operationId": "compare_servers",
        "description": "Compare 2–4 servers using the same public fields. No quality rankings.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9999999999
                    },
                    "minItems": 2,
                    "maxItems": 4,
                    "uniqueItems": true
                  }
                },
                "additionalProperties": false,
                "required": [
                  "server_ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "compare_servers_get",
        "description": "Compare 2–4 servers using the same public fields. No quality rankings.",
        "parameters": [
          {
            "name": "server_ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9999999999
              },
              "minItems": 2,
              "maxItems": 4,
              "uniqueItems": true
            },
            "style": "form",
            "explode": false
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/site_statistics": {
      "post": {
        "operationId": "site_statistics",
        "description": "Get source catalog totals and reported players. Online status does not guarantee a recent successful sample.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "site_statistics_get",
        "description": "Get source catalog totals and reported players. Online status does not guarantee a recent successful sample.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/raid_catalog": {
      "post": {
        "operationId": "raid_catalog",
        "description": "List valid target/tool IDs, HP and soft-side support for raid calculations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "raid_catalog_get",
        "description": "List valid target/tool IDs, HP and soft-side support for raid calculations.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/call/calculate_raid": {
      "post": {
        "operationId": "calculate_raid",
        "description": "Calculate raid plans using the website engine, including partial HP, soft side and tools already owned. No splash damage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selections": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 8,
                    "items": {
                      "type": "object",
                      "properties": {
                        "targetId": {
                          "type": "string",
                          "enum": [
                            "twigWall",
                            "woodWall",
                            "stoneWall",
                            "metalWall",
                            "armoredWall",
                            "highWoodWall",
                            "highStoneWall",
                            "woodDoor",
                            "doubleWoodDoor",
                            "metalDoor",
                            "doubleMetalDoor",
                            "garageDoor",
                            "armoredDoor",
                            "doubleArmoredDoor",
                            "ladderHatch",
                            "toolCupboard",
                            "autoTurret"
                          ]
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 20
                        },
                        "currentHp": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "hard",
                            "soft"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "targetId",
                        "quantity",
                        "currentHp"
                      ]
                    }
                  },
                  "tools": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "c4",
                        "rocket",
                        "satchel",
                        "beancan",
                        "explosiveAmmo",
                        "hvRocket",
                        "incendiaryRocket",
                        "f1",
                        "molotov",
                        "propaneBomb",
                        "jackhammer",
                        "salvagedHammer",
                        "woodenSpear",
                        "stoneSpear"
                      ]
                    }
                  },
                  "inventory": {
                    "type": "object",
                    "properties": {
                      "c4": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "rocket": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "satchel": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "beancan": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "explosiveAmmo": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "hvRocket": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "incendiaryRocket": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "f1": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "molotov": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "propaneBomb": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "jackhammer": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "salvagedHammer": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "woodenSpear": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      "stoneSpear": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "selections",
                  "tools"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      }
    },
    "/api/v1/call/next_force_wipe": {
      "post": {
        "operationId": "next_force_wipe",
        "description": "Get the next standard first-Thursday 19:00 Europe/London force-wipe date, accounting for DST; release time can move.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result with public source URLs, retrieval time and limitations"
          },
          "400": {
            "description": "Invalid arguments"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Data unavailable"
          }
        }
      },
      "get": {
        "operationId": "next_force_wipe_get",
        "description": "Get the next standard first-Thursday 19:00 Europe/London force-wipe date, accounting for DST; release time can move.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read-only result with public sources and limitations"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    }
  }
}