Skip to main content
Glama

openapi_v2_tiktok_videos_search

Tiktok Videos Search

Search daily-updated TikTok videos by engagement, creator, and commerce signals.

Filter by play and like counts, interaction rate, creator follower count, publish date, whether the video carries a shoppable product, and the product's category (by id or path). Each video also returns the primary product's category id and path. Data is from the latest daily video collection within the fallback window. Interaction rate is (likes + comments + shares + saves) / plays, as a decimal; it is computed per video, so filtering by it narrows the result set but does not reduce query time. Related: /tiktok/creators/search and /tiktok/products/search.

Responses:

200: Successful Response (Success Response) Content-Type: application/json

Example Response:

{
  "success": true,
  "meta": {
    "requestId": "Requestid",
    "timestamp": "Timestamp"
  }
}

Output Schema:

{
  "properties": {
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "Whether the request was successful",
      "default": true
    },
    "data": {
      "title": "Data",
      "description": "Response data payload"
    },
    "error": {
      "description": "Error details if request failed"
    },
    "meta": {
      "description": "Metadata for API responses.\n\nCredit fields follow the ADR-0003 parallel-fields strategy (Option 3):\n- `credits_remaining` / `credits_consumed` (int): legacy fields, rounded\n  to whole credits, kept for zero-breaking-change to existing SDK clients.\n- `credits_remaining_exact` / `credits_consumed_exact` (float): new\n  precision-aware fields for clients that opt in to decimal credits.\n\nSee ADR-0003 decision 5 and the \u00a78 deprecation timeline.\n\nTODO(2026-11, ADR-0003 \u00a78 +6mo): mark `credits_remaining` /\n`credits_consumed` as `deprecated=True` in their Field() definitions\nand announce in customer changelog.\nTODO(2027-05, ADR-0003 \u00a78 +12mo): remove the legacy int fields via a\nmajor-version bump of the OpenAPI surface.",
      "properties": {
        "requestId": {
          "type": "string",
          "title": "Requestid",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "title": "Timestamp",
          "description": "Response timestamp in ISO 8601 format"
        },
        "total": {
          "title": "Total",
          "description": "Total number of records"
        },
        "page": {
          "title": "Page",
          "description": "Current page number"
        },
        "pageSize": {
          "title": "Pagesize",
          "description": "Number of records per page"
        },
        "totalPages": {
          "title": "Totalpages",
          "description": "Total number of pages"
        },
        "creditsRemaining": {
          "title": "Creditsremaining",
          "description": "Remaining API credits (rounded to whole credits; see creditsRemainingExact for precise value)"
        },
        "creditsConsumed": {
          "title": "Creditsconsumed",
          "description": "Credits consumed by this request (rounded; see creditsConsumedExact for precise value)"
        },
        "creditsRemainingExact": {
          "title": "Creditsremainingexact",
          "description": "Remaining API credits, precise to 1 decimal place"
        },
        "creditsConsumedExact": {
          "title": "Creditsconsumedexact",
          "description": "Credits consumed by this request, precise to 1 decimal place"
        },
        "tokensUsage": {
          "description": "Provider token-usage block \u2014 populated on terminal video polls only, null on every non-video endpoint. See TokensUsage for its fields."
        }
      },
      "type": "object",
      "required": [
        "requestId",
        "timestamp"
      ],
      "title": "ResponseMeta"
    }
  },
  "type": "object",
  "required": [
    "meta"
  ],
  "title": "OpenApiResponse[list[TikTokVideo]]",
  "examples": []
}

422: Validation Error Content-Type: application/json

Example Response:

{
  "detail": [
    {
      "loc": [],
      "msg": "Message",
      "type": "Error Type",
      "ctx": {}
    }
  ]
}

Output Schema:

{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {},
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-indexed page number.
isAigcNoFilter by AI-generated-content status. true = only AIGC videos; false = only confirmed non-AIGC (unknown excluded). Omit to return all. Unknown status is not directly filterable — a result with no isAigc field has unknown status.
sortByNoSort field for video search.playCount
videoIdNoExact TikTok video ID to look up.
pageSizeNoPage size, 1–100; values above 20 are served as 20. Default 20.
sortOrderNoSort direction. Default desc.desc
categoryIdNoTikTok category ID — matches videos whose primary product anchor category has this id at any of the 7 hierarchy levels.
hasProductNoFilter by whether the video carries a shoppable product. True: the video has a TikTok Shop product anchor; False: it has none. Omit to include both.
categoryPathNoCategory path names, root → leaf, e.g. ['Home Improvement', 'Bathroom Fixtures']. Subtree match: the video's first N category level names must equal the N supplied segments in order; deeper levels (if any) are unconstrained. A partial path matches the whole subtree below it; supply the full leaf path to narrow to that single node. Must contain 1 to 7 segments (TikTok's max category depth) — deeper paths are rejected.
diggCountMaxNoMaximum like count.
diggCountMinNoMinimum like count.
playCountMaxNoMaximum play (view) count.
playCountMinNoMinimum play (view) count.
shareCountMaxNoMaximum share count.
shareCountMinNoMinimum share count.
publishedAtMaxNoLatest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-30.
publishedAtMinNoEarliest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-01.
repostCountMaxNoMaximum on-platform repost count.
repostCountMinNoMinimum on-platform repost count.
collectCountMaxNoMaximum save/collect count.
collectCountMinNoMinimum save/collect count.
commentCountMaxNoMaximum comment count.
commentCountMinNoMinimum comment count.
interactionRateMaxNoMaximum interaction rate, as a decimal. Interaction rate = (likes + comments + shares + saves) / plays.
interactionRateMinNoMinimum interaction rate, as a decimal. Interaction rate = (likes + comments + shares + saves) / plays.
creatorFollowerCountMaxNoMaximum follower count of the video's creator.
creatorFollowerCountMinNoMinimum follower count of the video's creator.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / isAigc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Filter by AI-generated-content status. true = only AIGC videos; false = only confirmed non-AIGC (unknown excluded). Omit to return all. Unknown status is not directly filterable — a result with no isAigc field has unknown status.",
      +  "title": "isAigc",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / pageSize / description
      Previous value: -"Page size, 1–100. Default 20."New value: +"Page size, 1–100; values above 20 are served as 20. Default 20."
  3. Changed16 schema fields changed
    • addedInput schema / properties / categoryId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "TikTok category ID — matches videos whose primary product anchor category has this id at any of the 7 hierarchy levels.",
      +  "title": "categoryId",
      +  "type": "string"
      +}
    • addedInput schema / properties / categoryPath
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "maxItems": 7,
      +      "minItems": 1,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Category path names, root → leaf, e.g. ['Home Improvement', 'Bathroom Fixtures']. Subtree match: the video's first N category level names must equal the N supplied segments in order; deeper levels (if any) are unconstrained. A partial path matches the whole subtree below it; supply the full leaf path to narrow to that single node. Must contain 1 to 7 segments (TikTok's max category depth) — deeper paths are rejected.",
      +  "title": "categoryPath",
      +  "type": "array"
      +}
    • addedInput schema / properties / collectCountMax
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum save/collect count.",
      +  "title": "collectCountMax",
      +  "type": "integer"
      +}
    • addedInput schema / properties / collectCountMin
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Minimum save/collect count.",
      +  "title": "collectCountMin",
      +  "type": "integer"
      +}
    • addedInput schema / properties / commentCountMax
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum comment count.",
      +  "title": "commentCountMax",
      +  "type": "integer"
      +}
    • addedInput schema / properties / commentCountMin
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Minimum comment count.",
      +  "title": "commentCountMin",
      +  "type": "integer"
      +}
    • changedInput schema / properties / hasProduct / description
      Previous value: -"Filter to videos that carry a product anchor (e.g. a shoppable tag). True indicates a product anchor is present; it does not guarantee a resolvable product. Omit to include both."New value: +"Filter by whether the video carries a shoppable product. True: the video has a TikTok Shop product anchor; False: it has none. Omit to include both."
    • removedInput schema / properties / publishedAfter
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "date",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Earliest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-01.",
      -  "title": "publishedAfter",
      -  "type": "string"
      -}
    • addedInput schema / properties / publishedAtMax
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Latest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-30.",
      +  "title": "publishedAtMax",
      +  "type": "string"
      +}
    • addedInput schema / properties / publishedAtMin
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Earliest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-01.",
      +  "title": "publishedAtMin",
      +  "type": "string"
      +}
    • removedInput schema / properties / publishedBefore
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "date",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Latest publish date (inclusive), as YYYY-MM-DD in UTC, e.g. 2026-06-30.",
      -  "title": "publishedBefore",
      -  "type": "string"
      -}
    • addedInput schema / properties / repostCountMax
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum on-platform repost count.",
      +  "title": "repostCountMax",
      +  "type": "integer"
      +}
    • addedInput schema / properties / repostCountMin
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Minimum on-platform repost count.",
      +  "title": "repostCountMin",
      +  "type": "integer"
      +}
    • addedInput schema / properties / shareCountMax
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Maximum share count.",
      +  "title": "shareCountMax",
      +  "type": "integer"
      +}
    • addedInput schema / properties / shareCountMin
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Minimum share count.",
      +  "title": "shareCountMin",
      +  "type": "integer"
      +}
    • changedInput schema / properties / sortBy / enum
      Previous value: -[
      -  "playCount",
      -  "diggCount",
      -  "interactionRate",
      -  "createTime"
      -]New value: +[
      +  "playCount",
      +  "diggCount",
      +  "commentCount",
      +  "shareCount",
      +  "collectCount",
      +  "repostCount",
      +  "interactionRate",
      +  "publishedAt"
      +]
  4. Added

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description carries the full burden. It discloses data freshness (daily collection within fallback window), interaction rate calculation, and that filtering by interaction rate does not reduce query time. However, it omits pagination behavior, default sort order, rate limiting, and potential side effects (none, but that's not stated).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with purpose, filters, and key computation. The inclusion of a response example and extensive output schema in the description text is verbose and unnecessary given the output schema is already provided separately, but the core description is efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 27 parameters, the description covers all key aspects (filter dimensions, data source, computation, alt tools). However, it lacks explicit mention of pagination defaults, maximum page size (already in schema), and does not handle edge cases like empty result sets. But with 100% schema coverage and clear purpose, it's adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds context for some parameters (e.g., categoryPath subtree matching semantics) but largely restates what the schema already documents. It adds marginal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it searches daily-updated TikTok videos by engagement, creator, and commerce signals, with a specific verb ('search') and resource ('TikTok videos'). Differentiates from sibling tools by listing concrete filter dimensions and explicitly naming related tools at the end.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context on when to use the tool (searching videos with specific filters) and explicit alternative tools: 'Related: /tiktok/creators/search and /tiktok/products/search.' However, it does not explicitly state when NOT to use this tool over those alternatives (e.g., when needing creator-only data).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources