Skip to main content

Clips - Get

Description

Gets clip information by clip ID (one or more), broadcaster ID (one only), or game ID (one only).

The response has a JSON payload with a data field containing an array of clip information elements and a pagination field containing information required to query for more streams.

Method Definition

@RequestLine("GET /clips?broadcaster_id={broadcaster_id}&game_id={game_id}&id={id}&after={after}&before={before}&first={first}&started_at={started_at}&ended_at={ended_at}&is_featured={is_featured}")
@Headers("Authorization: Bearer {token}")
HystrixCommand<ClipList> getClips(
@Param("token") String authToken,
@Param("broadcaster_id") String broadcasterId,
@Param("game_id") String gameId,
@Param("id") List<String> ids,
@Param("after") String after,
@Param("before") String before,
@Param("first") Integer limit,
@Param("started_at") Instant startedAt,
@Param("ended_at") Instant endedAt,
@Param("is_featured") Boolean isFeatured
);

Required Parameters (one of)

NameTypeDescription
broadcaster_idstringID of the broadcaster for whom clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.
game_idstringID of the game for which clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.
idstringID of the clip being queried. Limit: 100.

Optional Parameters

NameTypeDescription
authTokenstringUser or App Access Token (or null if authentication was passed to the module builder).
afterstringCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. This applies only to queries specifying broadcaster_id or game_id. The cursor value specified here is from the pagination response field of a prior query.
beforestringCursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. This applies only to queries specifying broadcaster_id or game_id. The cursor value specified here is from the pagination response field of a prior query.
limitintegerMaximum number of objects to return. Maximum: 100. Default: 20.
started_atstringStarting date/time for returned clips, in RFC3339 format. (Note that the seconds value is ignored.) If this is specified, ended_at also should be specified; otherwise, the ended_at date/time will be 1 week after the started_at value.
ended_atstringEnding date/time for returned clips, in RFC3339 format. (Note that the seconds value is ignored.) If this is specified, started_at also must be specified; otherwise, the time period is ignored.
is_featuredbooleanWhether the response includes featured clips. If true, returns only clips that are featured. If false, returns only clips that aren’t featured. All clips are returned if this parameter is not specified.

Code-Snippets

ClipList clipList = twitchClient.getHelix().getClips(null, "488552", null, null, null, null, null, null, null, null).execute();
clipList.getData().forEach(clip -> {
System.out.println("Found Clip: " + clip.getId());
});