This project offers an easy-to-use interface for extracting HLTV data through web scraping, providing a RESTful API built with FastAPI. With this tool, developers can easily pull HLTV data into their applications, websites, or data analysis workflows.
Please be aware that the deployed version is intended for testing purposes and includes rate limiting. For more flexibility and customization, it's recommended to host the service on your own cloud infrastructure.
https://hltv-json-api.fly.dev/
Install Poetry, if you haven't already.
# Clone the repository:
$ git clone https://github.com/eupeutro/hltv-api.git
# Navigate to the project folder:
$ cd hltv-api
# Instantiate a Poetry virtual environment:
$ poetry shell
# Install the dependencies:
$ poetry install --no-root
# Start the API server:
$ python app/main.py
# Access the API local page:
$ open http://localhost:8000/# Clone the repository:
$ git clone https://github.com/eupeutro/hltv-api.git
# Navigate to the project folder:
$ cd hltv-api
# Build the Docker image:
$ docker build -t hltv-api .
# Instantiate the Docker container:
$ docker run -d -p 8000:8000 hltv-api
# Access the API local page
$ open http://localhost:8000/| Variable | Description | Default |
|---|---|---|
RATE_LIMITING_ENABLE |
Enable rate limiting feature for API calls | false |
RATE_LIMITING_FREQUENCY |
Delay allowed between each API call. See slowapi for more | 2/3seconds |
To set the environment variables, create a .env file in the root of your project with the following content:
RATE_LIMITING_ENABLE=false
RATE_LIMITING_FREQUENCY=2/3seconds