{"id":13696363,"url":"https://github.com/spezifanta/hlds-api","last_synced_at":"2025-05-03T17:30:55.590Z","repository":{"id":138835961,"uuid":"152320431","full_name":"spezifanta/hlds-api","owner":"spezifanta","description":"Simple REST API to query HLDS","archived":false,"fork":false,"pushed_at":"2018-10-09T21:03:27.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T18:20:57.304Z","etag":null,"topics":["gameserver","goldsrc","steam","valve"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spezifanta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-10-09T20:58:50.000Z","updated_at":"2024-06-13T01:08:05.000Z","dependencies_parsed_at":"2023-03-21T05:25:03.495Z","dependency_job_id":null,"html_url":"https://github.com/spezifanta/hlds-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spezifanta%2Fhlds-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spezifanta%2Fhlds-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spezifanta%2Fhlds-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spezifanta%2Fhlds-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spezifanta","download_url":"https://codeload.github.com/spezifanta/hlds-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224369495,"owners_count":17299908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gameserver","goldsrc","steam","valve"],"created_at":"2024-08-02T18:00:38.867Z","updated_at":"2024-11-13T00:30:23.965Z","avatar_url":"https://github.com/spezifanta.png","language":"Python","funding_links":[],"categories":["Gaming"],"sub_categories":["GoldSrc / Source - Web tools"],"readme":"# HLDS API\n\nThis Project uses [SourceWatch](https://github.com/spezifanta/SourceWatch) and\nFlask to create a query REST API for Half-Life Dedicated Servers.\n\n## Usage\n\nSet `HLDS_IP` and `HLDS_PORT` to the gameserver you would like not montior.\n\n```bash\nexport HLDS_IP=\"steamcalculator.com\"\nexport HLDS_PORT=\"27015\"\npython app.py\n```\n\nThis will create webserver on port `27014`.\n\n## Endpoints\n\n### `/`\n\nRequest basic server information, current players and game rules.\n\n#### Request\n\n```\ncurl localhost:27014\n```\n\n#### Response\n\n```\n{\n  \"info\": {\n    \"game_app_id\": 70,\n    \"game_description\": \"Half-Life\",\n    \"game_directory\": \"valve\",\n    \"game_map\": \"crossfire\",\n    \"game_version\": \"1.1.2.2/Stdio\",\n    \"players_bot\": 0,\n    \"players_current\": 2,\n    \"players_human\": 2,\n    \"players_max\": 12,\n    \"server_name\": \"spezi|Saufbude #1 HLDM\",\n    \"server_os\": \"l\",\n    \"server_password_protected\": 0,\n    \"server_port\": 27015,\n    \"server_protocol_version\": 48,\n    \"server_steam_id\": 90119497483802634,\n    \"server_type\": \"d\",\n    \"server_vac_secured\": 1\n  },\n  \"players\": [\n    {\n      \"id\": 0,\n      \"kills\": 4,\n      \"name\": \"On error resume next\",\n      \"play_time\": 814.7973022460938\n    },\n    {\n      \"id\": 1,\n      \"kills\": 14,\n      \"name\": \"muhittin\",\n      \"play_time\": 462.9696044921875\n    }\n  ],\n  \"rules\": {\n    \"allow_spectators\": \"0.0\",\n    \"coop\": \"0\",\n    \"deathmatch\": \"1\",\n    \"decalfrequency\": \"30\",\n    \"edgefriction\": \"2\",\n    \"max_queries_sec\": \"1\",\n    \"max_queries_sec_global\": \"1\",\n    \"max_queries_window\": \"1\",\n    \"metamod_version\": \"1.21p38\",\n    \"mp_allowmonsters\": \"0\",\n    \"mp_autocrosshair\": \"0\",\n    \"mp_chattime\": \"10\",\n    \"mp_consistency\": \"1\",\n    \"mp_falldamage\": \"0\",\n    \"mp_flashlight\": \"0\",\n    \"mp_footsteps\": \"1\",\n    \"mp_forcerespawn\": \"1\",\n    \"mp_fraglimit\": \"0\",\n    \"mp_fragsleft\": \"0\",\n    \"mp_friendlyfire\": \"0\",\n    \"mp_logfile\": \"0\",\n    \"mp_teamlist\": \"hgrunt;scientist\",\n    \"mp_teamplay\": \"0\",\n    \"mp_timeleft\": \"4602\",\n    \"mp_timelimit\": \"120\",\n    \"mp_weaponstay\": \"0\",\n    \"pausable\": \"0\",\n    \"sv_accelerate\": \"10\",\n    \"sv_aim\": \"0\",\n    \"sv_airaccelerate\": \"10\",\n    \"sv_allowupload\": \"0\",\n    \"sv_alltalk\": \"1\",\n    \"sv_bounce\": \"1\",\n    \"sv_cheats\": \"0\",\n    \"sv_clienttrace\": \"1\",\n    \"sv_contact\": \"steamcalculator.com\",\n    \"sv_friction\": \"4\",\n    \"sv_gravity\": \"800\",\n    \"sv_logblocks\": \"0\",\n    \"sv_maxrate\": \"100000\",\n    \"sv_maxspeed\": \"320\",\n    \"sv_minrate\": \"5000\",\n    \"sv_password\": \"0\",\n    \"sv_proxies\": \"0\",\n    \"sv_stepsize\": \"18\",\n    \"sv_stopspeed\": \"100\",\n    \"sv_uploadmax\": \"0.5\",\n    \"sv_voiceenable\": \"1\",\n    \"sv_wateraccelerate\": \"10\",\n    \"sv_waterfriction\": \"1\"\n  },\n  \"server\": {\n    \"ip\": \"94.130.15.22\",\n    \"ping\": 10.73,\n    \"port\": 27015\n  }\n}\n```\n\n### `/ping`\n\nUsed as healthcheck for Docker.\n\n#### Request\n\n```\ncurl localhost:27014/ping\n```\n\n#### Response\n\n```\npong\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspezifanta%2Fhlds-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspezifanta%2Fhlds-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspezifanta%2Fhlds-api/lists"}