Renvoie les diffusions en direct correspondant aux filtres, classées par nombre de spectateurs, avec titre, jeu et détails du streamer.
/api/v1/twitch/search/liveConsommation de quota: Chaque requête réussie vers ce point de terminaison déduit 1 unités de quota de votre forfait.
Paramètres de requête
Paramètres obligatoires
Ce point de terminaison n'a aucun paramètre obligatoire.
Paramètres optionnels
| Nom | Emplacement | Type | Description |
|---|---|---|---|
user_id | body | object | User ID example: string |
user_login | body | object | User login name example: string |
game_id | body | object | Game (category) ID example: string |
type | body | object | Stream type filter for the live list. Possible values: all, live; default all example: string |
language | body | object | Language example: string |
first | body | integer | Page size, maximum 100, default 20 example: 0 |
before | body | object | Previous page cursor example: string |
after | body | object | Next page cursor example: string |
Champs de réponse
| Nom | Type | Description |
|---|---|---|
success | boolean | Success |
code | integer | Code |
message | string | Message |
data | object | - |
data.more | boolean | Has more |
data.offset | string | offset |
data.data | array<object> | data |
Tester
Corps JSON
Exemple cURL
curl -X POST "https://openapi.scdata.cc/api/v1/twitch/search/live" \-H "Authorization: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"user_id":"string","user_login":"string","game_id":"string","type":"string","language":"string","first":0,"before":"string","after":"string"}'
Exemple de réponse (200 application/json)
{"success": true,"code": 200,"message": "Request successful","data": {"more": true,"offset": "string","data": [{"id": "string","user_id": "string","user_login": "string","user_name": "string","game_id": "string","game_name": "string","type": "string","title": "string","viewer_count": 0,"started_at": "2019-08-24T14:15:22.123Z","language": "string","thumbnail_url": "string","tags": ["string"],"is_mature": true}]}}
Cas d'usage
- Détection d'opportunités en temps réel — Repérez qui diffuse un jeu tout juste sorti pour prendre contact au pic d'intérêt.
- Tableau de bord live — Affichez les principales chaînes en direct d'une catégorie sur un écran de suivi interne.