openapi: 3.0.0
info:
  title: Kick Channel API
  description: |
    Get a Kick channel's public profile and live state from its username. The profile carries the channel and user ids, display name, bio, avatar, banners, follower count, verified, banned and affiliate flags and social handles. The response also lists the channel's recent categories. While the channel is on air it also carries the stream: id, title, viewers, start time, language, mature flag, category and thumbnail.

    **Cross-linking**: `profile.channel_id`, `profile.user_id` and `live.id` are Kick's own ids for the channel, its owner and its stream.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Kick Channel Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: Search engine identifier
          schema:
            type: string
            enum: ["kick_channel"]
            default: "kick_channel"
        - name: username
          in: query
          required: true
          description: Kick username as in kick.com/username, with or without a leading @. Case is ignored and spaces become dashes. Kick spells some usernames that have _ with - instead, so a username with _ is also tried with -.
          schema:
            type: string
            pattern: '^@?[A-Za-z0-9_ -]{1,25}$'
        - name: zero_retention
          in: query
          required: false
          description: Set to true to disable logging and persistent storage for this request. Enterprise plans only.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Validation Error. There is an issue with query parameters, such as missing required parameters or invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication Error. The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden. Zero data retention is not available to the account, or the account requires `zero_retention=true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate Limit Exceeded. The number of allowed requests has been exceeded. Consider upgrading your plan or waiting for the limit to reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error. Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Timeout. We could not retrieve results in 90 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Bearer authentication. Format: "Bearer YOUR_API_KEY"'
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Pass API key as query parameter
  schemas:
    SearchResponse:
      type: object
      required: [search_metadata, search_parameters]
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        profile:
          $ref: '#/components/schemas/Profile'
        is_live:
          type: boolean
          description: Whether the channel is streaming live at the time of the request.
        live:
          $ref: '#/components/schemas/Live'
        recent_categories:
          type: array
          description: Categories the channel streamed in recently.
          items:
            $ref: '#/components/schemas/Category'
        error:
          type: string
          description: Error message for a username with no Kick channel behind it.

    SearchMetadata:
      type: object
      required: [status, created_at]
      properties:
        id:
          type: string
          description: Unique identifier for the search request
        status:
          type: string
          description: Status of the search request
        created_at:
          type: string
          format: date-time
          description: Timestamp when the search was created
        request_time_taken:
          type: number
          description: Time taken to make the request in seconds
        parsing_time_taken:
          type: number
          description: Time taken to parse the results in seconds
        total_time_taken:
          type: number
          description: Total time taken for the search in seconds
        request_url:
          type: string
          description: Kick URL for this search
        html_url:
          type: string
          description: URL to view HTML results
        json_url:
          type: string
          description: URL to view JSON results

    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine identifier
        username:
          type: string
          description: The username sent, lower-cased, without a leading @ and with spaces as -
        zero_retention:
          type: boolean
          description: Whether zero data retention was requested

    Profile:
      type: object
      required: [channel_id, user_id, username, link, followers]
      properties:
        channel_id:
          type: integer
          description: Kick channel ID.
        user_id:
          type: integer
          description: Kick user ID of the channel owner.
        username:
          type: string
          description: Channel handle as in kick.com/username.
        name:
          type: string
          description: Display name of the channel owner.
        link:
          type: string
          description: URL of the channel page.
        bio:
          type: string
          description: Channel bio.
        avatar:
          type: string
          description: URL of the profile picture.
        banner:
          type: string
          description: URL of the channel banner image.
        offline_banner:
          type: string
          description: URL of the image the channel shows while offline.
        followers:
          type: integer
          description: Number of followers.
        is_verified:
          type: boolean
          description: Whether Kick has verified the channel.
        is_banned:
          type: boolean
          description: Whether Kick has banned the channel.
        is_affiliate:
          type: boolean
          description: Whether the channel is a Kick affiliate.
        is_vod_enabled:
          type: boolean
          description: Whether the channel keeps recordings of its streams.
        is_subscription_enabled:
          type: boolean
          description: Whether viewers can subscribe to the channel.
        social_handles:
          $ref: '#/components/schemas/SocialHandles'

    SocialHandles:
      type: object
      description: Handles the channel owner lists for other platforms.
      properties:
        instagram:
          type: string
          description: Instagram handle.
        twitter:
          type: string
          description: X (Twitter) handle.
        youtube:
          type: string
          description: YouTube handle or channel path.
        discord:
          type: string
          description: Discord handle or invite.
        tiktok:
          type: string
          description: TikTok handle.
        facebook:
          type: string
          description: Facebook handle.

    Live:
      type: object
      required: [id, link]
      properties:
        id:
          type: string
          description: Kick stream ID.
        link:
          type: string
          description: URL of the channel page where the stream plays.
        title:
          type: string
          description: Title of the stream.
        viewers:
          type: integer
          description: Number of people watching at the time of the request.
        started_at:
          type: string
          format: date-time
          description: Stream start timestamp in ISO 8601 format.
        language:
          type: string
          description: Language code of the stream.
        is_mature:
          type: boolean
          description: Whether the stream is marked for mature audiences.
        category:
          $ref: '#/components/schemas/LiveCategory'
        thumbnail:
          type: string
          description: URL of the stream thumbnail.

    LiveCategory:
      type: object
      properties:
        id:
          type: integer
          description: Kick category ID.
        name:
          type: string
          description: Category name.
        slug:
          type: string
          description: Category handle as in kick.com/category/slug.

    Category:
      type: object
      properties:
        id:
          type: integer
          description: Kick category ID.
        name:
          type: string
          description: Category name.
        slug:
          type: string
          description: Category handle as in kick.com/category/slug.
        parent:
          type: string
          description: Name of the top-level group the category belongs to.

    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
