> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creatok.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Find music by keyword or URL

> Provide exactly one of query (keyword search) or url (TikTok music URL lookup). Keyword searches accept search_id, page_token, region, language, and page_size (1–50; default 20). URL lookup rejects search_id, page_token, region, and language. Use the selected music ID in provider_options.selected_music.id when submitting a video or photo set.

TikTok Shop only. The key creator must remain a workspace member with current account access. Read requests: 120/minute/workspace; writes: 30/minute/workspace (configurable). Media preparation and new submissions require Pro or higher. Video submission uses your API wallet; photos, reads, media preparation and cancellation are free. See https://www.creatok.ai/app/api-platform/pricing for current prices. Accepted tasks continue after plan downgrade. Unknown results are not automatically resent or refunded.



## OpenAPI

````yaml /api-reference/openapi.json get /publishing/connections/{connection_uid}/music
openapi: 3.1.0
info:
  title: CreatOK API
  version: 1.3.0
  description: >-
    Asynchronous media generation and TikTok Shop publishing API. Authenticate
    with a Bearer organization API key (cok_). Personal CLI/MCP keys are not
    accepted. Resource responses are returned directly, without a code/data
    envelope. Each response includes X-Request-Id.
servers:
  - url: https://api.creatok.ai/v1
security: []
paths:
  /publishing/connections/{connection_uid}/music:
    get:
      summary: Find music by keyword or URL
      description: >-
        Provide exactly one of query (keyword search) or url (TikTok music URL
        lookup). Keyword searches accept search_id, page_token, region,
        language, and page_size (1–50; default 20). URL lookup rejects
        search_id, page_token, region, and language. Use the selected music ID
        in provider_options.selected_music.id when submitting a video or photo
        set.


        TikTok Shop only. The key creator must remain a workspace member with
        current account access. Read requests: 120/minute/workspace; writes:
        30/minute/workspace (configurable). Media preparation and new
        submissions require Pro or higher. Video submission uses your API
        wallet; photos, reads, media preparation and cancellation are free. See
        https://www.creatok.ai/app/api-platform/pricing for current prices.
        Accepted tasks continue after plan downgrade. Unknown results are not
        automatically resent or refunded.
      operationId: listPublishingMusic
      parameters:
        - name: connection_uid
          in: path
          schema:
            type: string
          required: true
        - name: query
          in: query
          schema:
            type: string
          required: false
        - name: url
          in: query
          schema:
            type: string
          required: false
        - name: search_id
          in: query
          schema:
            type: string
          required: false
        - name: page_token
          in: query
          schema:
            type: string
          required: false
        - name: region
          in: query
          schema:
            type: string
          required: false
        - name: language
          in: query
          schema:
            type: string
          required: false
        - name: page_size
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
          required: false
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              description: Polling suggestion for nonterminal tasks
              schema:
                type: integer
        '400':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '401':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '402':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '403':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '404':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '409':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '429':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '500':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '502':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '503':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
      security:
        - ApiKey: []
components:
  schemas:
    Error:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - request_id
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: CreatOK organization API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.