An unofficial python flask api for popular CS2 website hltv.org.
Prerequisites: Python 3.x (check with python --version or python3 --version)
git clone https://github.com/M3MONs/hltv-api.git
cd hltv-api
pip install -r requirements.txt
python app.pyhttp://127.0.0.1:8000/apidocs/#/
GET /api/v1/teams/rankings
GET /api/v1/teams/rankings/<type>
GET /api/v1/teams/rankings/<type>/<year>/<month>/<day>Returns the HLTV or VALVE team ranking. Available types: hltv (default), valve.

GET /api/v1/teams/search/<name>Searches for a team by name.
GET /api/v1/teams/<id>/<team_name>Returns the team profile.
GET /api/v1/teams/<id>/matches
GET /api/v1/teams/<id>/matches/<offset>Returns a list of team matches (optionally with an offset).
GET /api/v1/results/
GET /api/v1/results/<offset>Returns the results of HLTV matches.

GET /api/v1/results/featuredGET /api/v1/matches/upcomingReturns upcoming matches.
GET /api/v1/matches/<id>/<match_name>Returns details of the selected match.
GET /api/v1/players/search/<name>Searches for a player by name.
GET /api/v1/players/<id>/<player_name>Returns the player profile.
GET /api/v1/players/stats/overview/<id>/<player_name>Returns the player stats overview.
GET /api/v1/news
GET /api/v1/news/<year>/<month>/Returns news from HLTV. If no parameters provided, returns current month's news.
