---
title: "Search TikTok"
method: GET
path: "/tiktok/search"
tags: ["TikTok"]
---

# Search TikTok

`GET /tiktok/search`

## Request

- Base URL: `https://api.scrapefield.com/v1`
- URL: `https://api.scrapefield.com/v1/tiktok/search`
- Auth: one of:
  - HTTP bearer
  - none

Search TikTok by keyword. Returns videos by default; `type=user` returns accounts and `type=hashtag` returns hashtags. Use this for trend research and creator discovery when you do not already have a username.

Costs 3 credits (13 for `type=hashtag`), whether the answer is fetched or served from cache. A failed call is refunded automatically.

## Query parameters

- `query` string, required
- `type` 'video' | 'user' | 'hashtag'
- `limit` integer
- `cursor` string
- `fresh` boolean
- `demo` boolean

## Response `200`

The request succeeded.

- object
  - `data` union[], required
    - union: `type=video` returns `tiktok_video`; `type=user` returns `tiktok_profile`; `type=hashtag` returns `tiktok_hashtag`.
      - TiktokVideo: A TikTok video.
        - `id` string, required: TikTok's numeric id — the number at the end of the URL.
        - `share_url` string, uri, required: The video.
        - `username` string, required: Who posted it.
        - `video_description` string, nullable, required: The caption.
        - `create_time` string, date-time, nullable, required: When it was posted. `null` when the source does not say.
        - `duration` integer, nullable, required: Seconds. `null` when the source does not give it.
        - `cover_image_url` string, uri, nullable, required: The video's cover image. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
        - `play_url` string, uri, nullable, required: The video file. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
        - `view_count` integer, nullable, required: `null` when the source does not give it.
        - `like_count` integer, nullable, required: `null` when the source does not give it.
        - `comment_count` integer, nullable, required: `null` when the source does not give it.
        - `share_count` integer, nullable, required: `null` when the source does not give it.
        - `favorites_count` integer, nullable, required: Saves. `null` where the page does not show them.
        - `hashtag_names` string[], required: Without the #.
        - `region_code` string, nullable, required: Where it was posted from, ISO 3166-1 alpha-2.
        - `music` object, nullable, required: The sound.
          - `id` string, required: TikTok's id for the sound.
          - `title` string, required: The sound's name, as TikTok shows it.
          - `author` string, nullable, required: Who the sound is credited to.
          - `original` boolean, required: An original sound rather than a track.
        - `duet_enabled` boolean, nullable, required: `null` where that is not known.
        - `stitch_enabled` boolean, nullable, required: `null` where that is not known.
      - TiktokProfile: A TikTok account.
        - `username` string, required: Without the @.
        - `display_name` string, nullable, required: The display name.
        - `bio_description` string, nullable, required: The bio.
        - `bio_url` string, uri, nullable, required: The link in the bio.
        - `avatar_url` string, uri, nullable, required: The profile picture. On TikTok's CDN. TikTok signs the link, and it can stop working within hours, so fetch the file soon. We do not rehost media.
        - `profile_url` string, uri, required: The profile.
        - `is_verified` boolean, required: Whether the account has the verified badge.
        - `follower_count` integer, nullable, required: `null` when the source does not give it.
        - `following_count` integer, nullable, required: `null` when the source does not give it.
        - `likes_count` integer, nullable, required: Likes across all their videos. `null` when the source does not give it.
        - `video_count` integer, nullable, required: `null` when the source does not give it.
      - TiktokHashtag: A TikTok hashtag, from a search.
        - `hashtag_name` string, required: Without the #.
        - `url` string, uri, required: The hashtag page.
        - `video_count` integer, nullable, required: How many videos use it.
        - `view_count` integer, nullable, required: Views across its videos.
  - `meta` Meta, required
    - `request_id` string, required: Quote this if you contact support.
    - `credits_charged` integer, required: The endpoint's published cost. 0 for a demo answer, and for a list emptied because everyone in it asked not to be served. A failed call has no `meta`: it answers with an error, and is refunded.
    - `credits_remaining` integer
    - `cached` boolean, required
    - `fetched_at` string, date-time, required: When the data was actually fetched — the original time on a cache hit, so freshness is always visible.
    - `next_cursor` string, nullable, required: Pass as `cursor` for the next page. `null` on the last page. It lasts as long as the answer is cached.
    - `demo` boolean: Present, and true, on a demo answer (`?demo=true` with no key).
    - `note` string: On a demo answer: what it is, and what a live call costs.

## Other responses

- `400`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `401`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `403`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `404`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `429`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `500`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `501`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `502`: Something went wrong. `error.code` is stable; `error.message` says what to do next.

---

[API](https://skmtc.dev/scrapefield/apis/scrapefield-api.md) · [All operations](https://skmtc.dev/scrapefield/apis/scrapefield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapefield/apis/scrapefield-api/revisions/cc5961ac63cf?raw)
