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

# Search TikTok videos by keyword

> Runs a TikTok video search for `query` in a real browser session and returns the results as JSON: `query`, `url`, `results` - the videos in TikTok's ranking, each in the full `/social/tiktok-video` shape (exact plays, likes, comments, shares, saves, hashtags, author with stats, music, media URLs, subtitles) - `resultsCollected` and `hasMore`. `proxy_country` picks the region TikTok ranks for. No login or cookies. Takes 10-30 s because the page is scrolled for each batch.



## OpenAPI

````yaml /api-reference/openapi.json post /social/tiktok-search
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Three endpoints are
    documented here: page-source extraction, Google SERP scraping, and image
    fetch. All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /social/tiktok-search:
    post:
      tags:
        - Plugins
      summary: Search TikTok videos by keyword
      description: >-
        Runs a TikTok video search for `query` in a real browser session and
        returns the results as JSON: `query`, `url`, `results` - the videos in
        TikTok's ranking, each in the full `/social/tiktok-video` shape (exact
        plays, likes, comments, shares, saves, hashtags, author with stats,
        music, media URLs, subtitles) - `resultsCollected` and `hasMore`.
        `proxy_country` picks the region TikTok ranks for. No login or cookies.
        Takes 10-30 s because the page is scrolled for each batch.
      operationId: tiktok_search_social_tiktok_search_post
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            description: Search keywords, e.g. 'space telescope'.
            title: Query
          description: Search keywords, e.g. 'space telescope'.
        - name: max_results
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: >-
              How many videos to return (1-200). About 12 arrive per scroll;
              deep pages take longer (10-30 s).
            default: 20
            title: Max Results
          description: >-
            How many videos to return (1-200). About 12 arrive per scroll; deep
            pages take longer (10-30 s).
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Exit-IP country (ISO-2). TikTok ranks search by region, so set it
              to get the results a user in that country sees.
            title: Proxy Country
          description: >-
            Exit-IP country (ISO-2). TikTok ranks search by region, so set it to
            get the results a user in that country sees.
      responses:
        '200':
          description: JSON search object with a `results` array.
          content:
            application/json:
              schema: {}
        '400':
          description: Missing query / bad proxy_country.
        '404':
          description: TikTok returned no results for the query.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: Blocked by TikTok on every exit.
        '503':
          description: Browser engine unavailable on this node - retry.
        '504':
          description: Fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````