Getting Started
Learn the basics of using vlrdevapi
This guide walks you through the common flows with vlrdevapi
.
Import and Verify
import vlrdevapi as vlr
# Check if VLR.gg is reachable
if vlr.status.check_status():
print("Ready to use vlrdevapi!")
else:
print("VLR.gg is currently unreachable")
Your First Query
import vlrdevapi as vlr
# Get next 5 upcoming matches
matches = vlr.matches.upcoming(limit=5)
for m in matches:
print(f"{m.event} - {m.event_phase}")
print(f" {m.team1.name} vs {m.team2.name}")
print(f" Time: {m.time}")
import vlrdevapi as vlr
# Search across all categories
results = vlr.search.search('sentinels')
print(f"Found {results.total_results} results:")
print(f" Players: {len(results.players)}")
print(f" Teams: {len(results.teams)}")
print(f" Events: {len(results.events)}")
import vlrdevapi as vlr
from vlrdevapi.events import EventTier, EventStatus
# Get ongoing VCT events
events = vlr.events.list_events(
tier=EventTier.VCT,
status=EventStatus.ONGOING,
limit=5
)
for e in events:
print(f"{e.name} - {e.prize or 'TBD'}")
Rate Limiting
By default, vlrdevapi limits requests to 10 per second to avoid overloading VLR.gg servers. You can configure this:
import vlrdevapi as vlr
# Set custom rate (5 requests per second)
vlr.configure_rate_limit(requests_per_second=5)
# Disable rate limiting (not recommended)
vlr.configure_rate_limit(enabled=False)
# Re-enable with default settings
vlr.configure_rate_limit(requests_per_second=10, enabled=True)
Recommended Settings
Keep rate limiting enabled to be respectful to VLR.gg servers. The default of 10 requests/second works well for most use cases.
Explore the API
You're all set!
Check out the full API documentation to discover all available endpoints and models.
Next steps: