Loading repository data…
Loading repository data…
dajk / repository
DEPRECATED: An unofficial JSON api for popular CS:GO website hltv.org. Check available methods on https://hltv-api.vercel.app/
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository is no longer maintained.
This is my experimental project, but also small useful module for node.js which helps you to easy implement data from popular CS:GO website hltv.org.
$ npm install hltv-api
Check all the available methods and responses: https://hltv-api.vercel.app/
Simple API example
const HLTV = require('hltv-api').default
const express = require('express')
const app = express()
app.get('/', async (req, res) => {
const news = await HLTV.getNews()
res.json(news)
})
app.listen(3000, () => {
console.log('Listening on port 3000...')
})
import HLTV from 'hltv-api'
app.get('/', async (req, res) => {
const news = await HLTV.getNews()
res.json(news)
})
http://localhost:3000/
https://hltv-api.vercel.app/api/news.json
app.get('/results', async (req, res) => {
const results = await HLTV.getResults()
res.json(results)
})
http://localhost:3000/results
https://hltv-api.vercel.app/api/results.json
app.get('/matches', async (req, res) => {
const matches = await HLTV.getMatches()
res.json(matches)
})
http://localhost:3000/matches
https://hltv-api.vercel.app/api/matches.json
app.get('/results/:matchId/stats', async (req, res) => {
const stats = await HLTV.getMatchById(req.params.matchId)
res.json(stats)
})
http://localhost:3000/stats/matches/2316387
https://hltv-api.vercel.app/api/match.json
app.get('/players', async (req, res) => {
const players = await HLTV.getTopPlayers()
res.json(players)
})
http://localhost:3000/players
https://hltv-api.vercel.app/api/players.json
app.get('/players/:playerId', async (req, res) => {
const player = await HLTV.getPlayerById(req.params.playerId)
res.json(player)
})
http://localhost:3000/players/11893
https://hltv-api.vercel.app/api/player.json
app.get('/top-teams', async (req, res) => {
const teams = await HLTV.getTopTeams()
res.json(teams)
})
http://localhost:3000/top-teams
https://hltv-api.vercel.app/api/teams.json
app.get('/teams/:teamId', async (req, res) => {
const team = await HLTV.getTeamById(req.params.teamId)
res.json(team)
})
http://localhost:3000/teams/11893