OBJECT

Query

Root fields to access the Twitch API.

link GraphQL Schema definition

1type Query {
2
3# Get the context that corresponds to an upcoming ad request made client side.
4adContext(context: AdRequestContext!): AdContext
5
6# Get a single AdCreative.
7adCreative(adSystem: String!, creativeID: ID!): AdCreative
8
9# Get all tags.
10allTags(first: Int, after: Cursor, tagScope: TagScope): TagConnection
11
12# Get AutoMod evaluation of text using AutoMod rule.
13automodContent(input: AutoModContentInput!): AutoModContent
14
15# A list of global chat badges.
16badges: [Badge]
17
18# Gets a list of Bits offers for a logged out user, for use on the Bits landing
19# page.
20bitsOffers: [BitsOffer!]
21
22# Returns a challenge by its ID.
23challenge(id: ID!): ChannelChallenge
24
25# Get a list of the most recent changelog items.
26changelogEntries(limit: Int): [ChangelogEntry!]
27
28# Get a channel by ID or name.
29channel(id: ID, name: String): Channel
30
31# Get a channel/viewer pair by login.
32channelViewer(userLogin: String!, channelLogin: String!): ChannelViewer
33
34# Get a list of channels, either by IDs or by their names.
35channels(ids: [ID!], names: [String!]): [Channel]
36
37# Get the ban status of a usser with respect to a channel's chat room.
38chatRoomBanStatus(channelID: ID!, userID: ID!): ChatRoomBanStatus
39
40# GlobalCheerConfig contains information about (1) How to display Cheers and (2)
41# What Cheermotes are globally available.
42cheerConfig: GlobalCheerConfig!
43
44# Get the logged-in user's authorizations for a client ID.
45clientAuthorization(id: ID!): ClientAuthorization
46
47# Get a clip by slug.
48clip(slug: ID!): Clip
49
50# Get the state of a cloud broadcast for the given broadcastID.
51cloudBroadcast(id: ID!): CloudBroadcast
52
53# Get the capabilities of a single cloud broadcast provider.
54cloudBroadcastProvider(id: ID!): CloudBroadcastProvider
55
56# Get a single collection (playlist) item by its ID.
57collection(id: ID!, options: CollectionOptions): Collection
58
59# Gets competition by ID.
60competition(id: ID!): Competition
61
62# The features the user has access to when organizing competitions with the Versus
63# product.
64competitionOrganizerCapabilities: CompetitionOrganizerCapability
65
66# Gets a paginated list of competitions, commonly by its state. If state is
67# UNKNOWN, the query will default to LIVE competitions.
68competitions(first: Int, after: Cursor, state: CompetitionState): CompetitionConnection
69
70# Get a privacy consent status from a user, e.g. GDPR or CCPA.
71consent(consentSessionID: ID!): Consent
72
73# Get a content tag by tag ID.
74contentTag(id: ID!): Tag
75
76# Get content tags by tag IDs.
77contentTags(ids: [ID!]): [Tag!]
78
79# Get a Creator Camp article.
80creatorCampArticle(id: ID!, category: String!): CreatorCampArticle
81
82# Get a Creator Camp category.
83creatorCampCategory(id: ID!): CreatorCampCategory
84
85# Get information populated in the Creator Dashboard.
86creatorDashboard(
87startAt: Time!,
88endAt: Time!,
89period: TimeSeriesPeriod!
90): CreatorDashboard
91
92# Get information for the Creator Home page.
93creatorHome: CreatorHome
94
95# Get the chanel/viewer pair with the current user and the channelID.
96currentChannelViewer(channelID: ID!): ChannelViewer
97
98# The currently authenticated user.
99# Returns null if the user is not authenticated.
100currentUser: User
101
102# Fetch a single directory by name and type.
103directory(name: String!, type: DirectoryType!): Directory
104
105# Fetch a single drop by ID. This could be either an event or time based drop.
106drop(id: ID!): DropType
107
108# Fetch a single drop benefit by ID.
109dropBenefit(id: ID!, ownerID: ID!): DropBenefit
110
111# Fetch a single drop campaign by ID.
112dropCampaign(id: ID!): DropCampaign
113
114# Determine the currently logged in users eligibility for the specified drop.
115dropEligibility(dropInstanceID: ID!): DropEligibility
116
117# Get an emote by ID.
118emote(id: ID!): Emote
119
120# Get the current set of emote modifiers.
121emoteModifiers: [CommunityPointsEmoteModifier!]
122
123# Get an emote set by ID.
124emoteSet(id: ID!): EmoteSet
125
126# Experiment properties for temporary use.
127experiment: Experiment
128
129# Get an Extension by ID. Optionally, provide a specific version. If no version is
130# provided,
131# the released version of that extension is returned.
132extension(id: ID!, version: String): Extension
133
134# Get an ExtensionCarousel by ID. The default carousel can be loaded by providing
135# the ID: "default".
136extensionCarousel(id: ID!): ExtensionCarousel
137
138# Fetch a paginated list of Extension Categories. Each Category will provide the
139# first ten
140# extensions sorted by popularity in that category.
141extensionCategories(first: Int, after: Cursor): ExtensionCategoryConnection
142
143# Fetch a single category. Both slugs and ids are valid inputs for getting a
144# category.
145extensionCategory(id: ID!): ExtensionCategory
146
147# Fetch a single Extension Client by ID.
148# An ExtensionClient is the authorization component of an extension.
149# Returns Null if the current user doesn't have access to the extension.
150extensionClient(id: ID!): ExtensionClient
151
152# Fetch a paginated list of Extension Clients.
153extensionClients(organizationID: ID, after: Cursor): ExtensionClientConnection
154
155# Fetch an ExtensionManifest by ID and version.
156extensionManifest(id: ID!, version: String!): ExtensionManifest
157
158# Fetch a paginated list of ExtensionManifests.
159extensionManifests(id: ID!, after: Cursor): ExtensionManifestConnection
160
161# Fetch a Summary of the state of an extension. The Cursor is used to page
162# extension manifests.
163extensionManifestsSummary(id: ID!, after: Cursor): ExtensionManifestsSummary
164
165# extensionRatingsCSVReportPresignedURL asks the ExtensionRatings backend if the
166# given report is completed, and if
167# so, to generate and return a presigned S3 URL that the devsite can use to allow
168# the user to download it.
169# If the URL is not ready yet, the response will be an empty string.
170extensionRatingsCSVReportPresignedURL(
171reportFilename: String!
172): ExtensionRatingsCSVReportPresignedURL
173
174# Fetch the authentication settings for a particular extension.
175extensionSecrets(extensionID: ID!): ExtensionSecretsInfo
176
177# Fetch an ExtensionVersionDiscoveryManifest by ID and version.
178extensionVersionDiscoveryManifest(
179id: ID!,
180version: String!
181): ExtensionVersionDiscoveryManifest
182
183# Search extensions by text found in the Extension name, description or summary.
184# The results are
185# always returned in order of popularity. By default, all RELEASED and IN_TEST
186# extensions are returned.
187# Pass RELEASED as the value of 'state' to only return extensions in the RELEASED
188# state.
189extensions(
190first: Int,
191after: Cursor,
192search: String,
193state: ExtensionStateFilter
194): ExtensionConnection
195
196# Fetch the sections & content that should be featured on mobile
197# `language` is a letter code for the language the requesting user speaks (e.g.
198# "en").
199featuredContentSections(language: String!): [FeaturedContentSection!]
200
201# Fetch streams that are featured on the front page, ordered by featurePriority
202# ascending.
203# DEPRECATED: `geolocation` is computed based on GeoIP with a fallback value of
204# "US" and should be omitted
205# `language` is a letter code for the language the requesting user speaks (ex.
206# "en")
207# By default returns 6 streams.
208featuredStreams(
209first: Int,
210geolocation: String,
211language: String,
212acceptedMature: Boolean
213): [FeaturedStream]
214
215# Fetch VODs that should be featured on the homepage
216# `language` is a letter code for the language the requesting user speaks (e.g.
217# "en").
218featuredVideos(
219first: Int,
220language: String!
221): [FeaturedVideo] @deprecated( reason: "Subject to change" )
222
223# Get a Feed by ID.
224feed(id: ID!): Feed @deprecated( reason: "No longer supported" )
225
226# Convert a URL to an object that can be embedded into Twitch feeds.
227feedEmbed(url: String!): FeedEmbed @deprecated( reason: "No longer supported" )
228
229# Get a feed item by ID.
230feedItemContent(
231id: ID!
232): FeedItemContent @deprecated( reason: "No longer supported" )
233
234# Get a single game as identified by its name or ID. At least one parameter must
235# be provided.
236game(name: String, id: ID): Game
237
238# Fetch games based on a variety of sorting options.
239# By default returns 10 games, sorted by highest ccu.
240# DEPRECATED field arguments: locale, tags
241# Use GameOptions instead.
242games(
243first: Int,
244after: Cursor,
245options: GameOptions,
246locale: String,
247tags: [String!]
248): GameConnection
249
250# Get whether a username is available for registration.
251isUsernameAvailable(username: String!): Boolean
252
253# Get key code information given a key code.
254key(code: String!, countryOfResidence: String): Claimable
255
256# Get a chat message by its id.
257message(id: ID!): Message
258
259# Get a list of the most recent Mod View Newsfeed items.
260modViewNewsfeedEntries(first: Int): [ModViewNewsfeedEntry!]
261
262# Returns a developer organization by ID.
263# User must be apart of the organization.
264organization(id: ID!): Organization
265
266# Gets a pending Twitch Developer Organization application of the currently
267# authenticated user.
268# This is deprecated due to multi-org and ability to have multiple applications.
269pendingOrganizationApplication: OrganizationApplication @deprecated( reason: "Use pendingOrganizationApplications instead." )
270
271# Gets a pending Twitch Developer Organization applications of the currently
272# authenticated user.
273pendingOrganizationApplications: [OrganizationApplication!]
274
275# Get a list of sections(follows, recommendation) for the current user
276# may not return all the requested section e.g requesting following section for
277# logged out user.
278personalSections(input: PersonalSectionInput!): [PersonalSection!]
279
280# Returns a poll by its ID.
281poll(id: ID!): Poll
282
283# Returns a Prediction Event by its ID.
284predictionEvent(id: ID!): PredictionEvent
285
286# Get Current PrimeOffers for a given region based on country code (request info
287# or query param)
288# optional dateOverride to provide offers that would be displayed on that date
289# optional countryCode to provide offers that are displayed for that country
290# optional locale to provide offers displayed for the supplied locale.
291primeOffers(dateOverride: Time, countryCode: String, locale: String): [PrimeOffer!]!
292
293# Retrieve currently live Prime Gaming offers for a given region using the new
294# eligibility architecture.
295# If provided, dateOverride is used to specify offers that would be live on the
296# given date.
297# If provided, countryCode is used to specify offers that would be live in the
298# given region.
299# If provided, locale is used to specify the offer content language for the given
300# locale.
301primeOffersWithEligibility(
302dateOverride: Time,
303countryCode: String,
304locale: String
305): [PrimeOfferWithEligibility!]!
306
307# Retrieve currently live Prime Gaming offers for a given region.
308# This query retrieves offer data without eligibility or entitlement information.
309# If provided, dateOverride is used to specify offers that would be live on the
310# given date.
311# If provided, countryCode is used to specify offers that would be live in the
312# given region.
313# If provided, locale is used to specify the offer content language for the given
314# locale.
315primeOffersWithoutEligibility(
316dateOverride: Time,
317countryCode: String,
318locale: String
319): [PrimeOffer!]!
320
321# PrimePromotions data - query supports optional identifiers for promotion strings
322# but default behavior will use
323# countryCode and userID to find available marketing promotions. For whitelisted
324# QA users dateOverride can be provided.
325primePromotions(ids: [ID!], dateOverride: Time): [PrimePromotion]!
326
327# PrimeVideoBenefit returns a user's prime video benefits from Amazon. Requires an
328# LWA token.
329primeVideoBenefit(accessToken: String!): PrimeVideoBenefit
330
331# Get details about a purchasable offer for the current logged in user.
332# This field can only be requested if an OAuth token is supplied with the request.
333# If the OAuth token is not supplied or if the offer does not exist, this will
334# return null.
335purchasableOffer(params: PurchasableOfferParams!): Offer
336
337# Fetch radio content based on the content type, optionally filtered by an Amazon
338# Standard Identification Number.
339radioContent(
340contentType: RadioContentType!,
341id: ID
342): RadioContent @deprecated( reason: "Use specific user.radio queries instead." )
343
344# Fetch a group of recommended games.
345# `recRequestID` is a tracking id created by the caller. This should be unique per
346# request.
347# `location` defines the source location of the recommended streams request (e.g.
348# "TV_APPS").
349# `context` contains parameters that are used to personalize recommendations (e.g.
350# "Platform").
351recommendedGames(
352first: Int,
353recRequestID: ID!,
354location: String!,
355context: RecommendationsContext!
356): RecommendedGamesConnection
357
358# Fetch a group of recommended streams.
359# `recRequestID` is a tracking id created by the caller. This should be unique per
360# request.
361# `location` defines the source location of the recommended streams request (e.g.
362# "LEFT_NAV").
363# `context` contains parameters that are used to personalize recommendations (e.g.
364# "Platform").
365# `filters` is an optional parameter that can be used to filter recommendation
366# results.
367recommendedStreams(
368first: Int,
369recRequestID: ID!,
370location: String!,
371context: RecommendationsContext!,
372filters: StreamRecommendationsFilters
373): RecommendedStreamsConnection
374
375# Holds configuration necessary for calling Recurly.
376recurlyConfigs(paymentSession: PaymentSession): RecurlyConfigs
377
378# Get a message rejected by chat.
379rejectedChatMessage(id: ID!): RejectedChatMessage
380
381# Get a list of valid reasons for a content type.
382reportReasons(content: ReportContentType!): [ReportReason!]
383
384# Get a list of valid country and ToS reasons for a content types.
385reportToSAndCountryReasons(
386content: ReportContentType!
387): ReportToSAndCountryReasons
388
389# Metadata about the request to the API.
390requestInfo: RequestInfo!
391
392# Get a room by its ID.
393room(id: ID!): Room
394
395# Get a schedule segment by ID. Additional options can be provided to get the
396# segment relative to a
397# different time or timezone.
398scheduleSegment(id: ID!, options: ScheduleSegmentOptions): ScheduleSegment
399
400# Get search results for a user's query.
401search(
402userQuery: String!,
403platform: String!,
404options: SearchOptions
405): SearchResult @deprecated( reason: "Use the 'searchFor' query instead." )
406
407# Search for tags to apply to a channel.
408searchApplicableTags(userQuery: String!, limit: Int): [Tag!]
409
410# Get search results for categories/games.
411searchCategories(query: String!, first: Int, after: Cursor): SearchCategoriesConnection
412
413# Search for category tags to filter categories in Browse.
414searchCategoryTags(userQuery: String!, limit: Int): [Tag!]
415
416# Get gql search results for a user's query.
417searchFor(
418userQuery: String!,
419platform: String!,
420options: SearchForOptions,
421target: SearchForTarget,
422requestID: ID
423): SearchFor
424
425# Search for tags to filter live channels in Browse.
426searchLiveTags(userQuery: String!, categoryID: ID, limit: Int): [Tag!]
427
428# Get Live Streams in search by user query.
429searchStreams(userQuery: String!, first: Int, after: Cursor): SearchStreamConnection
430
431# Get search suggestions for a user's query.
432searchSuggestions(queryFragment: String!, requestID: ID): SearchSuggestionConnection
433
434# Get users by query in search. for search page product use searchFor instead.
435searchUsers(userQuery: String!, first: Int, after: Cursor): SearchUserConnection
436
437# Fetch shelves to display on the homepage.
438# DEPRECATED field arguments: platform (use context.platform), langWeightedCCU.
439shelves(
440requestID: String!,
441platform: String!,
442langWeightedCCU: Boolean,
443first: Int,
444itemsPerRow: Int,
445context: RecommendationsContext
446): ShelfConnection
447
448# Get paginated short video feed.
449shortVideoFeed(
450first: Int,
451after: Cursor,
452options: ShortVideoFeedOptions
453): ShortVideoFeedConnection @deprecated( reason: "No longer supported" )
454
455# Whether or not the Twitch Developers CSAT callout should appear for the
456# currently authenticated user.
457shouldShowDevsiteCSAT: Boolean
458
459# Get a squad stream by ID.
460squadStream(id: ID!): SquadStream
461
462# The playback access token that determines whether the user can watch the live
463# stream
464# Fetched for both authed and unauthed users.
465streamPlaybackAccessToken(
466channelName: String!,
467params: PlaybackAccessTokenParams!
468): PlaybackAccessToken
469
470# Fetch live streams, ordered by the number of viewers descending.
471# languages can be empty or null, which will imply all the languages are included
472# on the results.
473# tags are an array of tag ID as optional filters for streams.
474# DEPRECATED field arguments: platformType, languageTags, tags
475# Use StreamOptions instead.
476streams(
477first: Int,
478after: Cursor,
479options: StreamOptions,
480platformType: PlatformType,
481languages: [Language!],
482input: StreamMetadataFilterInput,
483tags: [String!]
484): StreamConnection
485
486# Get a subscription product by its name. See product name examples below. The
487# productName uniquely identifies a product.
488#
489# e.g. "meclipse", "meclipse_2000", "meclipse_3000", these are respectively, the
490# tier 1, 2, and 3 subscription product
491# names for the user with login "shroud".
492subscriptionProduct(productName: String!): SubscriptionProduct
493
494# Get all avaialble token bundle products available for the user.
495# CountryCode will need to be in ISO 3166 Alpha-2 format(e.g. "US", "BR", "HK").
496subscriptionTokenBundleProducts(
497countryCode: String,
498channelID: ID
499): [SubscriptionTokenBundleProduct!]
500
501# Gets the Token Product Config.
502subscriptionTokenProductConfig: SubscriptionTokenProductConfig
503
504# Gets a list of cloud broadcast providers that can be used by clients to start a
505# broadcast via the provider.
506supportedCloudBroadcastProviders: [CloudBroadcastProviderKey!]
507
508# Get the logged in user's available hero assets.
509supportedHeroAssets: [HeroAsset!]!
510
511# Get the verticals available for a particular user.
512supportedVerticals(
513recommendationsContext: RecommendationsContext!
514): [VerticalDirectory!]
515
516# Gets a team by its Twitch name.
517team(name: String!): Team
518
519# Gets a list of sorted top tags aggregated from all tags applied to current live
520# channels.
521topTags(limit: Int): [Tag!]
522
523# Get localized metadata for any twitch's website url.
524urlMetadata(url: String!): URLMetadata
525
526# Get a user by their ID or login.
527# If no ID or login is provided, null is returned.
528# Lookup type can tell the resolver to include all users (inclusing deleted and
529# suspended accounts) on the lookup, defaults to only retrieve active users.
530user(id: ID, login: String, lookupType: UserLookupType): User
531
532# Fetch the user by a specific attribute.
533userByAttribute(input: UserByAttribute!): User
534
535# Fetch a user by their ID, or receive a reason indicating
536# why the user could not be retrieved.
537userResultByID(id: ID!): UserResult
538
539# Fetch a user by their login, or receive a reason indicating
540# why the user could not be retrieved.
541userResultByLogin(login: String!): UserResult
542
543# Get a list of users, either by their logins or by their IDs.
544users(ids: [ID!], logins: [String!]): [User]
545
546# Get a verification request given an opaqueID.
547# These are generally email verification requests, but could be phone-numbers in
548# the future.
549verificationRequest(opaqueID: ID!): VerificationRequest
550
551# Get content for a vertical directory by its ID.
552verticalDirectory(
553id: ID!,
554recommendationsContext: RecommendationsContext!,
555contentMin: Int!,
556contentMax: Int!
557): VerticalDirectory
558
559# Get content for a vertical subdirectory filtered by one or more context IDs (ex:
560# category ID, tag ID).
561verticalSubDirectory(
562id: ID!,
563contentContext: VerticalSubDirectoryContentContext,
564recommendationsContext: RecommendationsContext!,
565contentMin: Int!,
566contentMax: Int!
567): VerticalSubDirectory
568
569# Get a video by its ID.
570# By default, Video queries only return public videos.
571# If the owner should also see their own private videos, set includePrivate flag
572# in the `options` input.
573# This flag does not include other people's private videos.
574video(id: ID, options: VideoOptions): Video
575
576# A paginated list of comments against id, videoID, or channelID.
577videoComments(
578first: Int,
579after: Cursor,
580last: Int,
581Before: Cursor,
582id: String,
583videoID: String,
584channelID: String
585): VideoCommentConnection
586
587# Get the current or past video ingest metadata such as bitrates and codecs by its
588# ID and channelID.
589# Optional customerID for staffs.
590videoIngestSession(id: ID!, channelID: ID!, customerID: ID): VideoIngestSession
591
592# Get the current video ingest metadata such as bitrates and codecs starting a
593# specified number of seconds ago by channelID. Optional customerID for staffs.
594videoIngestSessionLatest(
595channelID: ID!,
596customerID: ID,
597secondsAgo: Int!
598): VideoIngestSession
599
600# Get the current or past video ingest metadata such as bitrates and codecs by
601# time range and channelID. Optional customerID for staffs.
602videoIngestSessions(
603channelID: ID!,
604customerID: ID,
605startedAt: Time!,
606endedAt: Time!
607): [VideoIngestSession!]
608
609# The playback access token that determines whether the user can watch the video.
610# Fetched for both authed and unauthed users.
611videoPlaybackAccessToken(
612id: ID!,
613params: PlaybackAccessTokenParams!
614): PlaybackAccessToken
615
616# Get a list of videos in order of descending popularity.
617videos(
618first: Int,
619after: Cursor,
620broadcastType: BroadcastType,
621language: Language
622): VideoConnection
623
624# Get a list of Prime Video items for Watch Parties.
625watchPartyItems(
626first: Int,
627after: Cursor,
628accessToken: String,
629options: WatchPartyItemSearchOptions
630): WatchPartyItemConnection
631
632# Get a whisper thread by ID.
633whisperThread(id: ID): WhisperThread
634
635}

link Required by

This element is not required by anyone