Prerequisites
Before you begin, make sure you have:- Installed Valaw (Installation guide)
- Python 3.9 or higher
Get started
Get your API key
Register for a Riot Games API key at the Riot Games Developer Portal.
Development API keys expire after 24 hours. For production applications, apply for a production API key through the developer portal.
Initialize the client
Create a Valaw client instance with your API token and cluster:The
client.py:138-156
Client constructor accepts three parameters:- token (str): Your Riot Games API access token
- cluster (str): The default cluster for requests. Valid clusters:
americas,asia,esports,europe - raw_data (bool, optional): Return raw JSON dicts instead of typed objects. Defaults to
False
Make your first API call
Use the client to fetch VALORANT content data:The
client.py:268-293
GET_getContent method accepts:- region (str): The region to execute against. Valid regions:
ap,br,esports,eu,kr,latam,na - locale (str, optional): The locale for localized content (e.g.,
en-US,es-MX,ja-JP)
Specifying a locale parameter improves response times by filtering content to a specific language.
Close the client
Always close the client when you’re done to properly clean up the aiohttp session:The
client.py:168-170
try/finally pattern ensures the client is closed even if an exception occurs.Complete example
Here’s the complete working example:What’s next?
Now that you’ve made your first API call, explore more advanced features:API Reference
Browse all available endpoints and methods
Examples
View real-world usage examples
Error handling
Valaw raises specific exceptions for different error conditions:client.py:47-80
- RiotAPIResponseError: The Riot API returned an error response (rate limit, not found, etc.)
- InvalidCluster: The provided cluster is not valid
- InvalidRegion: The provided region is not valid
- InvalidLocale: The provided locale is not valid
- InvalidRiotAPIKey: API key is missing or empty

