Search videos

search · $0.0040

The Videos tab, paginated.

POST https://api.sorina.sh/v1/tiktok/search/videos

Body

keyword string
What to search for.
offset integer?
Where to start. 0 for the first page; then the cursor the last page returned.
count integer?
Page size. Defaults to 20.
search_id string?
Required from the second page on: the first page’s x-tt-logid. Without it the request starts a new search and comes back empty, so we refuse it with 400 search_id_required instead.

A type written with ? is optional. Unknown fields are rejected rather than ignored, and the whole body is capped at 64 KiB.

Example

curl -X POST https://api.sorina.sh/v1/tiktok/search/videos \
  -H "authorization: Bearer $SORINA_KEY" \
  -H 'content-type: application/json' \
  -d '{"keyword":"nasa","offset":0,"count":10}'

What comes back

JSON, up to a few hundred KB. The results are under search_item_list, each element {aweme_info, search_aweme_info} where aweme_info is a whole video object.

aweme_list is also present and is empty. Reading results from it is the most common way to conclude a search found nothing.

cursor is what to send as the next offset; has_more is an integer. log_pb.impr_id and extra.logid are the same value as the x-tt-logid header — that is your search_id.

pages on offset

Send the value the previous response returned, not one you counted. Page two and later must also carry the first page's x-tt-logid back as search_id, or the call is refused with 400 search_id_required. Pagination has the rest.