YouTube YouTube API

The Youtube API from YouTube — 1 operation(s) for youtube.

GitHub OpenAPI

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /youtube/v3/liveChat/messages/stream Stream live chat messages · Stream messages #
Ask an LLM
“How do I stream live chat messages from a live stream?”
“Can I stream chat messages in a specific language?”
Tell an agent
Stream live chat messages for live chat {liveChatId}.
Stream chat messages for live chat {liveChatId} in language {hl}.

Documentation

📖
Documentation
https://developers.google.com/youtube/v3/docs/activities/list
📖
GettingStarted
https://developers.google.com/youtube/v3/getting-started
📖
Authentication
https://developers.google.com/youtube/v3/guides/authentication
📖
Documentation
https://developers.google.com/youtube/v3/docs/channels/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/comments/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/commentThreads/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/playlists/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/playlistItems/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/search/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/subscriptions/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/videos/list
📖
Documentation
https://developers.google.com/youtube/v3/docs/captions
📖
Documentation
https://developers.google.com/youtube/v3/docs/videoCategories
📖
Documentation
https://developers.google.com/youtube/v3/docs/i18nLanguages
📖
Documentation
https://developers.google.com/youtube/v3/docs/i18nRegions
📖
Documentation
https://developers.google.com/youtube/analytics
📖
GettingStarted
https://developers.google.com/youtube/reporting/guides/authorization
📖
APIReference
https://developers.google.com/youtube/analytics/reference
📖
Authentication
https://developers.google.com/youtube/reporting/guides/authorization
📖
Documentation
https://developers.google.com/youtube/reporting
📖
APIReference
https://developers.google.com/youtube/reporting/v1/reference/rest
📖
Documentation
https://developers.google.com/youtube/reporting/v1/reports
📖
GettingStarted
https://developers.google.com/youtube/v3/live/getting-started
📖
Documentation
https://developers.google.com/youtube/v3/live/docs
📖
APIReference
https://developers.google.com/youtube/v3/live/docs

Specifications

Code Examples

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/youtube:youtube-youtube-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

youtube-youtube-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Data API v3 YouTube API
  version: v3
  description: Generated from Google's published Discovery document for YouTube Data API v3 (youtube v3, revision 20261111). 1 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://youtube.googleapis.com
tags:
- name: Youtube
paths:
  /youtube/v3/liveChat/messages/stream:
    get:
      operationId: youtube.youtube.v3.liveChat.messages.stream
      summary: Stream messages
      description: Allows a user to load live chat through a server-streamed RPC. A call to this method has a quota cost of 5 units.
      parameters:
      - name: hl
        in: query
        required: false
        description: Specifies the localization language in which the system messages should be returned.
        schema:
          type: string
      - name: liveChatId
        in: query
        required: false
        description: The ID of the live chat for which messages should be returned.
        schema:
          type: string
      - name: maxResults
        in: query
        required: false
        description: The `maxResults` parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.
        schema:
          maximum: 2000
          type: integer
          minimum: 200
          format: uint32
          default: '500'
      - name: pageToken
        in: query
        required: false
        description: The `pageToken` parameter identifies a specific page in the result set that should be returned. In an API response, the `nextPageToken` property identifies other pages that could be retrieved.
        schema:
          type: string
      - name: part
        in: query
        required: false
        description: The `part` parameter specifies the `liveChatMessage` resource parts that the API response includes. Supported values are `id`, `snippet`, and `authorDetails`.
        schema:
          type: array
          items:
            type: string
      - name: profileImageSize
        in: query
        required: false
        description: Specifies the size of the profile image that should be returned for each user.
        schema:
          maximum: 720
          format: uint32
          type: integer
          minimum: 16
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiveChatMessageListResponse'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/youtube
        - https://www.googleapis.com/auth/youtube.force-ssl
        - https://www.googleapis.com/auth/youtube.readonly
      - apiKey: []
      tags:
      - Youtube
components:
  schemas:
    LiveChatNewSponsorDetails:
      properties:
        memberLevelName:
          type: string
          description: The name of the Level that the viewer just had joined. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.
        isUpgrade:
          description: If the viewer just had upgraded from a lower level. For viewers that were not members at the time of purchase, this field is false.
          type: boolean
      type: object
    LiveChatPollDetails:
      type: object
      properties:
        status:
          enum:
          - unknown
          - active
          - closed
          type: string
        metadata:
          $ref: '#/components/schemas/LiveChatPollDetailsPollMetadata'
    LiveChatMembershipGiftingDetails:
      type: object
      properties:
        giftMembershipsCount:
          type: integer
          description: The number of gift memberships purchased by the user.
          format: int32
        giftMembershipsLevelName:
          type: string
          description: The name of the level of the gift memberships purchased by the user. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.
    LiveChatGiftMembershipReceivedDetails:
      type: object
      properties:
        associatedMembershipGiftingMessageId:
          description: The ID of the membership gifting message that is related to this gift membership. This ID will always refer to a message whose type is `membershipGiftingEvent`.
          type: string
        memberLevelName:
          description: The name of the Level at which the viewer is a member. This matches the `snippet.membershipGiftingDetails.giftMembershipsLevelName` of the associated membership gifting message. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.
          type: string
        gifterChannelId:
          type: string
          description: The ID of the user that made the membership gifting purchase. This matches the `snippet.authorChannelId` of the associated membership gifting message.
    ChannelProfileDetails:
      properties:
        channelId:
          description: The YouTube channel ID.
          type: string
        displayName:
          description: The channel's display name.
          type: string
        channelUrl:
          description: The channel's URL.
          type: string
        profileImageUrl:
          type: string
          description: The channels's avatar URL.
      type: object
    LiveChatFanFundingEventDetails:
      properties:
        amountDisplayString:
          type: string
          description: A rendered string that displays the fund amount and currency to the user.
        amountMicros:
          description: The amount of the fund.
          type: string
          format: uint64
        userComment:
          description: The comment added by the user to this fan funding event.
          type: string
        currency:
          description: The currency in which the fund was made.
          type: string
      type: object
    LiveChatMessage:
      properties:
        id:
          type: string
          description: The ID that YouTube assigns to uniquely identify the message.
        authorDetails:
          $ref: '#/components/schemas/LiveChatMessageAuthorDetails'
          description: The authorDetails object contains basic details about the user that posted this message.
        snippet:
          $ref: '#/components/schemas/LiveChatMessageSnippet'
          description: The snippet object contains basic details about the message.
        kind:
          type: string
          description: 'Identifies what kind of resource this is. Value: the fixed string "youtube#liveChatMessage".'
          default: youtube#liveChatMessage
        etag:
          description: Etag of this resource.
          type: string
      description: A *liveChatMessage* resource represents a chat message in a YouTube Live Chat.
      type: object
    SuperStickerMetadata:
      properties:
        altText:
          description: Internationalized alt text that describes the sticker image and any animation associated with it.
          type: string
        stickerId:
          description: Unique identifier of the Super Sticker. This is a shorter form of the alt_text that includes pack name and a recognizable characteristic of the sticker.
          type: string
        altTextLanguage:
          description: Specifies the localization language in which the alt text is returned.
          type: string
      type: object
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    LiveChatMessageListResponse:
      properties:
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
          description: General pagination information.
        offlineAt:
          type: string
          description: The date and time when the underlying stream went offline.
          format: date-time
        eventId:
          type: string
          description: Serialized EventId of the request which produced this response.
          deprecated: true
        activePollItem:
          $ref: '#/components/schemas/LiveChatMessage'
          description: Set when there is an active poll.
        pollingIntervalMillis:
          format: uint32
          type: integer
          description: The amount of time the client should wait before polling again.
        etag:
          description: Etag of this resource.
          type: string
        items:
          items:
            $ref: '#/components/schemas/LiveChatMessage'
          type: array
        nextPageToken:
          type: string
        kind:
          description: 'Identifies what kind of resource this is. Value: the fixed string `"youtube#liveChatMessageListResponse"`.'
          default: youtube#liveChatMessageListResponse
          type: string
        tokenPagination:
          $ref: '#/components/schemas/TokenPagination'
        visitorId:
          description: Identifies the visitor.
          type: string
          deprecated: true
      type: object
    LiveChatPollDetailsPollMetadata:
      type: object
      properties:
        options:
          description: The options will be returned in the order that is displayed in 1P
          type: array
          items:
            $ref: '#/components/schemas/LiveChatPollDetailsPollMetadataPollOption'
        questionText:
          type: string
    LiveChatTextMessageDetails:
      type: object
      properties:
        messageText:
          type: string
          description: The user's message.
    LiveChatSuperChatDetails:
      properties:
        amountDisplayString:
          type: string
          description: A rendered string that displays the fund amount and currency to the user.
        currency:
          description: The currency in which the purchase was made.
          type: string
        tier:
          format: uint32
          type: integer
          description: The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is `1`.
        amountMicros:
          format: uint64
          type: string
          description: The amount purchased by the user, in micros (1,750,000 micros = 1.75).
        userComment:
          type: string
          description: The comment added by the user to this Super Chat event.
      type: object
    PageInfo:
      description: Paging details for lists of resources, including total number of items available and number of resources returned in a single page.
      properties:
        resultsPerPage:
          format: int32
          description: The number of results included in the API response.
          type: integer
        totalResults:
          description: The total number of results in the result set.
          type: integer
          format: int32
      type: object
    LiveChatSuperStickerDetails:
      type: object
      properties:
        amountMicros:
          type: string
          description: The amount purchased by the user, in micros (1,750,000 micros = 1.75).
          format: uint64
        currency:
          type: string
          description: The currency in which the purchase was made.
        superStickerMetadata:
          $ref: '#/components/schemas/SuperStickerMetadata'
          description: Information about the Super Sticker.
        tier:
          type: integer
          format: uint32
          description: The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is `1`.
        amountDisplayString:
          type: string
          description: A rendered string that displays the fund amount and currency to the user.
    LiveChatMessageSnippet:
      type: object
      properties:
        newSponsorDetails:
          $ref: '#/components/schemas/LiveChatNewSponsorDetails'
          description: Details about the New Member Announcement event, this is only set if the type is `newSponsorEvent`. The term "member" replaces "sponsor".
        authorChannelId:
          description: The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message membershipGiftingEvent - the user that made the purchase giftMembershipReceivedEvent - the user that received the gift membership messageDeletedEvent - the moderator that took the action. Unused. messageRetractedEvent - the author that retracted their message. Unused. userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase pollEvent - the user that created the poll
          type: string
        messageDeletedDetails:
          $ref: '#/components/schemas/LiveChatMessageDeletedDetails'
        publishedAt:
          type: string
          description: The date and time when the message was orignally published.
          format: date-time
        liveChatId:
          type: string
        fanFundingEventDetails:
          $ref: '#/components/schemas/LiveChatFanFundingEventDetails'
          description: Details about the funding event, this is only set if the type is `fanFundingEvent`.
        superStickerDetails:
          $ref: '#/components/schemas/LiveChatSuperStickerDetails'
          description: Details about the Super Sticker event, this is only set if the type is `superStickerEvent`.
        superChatDetails:
          $ref: '#/components/schemas/LiveChatSuperChatDetails'
          description: Details about the Super Chat event, this is only set if the type is `superChatEvent`.
        userBannedDetails:
          $ref: '#/components/schemas/LiveChatUserBannedMessageDetails'
        textMessageDetails:
          $ref: '#/components/schemas/LiveChatTextMessageDetails'
          description: Details about the text message, this is only set if the type is `textMessageEvent`.
        displayMessage:
          type: string
          description: Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent.
        hasDisplayContent:
          type: boolean
          description: Whether the message has display content that should be displayed to users.
        type:
          description: The type of message, this will always be present, it determines the contents of the message as well as which fields will be present.
          type: string
          enum:
          - invalidType
          - textMessageEvent
          - tombstone
          - fanFundingEvent
          - chatEndedEvent
          - sponsorOnlyModeStartedEvent
          - sponsorOnlyModeEndedEvent
          - newSponsorEvent
          - memberMilestoneChatEvent
          - membershipGiftingEvent
          - giftMembershipReceivedEvent
          - messageDeletedEvent
          - messageRetractedEvent
          - userBannedEvent
          - superChatEvent
          - superStickerEvent
          - pollEvent
          - giftEvent
        giftMembershipReceivedDetails:
          $ref: '#/components/schemas/LiveChatGiftMembershipReceivedDetails'
          description: Details about the Gift Membership Received event, this is only set if the type is `giftMembershipReceivedEvent`.
        membershipGiftingDetails:
          $ref: '#/components/schemas/LiveChatMembershipGiftingDetails'
          description: Details about the Membership Gifting event, this is only set if the type is `membershipGiftingEvent`.
        pollDetails:
          $ref: '#/components/schemas/LiveChatPollDetails'
          description: Details about the poll event, this is only set if the type is `pollEvent`.
        messageRetractedDetails:
          $ref: '#/components/schemas/LiveChatMessageRetractedDetails'
        memberMilestoneChatDetails:
          $ref: '#/components/schemas/LiveChatMemberMilestoneChatDetails'
          description: Details about the Member Milestone Chat event, this is only set if the type is `memberMilestoneChatEvent`.
        giftDetails:
          $ref: '#/components/schemas/LiveChatGiftDetails'
          description: Details about the gift event, this is only set if the type is `giftEvent`.
      description: 'Next ID: 35'
    LiveChatMemberMilestoneChatDetails:
      type: object
      properties:
        memberLevelName:
          description: The name of the Level at which the viever is a member. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.
          type: string
        memberMonth:
          type: integer
          description: The total amount of months (rounded up) the viewer has been a member that granted them this Member Milestone Chat. This is the same number of months as is being displayed to YouTube users.
          format: uint32
        userComment:
          type: string
          description: The comment added by the member to this Member Milestone Chat. This field is empty for messages without a comment from the member.
    LiveChatGiftDetails:
      description: Details about the gift event, this is only set if the type is `giftEvent`.
      type: object
      properties:
        giftName:
          type: string
          description: The name of the gift.
        hasVisualEffect:
          description: Whether the gift involves a visual effect.
          type: boolean
        language:
          type: string
          description: The BCP-47 language code of the gift.
        jewelsAmount:
          format: int32
          description: The value of the gift in jewels.
          type: integer
        giftDuration:
          format: google-duration
          type: string
          description: The duration of the gift.
        giftUrl:
          type: string
          description: The URL of the gift image.
        altText:
          type: string
          description: The alternative text to be used for accessibility.
        comboCount:
          type: integer
          description: The number of times the gift has been sent in a row.
          format: int32
    TokenPagination:
      properties: {}
      description: Stub token pagination template to suppress results.
      type: object
    LiveChatPollDetailsPollMetadataPollOption:
      type: object
      properties:
        optionText:
          type: string
        tally:
          format: int64
          type: string
    LiveChatMessageRetractedDetails:
      type: object
      properties:
        retractedMessageId:
          type: string
      deprecated: true
    LiveChatUserBannedMessageDetails:
      type: object
      properties:
        bannedUserDetails:
          $ref: '#/components/schemas/ChannelProfileDetails'
          description: The details of the user that was banned.
        banType:
          enum:
          - permanent
          - temporary
          description: The type of ban.
          type: string
        banDurationSeconds:
          type: string
          description: The duration of the ban. This property is only present if the `banType` is `temporary`.
          format: uint64
    LiveChatMessageDeletedDetails:
      properties:
        deletedMessageId:
          type: string
      type: object
      deprecated: true
    LiveChatMessageAuthorDetails:
      properties:
        channelId:
          description: The YouTube channel ID.
          type: string
        profileImageUrl:
          description: The channels's avatar URL.
          type: string
        channelUrl:
          type: string
          description: The channel's URL.
        isChatOwner:
          type: boolean
          description: Whether the author is the owner of the live chat.
        isVerified:
          description: Whether the author's identity has been verified by YouTube.
          type: boolean
        displayName:
          type: string
          description: The channel's display name.
        isChatSponsor:
          description: Whether the author is a sponsor of the live chat.
          type: boolean
        isChatModerator:
          description: Whether the author is a moderator of the live chat.
          type: boolean
      type: object
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/youtube: Manage your YouTube account
            https://www.googleapis.com/auth/youtubepartner: View and manage your assets and associated content on YouTube
            https://www.googleapis.com/auth/youtube.channel-memberships.creator: See a list of your current active channel members, their current level, and when they became a member
            https://www.googleapis.com/auth/youtubepartner-channel-audit: View private information of your YouTube channel relevant during the audit process with a YouTube partner
            https://www.googleapis.com/auth/youtube.force-ssl: See, edit, and permanently delete your YouTube videos, ratings, comments and captions
            https://www.googleapis.com/auth/youtube.readonly: View your YouTube account
            https://www.googleapis.com/auth/youtube.upload: Manage your YouTube videos
externalDocs:
  url: https://developers.google.com/youtube/
x-provenance:
  method: harvested
  publisher: Google
  source: https://youtube.googleapis.com/$discovery/rest?version=v3
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261111)