Skip to content

Extract post metadata

Scrape post metadata

Input a TikTok post URL to collect detailed metadata, including engagement metrics, captions, comments, comment replies, and media information.

Base URL

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

Request parameters

callback_url

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

url

Field type: string
Required: true
Description: URL of the TikTok post to scrape.

get_comments

Field type: boolean
Required: false
Description: Set this to true to collect comments. Retrieve them using the comments endpoint after request completion.

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/scrape' --header 'x-api-key: your-api-key' --header 'Content-Type: application/json' --request POST --data '{"url": "https://www.tiktok.com/@aussiefitness/video/7381790692554640656", "callback_url": "https://example.com/callback", "external_identifier": "my-custom-id", "get_comments": true}'
import requests

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

payload = {
    "url": "https://www.tiktok.com/@aussiefitness/video/7381790692554640656",
    "callback_url": "https://example.com/callback",
    "external_identifier": "my-custom-id",
    "get_comments": true
}
headers = {
    "x-api-key": "your-api-key",
}

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

Rules and restrictions

  • The url parameter is required.
  • The callback_url parameter is required.

Response and callback payload

API response example
{
    "status": "created",
    "message": "Your request was successfully submitted.",
    "request_id": "1742515679047322765-7538bd54-2bd7-45"
}
Callback payload example
{
    "request_id": "1742517759478683074-2b1a61cf-89d0-4d",
    "status": "completed",
    "credits_used": 100,
    "request_metadata": {
        "url": "https://www.tiktok.com/@aussiefitness/video/7381790692554640656",
        "callback_url": "http://example.com/callback",
        "external_identifier": "my-custom-id",
        "get_comments": true
    },
    "results": [
        {
            "unique_id": "7381790692554640656",
            "video_id": "7381790692554640656",
            "author": {
                "id": "6851396679263749125",
                "username": "aussiefitness",
                "name": "Aussie Fitness πŸ‡¦πŸ‡ΊπŸ’ͺ",
                "verified": true,
                "follower_count": 4300000
            },
            "description": "High Protein Creamy Garlic Chicken & Crispy Potatoes πŸ—πŸ”₯ 67g Protein! πŸ’ͺ🏼 (Macros: Per Serving - 4 Total) 477 Calories 31gC | 11gF | 67gP Ingredients: 900g Diced Potatoes (Spud Lite Potatoes) 1 Tsp Olive Oil 1 Tsp Salt, 1 Tsp Garlic & Onion Powder, 1 Tsp Italian Herb Seasoning, 1 Tsp Smoked Paprika 900g Diced Skinless & Boneless Chicken Breast (raw weight - marinated with the same ingredients used above in the potatoes) 450ml Fat Free Evaporated Milk (Carnation Light & Creamy) 1 Tsp Oregano & 1 Tsp Garlic Powder 20g Grated Mozzarella Cheese 30g Freshly Grated Parmesan Cheese 4 Diced Garlic Cloves 150ml Chicken Stock 90g Light Cream Cheese (or 6 light laughing cow cheese wedges) 2 Tsp Chicken Stock Powder / Chicken Bullion Powder (Vegeta Low Sodium Chicken Stock Powder) 1 Tsp Smoked Paprika Don't forget to check out my digital cook books with over 200 delicious & easy recipes like these!  πŸ“–πŸ‘¨πŸ»β€πŸ³ Important Notes: * Instead of using fat free evaporated milk you can also use skim milk or regular milk, although fat free evaporated milk is the best option as it’s much more thicker & creamier similar to heavy cream.   * Spud Lite potatoes or Carisma potatoes have 25% less carbs compared to regular potatoes but if you don’t have either of those available you can use russet potatoes, sweet potatoes etc. #highprotein #highproteinmealprep #potatoes #chicken #lowcalorie #fatloss #weightloss #easyrecipes #Fitness #healthyrecipes #mealprep #foodie #chickenrecipe",
            "url": "https://www.tiktok.com/@aussiefitness/video/7381790692554640656",
            "download_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/oUAnAbUOdiNJACLQIziB1HfMEcU6wGIMAqxdzI/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=3186&bt=1593&cs=0&ds=3&ft=4KJMyMzm8Zmo0OHkMb4jVR.2dpWrKsd.&mime_type=video_mp4&qs=0&rc=aGRpMzM6NmQ7MzU7Nzg0OEBpM242Nm85cmhwczMzODczNEAyMTRhMDFeXzIxLi0yLV8yYSMzMy4tMmRzM2xgLS1kMTFzcw%3D%3D&btag=e00088000&expire=1744463727&l=20250410131439632DBD74410F123B330D&ply_type=2&policy=2&signature=c15cbbd1d92c59e11f5ca499a4f5e4bb&tk=tt_chain_token",
            "thumbnail_url": "https://p16-sign-sg.tiktokcdn.com/obj/tos-alisg-p-0037/081da38b75f040e3bfc4d81dadf0b343_1718707087?lk3s=81f88b70&x-expires=1744462800&x-signature=1FvxHVvQtDJGe9%2FU9kV2IRh2SbU%3D&shp=81f88b70&shcp=-",
            "upload_date": "2024-06-18T10:38:04Z",
            "likes_count": 313600,
            "comments_count": 1184,
            "plays_count": 7500000,
            "shares_count": 63600,
            "bitrate": "1594342",
            "duration": 48,
            "format": "mp4",
            "video_quality": "normal",
            "original_language_code": "en",
            "hashtags": [
                "highprotein",
                "highproteinmealprep",
                "potatoes",
                "chicken",
                "lowcalorie",
                "fatloss",
                "weightloss",
                "easyrecipes",
                "fitness",
                "healthyrecipes",
                "mealprep",
                "foodie",
                "chickenrecipe"
            ],
            "captions": [
                {
                    "language_code": "en",
                    "is_original_caption": true,
                    "is_auto_generated": true,
                    "text": "If you're looking for a delicious and easy high protein meal, this Creamy Garlic Chicken with Crispy Potatoes has nearly 70 grams of protein per meal and is perfect for meal prep. In a bowl, add diced potatoes, a bit of olive oil and the seasonings listed on screen. Mix it together and air fry or oven bake them with the settings on screen. While that's baking, grab your diced chicken breast, add some olive oil with the same seasonings used for the potatoes. Mix well, then cook it on medium to high heat. And once it's nice and cooked, then in a blender cup, add fat free milk, mozzarella, Parmesan, cheese, oregano, blender and set it aside to the same pan you cook the chicken in. Add diced garlic, chicken stock, the blended sauce. Then lower the heat and add light cream cheese, chicken stock powder and smoked paprika. Keep mixing and simmer on low until it's smooth and creamy. Now equally distribute the crispy potatoes, chicken and creamy garlic sauce into 4 servings and enjoy."
                }
            ],
            "created_at": "2025-03-21T00:45:10.960484Z",
            "updated_at": "2025-03-21T00:45:10.960486Z",
        }
    ],
    "summary": null,
    "pagination": null
}

Get scraping 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/scrape/{request_id}

Path parameters

request_id

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

Code example
curl --location 'https://tiktok-scraper-api.datashake.com/v1/scrape/1742517759478683074-2b1a61cf-89d0-4d' --header 'x-api-key: your-api-key'
import requests

url = "https://tiktok-scraper-api.datashake.com/v1/scrape/1742517759478683074-2b1a61cf-89d0-4d"

headers = {
    "x-api-key": "your-api-key",
}

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

Response

API response example
{
    "request_id": "1742517759478683074-2b1a61cf-89d0-4d",
    "status": "completed",
    "credits_used": 100,
    "request_metadata": {
        "url": "https://www.tiktok.com/@surthycooks/video/7473271005096463671",
        "callback_url": "http://example.com/callback",
        "external_identifier": "my-custom-id",
        "get_comments": true
    },
    "results": [
        {
            "unique_id": "7473271005096463671",
            "video_id": "7473271005096463671",
            "author_id": "6804917131903255558",
            "author_unique_id": "surthycooks",
            "author_nickname": "Surthycooks",
            "author_verified": true,
            "author_follower_count": 33600000,
            "description": "Ceviche peruano πŸ‡΅πŸ‡ͺ #peru  (Considerado el mejor del mundo) ",
            "url": "https://www.tiktok.com/@surthycooks/video/7473271005096463671",
            "download_url": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast2a/tos-useast2a-pve-0068/ogntIfl2Af7MAQvSeTIVo5LeiDKsIYeyJOgOGq/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&br=2678&bt=1339&cs=0&ds=3&ft=4KJMyMzm8Zmo0Llsib4jVHaCdpWrKsd.&mime_type=video_mp4&qs=0&rc=ZmhkaTg8Njg6O2VlOjs3ZUBpajp4d3g5cnY5eDMzNzczM0AtM14yYC1jNmAxLzNiMDY1YSMwMC9zMmRzNG9gLS1kMTZzcw%3D%3D&btag=e00090000&expire=1742690770&l=20250321004510049D142E30016625D0E1&ply_type=2&policy=2&signature=1c9e3cc7ebc43b855765b22d98ebc93c&tk=tt_chain_token",
            "thumbnail_url": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068/osP26kZsaaQ0EUiA6ZCc5EZBiiAA7BGiIEYA2~tplv-dmt-logom:tos-useast2a-v-0068/oANJIGFCAQJoGMesBADAQRtxR8nQyCFEAmETfH.image?lk3s=81f88b70&x-expires=1742688000&x-signature=Eg93VbIRYMIbC0NqE1z35NgsjYo%3D&shp=81f88b70&shcp=-",
            "upload_date": "2025-02-19T23:08:25Z",
            "likes_count": 1200000,
            "comments_count": 35100,
            "plays_count": 16800000,
            "shares_count": 21000,
            "bitrate": "1336886",
            "duration": 60,
            "format": "mp4",
            "video_quality": "normal",
            "original_language_code": null,
            "hashtags": [
                "peru"
            ],
            "captions": [],
            "created_at": "2025-03-21T00:45:10.960484Z",
            "updated_at": "2025-03-21T00:45:10.960486Z",
        }
    ],
    "summary": null,
    "pagination": null
}