# Twitch on Onekey > 17 endpoints for Twitch (12 stable, 5 beta), 1 to 5 credits each. Category: Video & streaming. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Access: 2 of 17 endpoints are marked "needs a pack" or "may need a pack": free-grant credits reach only the open fetch path; a verified email and a purchased pack unlock the rest. Page: https://onekey.dev/platforms/twitch Reference (Markdown): https://onekey.dev/docs/api/twitch.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 17 mapped Twitch endpoints return each: - `author.username` (string): 12 - `media.thumbnailUrl` (URL): 10 - `author.displayName` (string): 9 - `author.id` (string): 9 - `content.createdAt` (ISO 8601 date): 9 - `content.id` (string): 9 - `content.title` (string): 9 - `content.category` (string): 8 - `engagement.views` (integer): 8 - `entity.id` (string): 4 - `entity.name` (string): 4 - `media.durationSeconds` (number): 4 - `author.avatarUrl` (URL): 3 - `content.text` (string): 3 - `author.followers` (integer): 2 - `content.slug` (string): 2 - `entity.stats.followers` (integer): 2 - `author.bio` (string): 1 - `entity.description` (string): 1 - `event.endDate` (ISO 8601 date): 1 - `event.startDate` (ISO 8601 date): 1 - plus 5 platform-specific fields under `ext.` ## Endpoints ### twitch.category A Twitch category (game): viewers, followers, box art. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/category?name=Just%20Chatting` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Twitch category name, e.g. Just Chatting - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.stats.followers`, `media.thumbnailUrl`, `ext.viewers`, `ext.broadcasters` - Reference: https://onekey.dev/docs/api/twitch/category.md ### twitch.category_streams Live streams in a Twitch category. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/category_streams?name=Just%20Chatting` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Twitch category name, e.g. Just Chatting - Fields returned: `content.id`, `content.title`, `engagement.views`, `content.createdAt`, `media.thumbnailUrl`, `author.id`, `author.username`, `author.displayName`, `content.category` - Reference: https://onekey.dev/docs/api/twitch/category_streams.md ### twitch.channel_search Search Twitch channels by name. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/channel_search?q=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Channel search text - Fields returned: `author.id`, `author.username`, `author.displayName`, `content.text`, `author.followers`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/twitch/channel_search.md ### twitch.clip A single Twitch clip by slug. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/clip?slug=TangentialBillowingJalapenoYee-ccA2oB1pEYh4CHWJ` with header `x-api-key: YOUR_API_KEY` - Parameters: - `slug` (string, required): Twitch clip slug - Fields returned: `content.id`, `content.slug`, `content.title`, `engagement.views`, `content.createdAt`, `media.durationSeconds`, `media.thumbnailUrl`, `author.id`, `author.username`, `author.displayName`, `content.category` - Reference: https://onekey.dev/docs/api/twitch/clip.md ### twitch.clips Top clips of a Twitch channel (all time). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/clips?login=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login name, e.g. shroud - Fields returned: `content.id`, `content.slug`, `content.title`, `engagement.views`, `content.createdAt`, `media.durationSeconds`, `media.thumbnailUrl`, `author.username`, `content.category`, `ext.clippedBy` - Reference: https://onekey.dev/docs/api/twitch/clips.md ### twitch.live_stream Current live stream of a Twitch channel (not_found when the channel is offline). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/live_stream?login=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login name, e.g. shroud - Fields returned: `content.id`, `content.title`, `author.id`, `author.username`, `author.displayName`, `engagement.views`, `content.createdAt`, `content.category`, `media.thumbnailUrl` - Reference: https://onekey.dev/docs/api/twitch/live_stream.md ### twitch.profile Twitch channel profile: display name, bio, followers, avatar, creation date. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/profile?login=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login name, e.g. shroud - Fields returned: `author.id`, `author.username`, `author.displayName`, `content.text`, `author.followers`, `content.createdAt`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/twitch/profile.md ### twitch.search_categories Search Twitch categories (games) by name. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/search_categories?q=minecraft` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Category search text - Fields returned: `entity.id`, `entity.name`, `media.thumbnailUrl`, `ext.viewers` - Reference: https://onekey.dev/docs/api/twitch/search_categories.md ### twitch.search_channels Search Twitch channels. - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/search_channels?q=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Channel name - Fields returned: `author.id`, `author.username`, `author.displayName`, `ext.live` - Reference: https://onekey.dev/docs/api/twitch/search_channels.md ### twitch.stream Live stream status of a Twitch channel. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/stream?login=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login - Fields returned: `content.id`, `content.title`, `author.username`, `engagement.views`, `content.createdAt`, `ext.game` - Reference: https://onekey.dev/docs/api/twitch/stream.md ### twitch.top_categories Currently most-watched Twitch categories (games). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/top_categories` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `entity.stats.followers`, `media.thumbnailUrl`, `ext.viewers` - Reference: https://onekey.dev/docs/api/twitch/top_categories.md ### twitch.top_games Top games on Twitch by viewers. - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/top_games` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name` - Reference: https://onekey.dev/docs/api/twitch/top_games.md ### twitch.top_streams Currently most-watched live streams on Twitch. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/top_streams` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.title`, `engagement.views`, `content.createdAt`, `media.thumbnailUrl`, `author.id`, `author.username`, `author.displayName`, `content.category` - Reference: https://onekey.dev/docs/api/twitch/top_streams.md ### twitch.user Twitch user by login. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/user?login=twitch` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.bio`, `author.avatarUrl` - Reference: https://onekey.dev/docs/api/twitch/user.md ### twitch.user_schedule Get a Twitch user's stream schedule. - Price: 2 credits per fresh call. Status: beta. Access: needs a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/user_schedule?handle=natgeo` with header `x-api-key: YOUR_API_KEY` - Parameters: - `handle` (string, required): Handle - Fields returned: `content.id`, `content.title`, `event.startDate`, `event.endDate`, `content.category` - Reference: https://onekey.dev/docs/api/twitch/user_schedule.md ### twitch.video A single Twitch video (VOD) by numeric id. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/twitch/video?id=2886470967` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Twitch video id - Fields returned: `content.id`, `content.title`, `content.text`, `engagement.views`, `media.durationSeconds`, `content.createdAt`, `media.thumbnailUrl`, `content.category`, `author.id`, `author.username`, `author.displayName` - Reference: https://onekey.dev/docs/api/twitch/video.md ### twitch.videos Recent videos (VODs) of a Twitch channel. - Price: 1 credit per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/twitch/videos?login=shroud` with header `x-api-key: YOUR_API_KEY` - Parameters: - `login` (string, required): Twitch login name, e.g. shroud - Fields returned: `content.id`, `content.title`, `engagement.views`, `media.durationSeconds`, `content.createdAt`, `media.thumbnailUrl`, `content.category`, `author.username` - Reference: https://onekey.dev/docs/api/twitch/videos.md ## Sample request ```bash curl "https://api.onekey.dev/v1/twitch/category?name=Just%20Chatting" \ -H "x-api-key: YOUR_API_KEY" ```