Twitch Stream Search

Search for Twitch streams by tag name. This tool provides access to an API that returns active streams broadcasting with specific tags.

Documentation

API Endpoint

GET /api/search/streams

Query Parameters

  • tag (required): The Twitch tag name to search for (e.g., "chess", "fortnite")
  • limit (optional): Maximum number of results (default: 20, max: 100)

Authentication Required

You must be logged in to use this API. Include your access token in the Authorization header.

Example Usage

cURL

curl -X GET "https://confettihat.com/api/search/streams?tag=chess&limit=10" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

JavaScript (fetch)

fetch('/api/search/streams?tag=chess&limit=10', {
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  }
}).then(response => response.json()).then(data => console.log(data));

Response Format

{
  "streams": [
    {
      "id": "123456789",
      "user_name": "example_streamer",
      "user_display_name": "Example Streamer",
      "title": "Playing Chess Online!",
      "game_name": "Chess",
      "viewer_count": 1234,
      "started_at": "2024-01-15T10:30:00Z",
      "language": "en",
      "thumbnail_url": "https://...",
      "tags": ["chess", "gaming", "strategy"]
    }
  ],
  "total": 150,
  "has_more": true
}
enes