# API Direct – TikTok Video Search

> API Direct – TikTok Video Search is a paid API for AI agents from x402.apidirect.io, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-30).

Search TikTok for videos by keyword, with optional filters for region, recency, sort order, and AI sentiment analysis.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/tiktok/videos?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-direct-tiktok-video-search-dcd42fee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NjK96Kf1LGxxCg6xkk3bi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-direct-tiktok-video-search-dcd42fee
```

Example prompt: Search TikTok for videos about 'sustainable fashion' posted in the last 30 days, sorted by most liked, and include AI emotion analysis for each result — fetch 2 pages and filter to US content.

## When to prefer this

Use this endpoint when you need to programmatically search TikTok video content by keyword, especially when you want flexible filtering by region, recency, or engagement, or when you need AI-powered emotion/sentiment analysis layered on top of the results. Prefer it over manual TikTok browsing or scraping for agent workflows that need structured video data, trend monitoring, or brand sentiment tracking on TikTok specifically. It is billed per page, so it is cost-efficient for targeted searches.

## Known failure modes

- Invalid or missing query parameter returns 400
- publish_time value not in the allowed enum (0,1,7,30,90,180) returns 400
- region code not exactly 2 characters returns 400
- Unrecognised sort_by value falls back silently to relevance
- pages value outside 1-10 range returns 400
- TikTok rate limits or availability issues may return 5xx errors
- No results found for obscure queries returns empty list

## How this service works

Search for TikTok videos by keyword.

## Output

Returns a merged list of TikTok videos (up to 30 per page, up to 10 pages) matching the keyword query, including video metadata such as title, author, view counts, and links. When get_sentiment is true, each video also includes a sentiment object with emotion scores (joy, trust, fear, surprise, sadness, disgust, anger, anticipation each 0-100), a dominant_emotion label, emotional_intensity (0-10), and a polarity label (positive, negative, or neutral).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "pages": {
       "type": "integer",
       "default": 1,
       "maximum": 10,
       "minimum": 1,
       "description": "Number of pages to fetch and merge (1-10). Each page returns up to 30 videos. Billed per page."
      },
      "query": {
       "type": "string",
       "maxLength": 500,
       "description": "Search query (max 500 characters)"
      },
      "region": {
       "type": "string",
       "maxLength": 2,
       "minLength": 2,
       "description": "2-letter region code to filter by (e.g., us, gb, jp, de, fr)"
      },
      "sort_by": {
       "enum": [
        "relevance",
        "most_recent",
        "most_liked"
       ],
       "type": "string",
       "default": "relevance",
       "description": "Sort order for results. Any unrecognised value falls back to relevance."
      },
      "publish_time": {
       "enum": [
        0,
        1,
        7,
        30,
        90,
        180
       ],
       "type": "integer",
       "default": 0,
       "description": "Filter by publish time in days: 0 = all time, 1 = last day, 7 = last week, 30 = last month, 90 = last 3 months, 180 = last 6 months. Any other number returns 400; a non-numeric value falls back to 0."
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to add AI emotion analysis to each video. Adds a `sentiment` object containing `emotions` (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), `dominant_emotion`, `emotional_intensity` (0-10), and `polarity` (positive, negative or neutral). Any video"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-direct-tiktok-video-search-dcd42fee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.apidirect.io](https://www.zero.xyz/host/x402.apidirect.io/llms.txt)
