Skip to content

Search Videos

Create a new search job

Initiate a new search job to search for videos on Tiktok. The API will return a response with a request_id that can be used to check the status of the job. The API will also send initial results to the callback_url provided in the request.

Base URL

POST https://tiktok-scraper-api.datashake.com/v1/search

Request parameters

callback_url

Field type: string
Required: true
Description: A URL to receive API results via a JSON POST request.

keyword

Field type: string
Required: true
Description: Keyword or hashtag that will be used to run search on TikTok

external_identifier

Field type: string
Required: false
Description: A custom identifier for tracking your request. This value will be included in the callback payload.

Code example
curl --location 'https://tiktok-scraper-api.datashake.com/v1/search' --header 'x-api-key: your-api-key' --header 'Content-Type: application/json' --request POST --data '{"keyword": "healthy dinner recipes", "callback_url": "https://example.com/callback", "external_identifier": "my-custom-id"}'
import requests

url = "https://tiktok-scraper-api.datashake.com/v1/search"

payload = {
    "keyword": "healhty dinner recipes",
    "callback_url": "https://example.com/callback",
    "external_identifier": "my-custom-id"
}
headers = {
    "x-api-key": "your-api-key",
}

response = requests.post(url=url, headers=headers, json=payload)

Rules and restrictions

  • The keyword parameter is required.
  • The callback_url parameter is required.

Response

Job created response example
{
    "status": "created",
    "message": "Your request was successfully submitted.",
    "request_id": "1742515679047322765-7538bd54-2bd7-45"
}
API Response example
    {
        "request_id": "1742515679047322765-7538bd54-2bd7-45",
        "status": "completed",
        "credits_used": 152,
        "request_metadata": {
            "keyword": "healthy dinner recipes",
            "callback_url": "http://example.com/callback",
            "external_identifier": "my-custom-id"
        },
        "results": [
            {
                "unique_id": "7482099237396761887",
                "video_id": "7482099237396761887",
                "author": {
                    "id": "7272365817436587051",
                    "username": "nourishment.nutrition",
                    "name": "Nourishment Nutrition | Cloie",
                    "verified": false,
                    "follower_count": 77600
                },
                "description": "Baked feta spaghetti squash recipe⬇️ Mixing my love for feta & spaghetti squash on this one and it was 🤌🏼 Feta Baked Spaghetti Squash  •1/2 spaghetti squash •1/2 small block of feta  •salt & pepper •Italian seasoning •1 C cherry tomatoes  •1/4 C fresh basil (+more to top)  •leftover or rotisserie chicken  Slice you spaghetti squash lengthwise and then scoop out the seeds. Drizzle with a bit of avocado oil, sprinkle with salt, pepper & Italian seasoning. Place 1/2 feta block inside the squash & then cover with the tomatoes. Place the squash on a lined baking sheet, cut side up. Bake at 400 F for 40 minutes to an hour, depending on the size of your squash. You will know it’s done when you can poke the squash with a fork and it is soft. If the squash starts browning too much, you can loosely cover with foil. Once the squash is cooked, remove from oven and smash the tomatoes and cheese. Then, using a fork, separate the “noodle” strands of the squash. Next, add in the fresh basil and chicken. Taste & season if necessary. Enjoy! ✨ This makes about 2 servings - depending on the size of the squash!  ✨Follow for simple & nourishing recipes & meal ideas!  Drop your favorite weeknight dinner in the comments💬⬇️ #dinnerideas #healthymeals #healthydinner #easydinner #spaghettisquash #fetapasta #healthypasta",
                "url": "https://www.tiktok.com/@nourishment.nutrition/video/7482099237396761887",
                "download_url": null,
                "thumbnail_url": "https://p19-pu-sign-useast8.tiktokcdn-us.com/obj/tos-useast8-p-0068-tx2/owAIAElARGIEnAwfVA41Dcb1veLDECF5VnmElZ?lk3s=b59d6b55&x-expires=1742688000&x-signature=kBQsI6oCZcWuyLsKrUBzQb8JOx4%3D&shp=b59d6b55&shcp=-",
                "upload_date": "2025-03-15T18:06:50Z",
                "likes_count": 237800,
                "comments_count": 1315,
                "plays_count": 5100000,
                "shares_count": 25900,
                "bitrate": "1195495",
                "duration": 16,
                "format": "mp4",
                "video_quality": "normal",
                "original_language_code": null,
                "hashtags": [
                    "dinnerideas",
                    "healthymeals",
                    ...
                ],
                "created_at": "2025-03-21T00:08:07.793135Z",
                "updated_at": "2025-03-21T00:08:07.793136Z",
            },
            ...
        ],
        "summary": null
        "pagination": {
            "total": 73,
            "page": 1,
            "per_page": 50,
            "total_pages": 2
        }
    }

Get search results

Use this endpoint to retrieve results in a synchronous manner.

Note that this endpoint is not intended for polling - make sure to check if your request has completed before calling it.

  • No callback URL is required for this endpoint.
  • No credits are used when calling this endpoint.

Base URL

GET https://tiktok-scraper-api.datashake.com/v1/search/{request_id}

Path parameters

request_id

Field type: string
Required: true
Description: The unique identifier for the request.

Request parameters

page

Field type: integer
Required: false
Description: The page number of the results to retrieve.

per_page

Field type: integer
Required: false
Description: The number of results to retrieve per page.

page

Field type: integer
Description: The page number of the results to return.

Code example
curl --location 'https://tiktok-scraper-api.datashake.com/v1/search/1742515679047322765-7538bd54-2bd7-45?page=1&per_page=10' --header 'x-api-key: your-api-key'
import requests

url = "https://tiktok-scraper-api.datashake.com/v1/search/1742515679047322765-7538bd54-2bd7-45"

params = {
    "page": 1,
    "per_page": 10
}
headers = {
    'x-api-key': 'your-api-key',
}

response = requests.get(url=url, headers=headers, params=params)

Response

API response example
{
    "request_id": "1742515679047322765-7538bd54-2bd7-45",
    "status": "completed",
    "credits_used": 152,
    "request_metadata": {
        "keyword": "healthy dinner recipes",
        "callback_url": "http://example.com/callback",
        "external_identifier": "my-custom-id"
    },
    "results": [
        {
            "unique_id": "7482099237396761887",
            "video_id": "7482099237396761887",
            "author": {
                "id": "7272365817436587051",
                "username": "nourishment.nutrition",
                "name": "Nourishment Nutrition | Cloie",
                "verified": false,
                "follower_count": 77600
            },
            "description": "Baked feta spaghetti squash recipe⬇️ Mixing my love for feta & spaghetti squash on this one and it was 🤌🏼 Feta Baked Spaghetti Squash  •1/2 spaghetti squash •1/2 small block of feta  •salt & pepper •Italian seasoning •1 C cherry tomatoes  •1/4 C fresh basil (+more to top)  •leftover or rotisserie chicken  Slice you spaghetti squash lengthwise and then scoop out the seeds. Drizzle with a bit of avocado oil, sprinkle with salt, pepper & Italian seasoning. Place 1/2 feta block inside the squash & then cover with the tomatoes. Place the squash on a lined baking sheet, cut side up. Bake at 400 F for 40 minutes to an hour, depending on the size of your squash. You will know it’s done when you can poke the squash with a fork and it is soft. If the squash starts browning too much, you can loosely cover with foil. Once the squash is cooked, remove from oven and smash the tomatoes and cheese. Then, using a fork, separate the “noodle” strands of the squash. Next, add in the fresh basil and chicken. Taste & season if necessary. Enjoy! ✨ This makes about 2 servings - depending on the size of the squash!  ✨Follow for simple & nourishing recipes & meal ideas!  Drop your favorite weeknight dinner in the comments💬⬇️ #dinnerideas #healthymeals #healthydinner #easydinner #spaghettisquash #fetapasta #healthypasta",
            "url": "https://www.tiktok.com/@nourishment.nutrition/video/7482099237396761887",
            "download_url": null,
            "thumbnail_url": "https://p19-pu-sign-useast8.tiktokcdn-us.com/obj/tos-useast8-p-0068-tx2/owAIAElARGIEnAwfVA41Dcb1veLDECF5VnmElZ?lk3s=b59d6b55&x-expires=1742688000&x-signature=kBQsI6oCZcWuyLsKrUBzQb8JOx4%3D&shp=b59d6b55&shcp=-",
            "upload_date": "2025-03-15T18:06:50Z",
            "likes_count": 237800,
            "comments_count": 1315,
            "plays_count": 5100000,
            "shares_count": 25900,
            "bitrate": "1195495",
            "duration": 16,
            "format": "mp4",
            "video_quality": "normal",
            "original_language_code": null,
            "hashtags": [
                "dinnerideas",
                "healthymeals",
                ...
            ],
            "created_at": "2025-03-21T00:08:07.793135Z",
            "updated_at": "2025-03-21T00:08:07.793136Z",
        },
        ...
    ],
    "summary": null
    "pagination": {
        "total": 73,
        "page": 1,
        "per_page": 50,
        "total_pages": 2
    }
}