Quickstart
Four steps from nothing to a second page of results. Nothing here is specific to a language — it is one HTTP request with one header, and the samples below are the same request written four ways.
Create one in the console. It is shown once, at creation — copy it then. A lost key is reissued, never recovered, because we keep only its hash.
Every sample on this site reads SORINA_KEY. Nothing takes a key in a query string, so it never ends up in an access log along the way.
POST a JSON body to a named path. The 200 is the platform’s own body — decode it as you would decode theirs.
The response’s x-tt-logid header is what pages a search. Keep it before you ask for page two.
Check you can reach us
/healthz is the one route that takes no key. It says the API is up. It does not say anything about whether a platform is answering right now — that is what a 503 on a real call tells you.
curl https://api.sorina.sh/healthz
Hold the key in your environment
Create one in the console. It arrives as one string with the prefix sor_live_, an id, and a secret — the whole thing goes in the header, and the whole thing is what you paste here.
export SORINA_KEY=sor_live_<id>_<secret>
Your first call
A keyword search over videos. It costs $0.0040 and returns the platform's own body — results under search_item_list, each element carrying a whole video object.
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}'The second page
Two things change. offset becomes the cursor the last response returned — not a number you counted — and search_id carries back the x-tt-logid header from the first page. Without it the request would start a fresh search and come back empty, so we refuse it with 400 search_id_required before it costs you anything.
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":10,"count":10,"search_id":"<the first page x-tt-logid>"}'The rules differ per tab — some page on offset, some on cursor, and one does not page at all. Pagination has the whole picture.