Overview
This node interacts with the Twitch API to retrieve information about games, channels, and streams on the Twitch platform. Specifically, the "Get Top Games" operation fetches a list of the most popular games currently trending on Twitch. This is useful for content creators, marketers, or analysts who want to monitor popular gaming trends, discover new games gaining traction, or tailor their content strategy based on what viewers are watching.
For example, a user might use this node to:
- Display a leaderboard of top games on a website.
- Analyze trending games data for market research.
- Automatically update streaming schedules or notifications based on popular games.
Properties
| Name | Meaning |
|---|---|
| Limit | Max number of results to return (minimum 1). Controls how many top games are fetched from Twitch. |
Output
The node outputs an array of JSON objects under the json field. Each object represents a game from Twitch's top games list and typically includes details such as the game's ID, name, box art URL, and viewer count. The exact fields correspond to Twitch's API response for top games.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Twitch API authentication.
- The node depends on the Twitch API being accessible and the provided credentials having sufficient permissions.
- No additional environment variables are explicitly required beyond the API credential setup in n8n.
Troubleshooting
Common issues:
- Invalid or missing Twitch API credentials will cause authentication errors.
- Request limits imposed by Twitch API may result in rate limiting errors if too many requests are made in a short time.
- Providing a limit value less than 1 will be rejected due to validation.
Error messages:
- Authentication failures usually indicate invalid or expired API tokens; re-authenticate or update credentials.
- Rate limit errors suggest slowing down request frequency or implementing retries with backoff.
- Validation errors on the "Limit" property can be resolved by ensuring the value is at least 1.