Actor picture

Tiktok Scraper

mcdowell/tiktok

An advanced TikTok scraper that lets you collect videos, profiles, posts, and other publicly available data on TikTok. Download TikTok data as a HTML, JSON, CSV, Excel, or XML

Free trial for 3 days

Then $35/month

No credit card required now

Author's avatarVictor McDowell
  • Modified
  • Users40
  • Runs214
Actor picture
Tiktok Scraper

Free trial for 3 days

Then $35/month

This Scraper crawls Tiktok and extracts information on the videos hosted on the website. The video information is very detailed and can be exported to the following formats CSV,EXCEL,HTML, JSON,XML

Features

Scraper allows you to scrape:

  • Individual Video Posts - by using a specific video URL.
  • Account - Results from individual Tiktok account names.
  • Hashtag - Videos that contain a specific hashtag.

Sample Input

{
    "maxCommentsPerPost": 20,
    "maxNumberOfVideos": 20,
    "proxyConfig": {
        "useApifyProxy": true
    },
    "profiles": [
        "khaby.lame"
    ],
    "hashtags": [
        "tiktokshortfilm"
    ]
}

Output

The output can be be set to contain or ignore comments to the videos.

Comments

The default output has been set to a maximum of 20 videos and 20 comments. Changing the number of maximum comments in the Input allows for increase/decrease the number of comments per video.

Sample output;

{
    "id": "7118788072715668741",
    "desc": "Congratulations Champion! And thanks for the help! 🤣alexdeminaur bro next time call us!  #learnfromkhaby #djokovic #learnontiktok  @tiktok @tiktokcreators",
    "createTime": 1657472013,
    "duetInfo": {
        "duetFromId": "0"
    },
    "originCover": "https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/288e75ad55d24bf1a499bdee87e2b3cd_1657472015?x-expires=1666821600&x-signature=voG9UumztU1KnIAtp%2BOdE62J0ao%3D",
    "streamVideoUrl": "https://v16m-webapp.tiktokcdn-us.com/c36be775bf79b41780251bd0870de94c/6359b95a/video/tos/useast2a/tos-useast2a-ve-0068c003/d321d066474e435d98d91a9f824afa53/?a=1988&ch=0&cr=0&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C0&cv=1&br=2588&bt=1294&cs=0&ds=3&ft=ebtHKH-qMyq8Z2XbLhe2NnIqfl7Gb&mime_type=video_mp4&qs=0&rc=aGRoO2g1M2Q5PGY0ZTg7O0Bpang7bTo6ZnVqZTMzNzczM0AuYzZhNjA2NjMxLWBjYS0wYSMxcmZzcjQwNDJgLS1kMTZzcw%3D%3D&l=20221026164828126F7AD90DE43C005B1B",
    "videoUrl": "https://www.tiktok.com/@khaby.lame/video/7118788072715668741",
    "downloadAddress": "https://v16m-webapp.tiktokcdn-us.com/c36be775bf79b41780251bd0870de94c/6359b95a/video/tos/useast2a/tos-useast2a-ve-0068c003/d321d066474e435d98d91a9f824afa53/?a=1988&ch=0&cr=0&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C0&cv=1&br=2588&bt=1294&cs=0&ds=3&ft=ebtHKH-qMyq8Z2XbLhe2NnIqfl7Gb&mime_type=video_mp4&qs=0&rc=aGRoO2g1M2Q5PGY0ZTg7O0Bpang7bTo6ZnVqZTMzNzczM0AuYzZhNjA2NjMxLWBjYS0wYSMxcmZzcjQwNDJgLS1kMTZzcw%3D%3D&l=20221026164828126F7AD90DE43C005B1B",
    "format": "mp4",
    "shareCover": [
        "",
        "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068/288e75ad55d24bf1a499bdee87e2b3cd_1657472015~tplv-tiktok-play.jpeg?x-expires=1667404800&x-signature=YbJEdE%2BcF8WrUW1xl5bmr675J6U%3D",
        "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068/288e75ad55d24bf1a499bdee87e2b3cd_1657472015~tplv-tiktokx-share-play.jpeg?x-expires=1667404800&x-signature=ZXT38mlvtwe3%2BuEFCGIIntvVj9M%3D"
    ],
    "authorInfo": {
        "avatarLarger": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_1080x1080.jpeg?x-expires=1666972800&x-signature=4g1XKUJgqsNI9KV5V%2FgPFXV5%2FAI%3D",
        "avatarMedium": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_720x720.jpeg?x-expires=1666972800&x-signature=puTmGJg45sJ3%2BgISwgmlKEakFAU%3D",
        "avatarThumb": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_100x100.jpeg?x-expires=1666972800&x-signature=QsXRSLw%2BL7cEE0Xb8xTsKCQOTY0%3D",
        "commentSetting": 0,
        "downloadSetting": 0,
        "duetSetting": 0,
        "ftc": false,
        "id": "127905465618821121",
        "isADVirtual": false,
        "nickname": "Khabane lame",
        "openFavorite": false,
        "privateAccount": false,
        "relation": 0,
        "secUid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
        "secret": false,
        "signature": "Se vuoi ridere sei nel posto giusto😎 \nIf u wanna laugh u r in the right place😎",
        "stitchSetting": 0,
        "ttSeller": false,
        "uniqueId": "khaby.lame",
        "verified": true,
        "diggCount": 6406,
        "followerCount": 151000000,
        "followingCount": 78,
        "heart": 2500000000,
        "heartCount": 0,
        "videoCount": 1090
    },
    "musicInfo": {
        "album": "",
        "authorName": "Khabane lame",
        "coverLarge": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_1080x1080.jpeg?x-expires=1666972800&x-signature=4g1XKUJgqsNI9KV5V%2FgPFXV5%2FAI%3D",
        "coverMedium": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_720x720.jpeg?x-expires=1666972800&x-signature=puTmGJg45sJ3%2BgISwgmlKEakFAU%3D",
        "coverThumb": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/0465f8ceeb872bb03f30fb7ecc099a5a~c5_100x100.jpeg?x-expires=1666972800&x-signature=QsXRSLw%2BL7cEE0Xb8xTsKCQOTY0%3D",
        "duration": 30,
        "id": "7118788092378548998",
        "original": true,
        "playUrl": "https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/7118788093222275845.mp3",
        "title": "original sound"
    },
    "isAd": false,
    "adAuthorization": false,
    "adLabelVersion": 0,
    "hashtags": [
        {
            "hashtagId": "1697657584273413",
            "hashtagName": "learnfromkhaby"
        },
        {
            "hashtagId": "739862",
            "hashtagName": "djokovic"
        },
        {
            "hashtagId": "1636483010861062",
            "hashtagName": "learnontiktok"
        }
    ],
    "challenges": [
        {
            "id": "1697657584273413",
            "title": "learnfromkhaby",
            "desc": "",
            "profileThumb": "",
            "coverThumb": "",
            "isCommerce": false,
            "stats": {
                "videoCount": 0,
                "viewCount": 0
            }
        },
        {
            "id": "739862",
            "title": "djokovic",
            "desc": "",
            "profileThumb": "",
            "coverThumb": "",
            "isCommerce": false,
            "stats": {
                "videoCount": 0,
                "viewCount": 0
            }
        },
        {
            "id": "1636483010861062",
            "title": "LearnOnTikTok",
            "desc": "Discover something new with #LearnOnTikTok.",
            "profileThumb": "https://p16-sg.tiktokcdn.com/obj/tiktok-obj/399b21612eb5bdb86662b4f4f3f8cad9.png",
            "coverThumb": "https://p16-sg.tiktokcdn.com/obj/tiktok-obj/f3f58b96e2ac294c559a6873932c723a.png",
            "isCommerce": false,
            "stats": {
                "videoCount": 0,
                "viewCount": 0
            }
        }
    ],
    "warnInfo": [],
    "originalItem": false,
    "officalItem": false,
    "comments": [
        {
            "cid": "7118984082901631770",
            "text": "Khaby you are legend...And love from Nepal❤️",
            "aweme_id": "7118788072715668741",
            "create_time": 1657517653,
            "comment_language": "en",
            "digg_count": 12276,
            "reply_comment_total": 85,
            "share_info": {
                "url": "https://m.tiktok.com/v/7118788072715668741.html?_d=e4f9h905kkibb8&comment_author_id=7115738522267632646&language=ja-JP&preview_pb=0&share_comment_id=7118984082901631770&share_item_id=7118788072715668741&source=h5_m&u_code=0",
                "acl": {
                    "code": 1,
                    "extra": "{\"item_share_acl\":\"empty item value\"}"
                },
                "desc": "Lolのコメント: Khaby you are legend...And love from Nepal❤️",
                "title": "Congratulations Champion! And thanks for the help! 🤣alexdeminaur bro next time call us!  #learnfromkhaby #djokovic #learnontiktok  @tiktok @tiktokcreators"
            },
            "user": {
                "uid": "7115738522267632646",
                "unique_id": "pra.jwol",
                "nickname": "Lol"
            }
        },
        ...
    ],	
    "secret": false,
    "shareEnabled": true,
    "showNotPass": false,
    "forFriend": false
}

Requirements

The actor requires access to proxies (.i.e proxies provided by Apify or custom proxies provided by the user).

Changelog

All notable changes to this project will be documented in this section. There are no breaking changes to the project.

Added

  • Added an optional input field simplifyComments that simplifies the comments. When the input field is enabled the decrease structure of comments is replaced with the format
{
    "cid": "7118984082901631770",
    "text": "Khaby you are legend...And love from Nepal❤️",
    "uid": "7115738522267632646",
    "unique_id": "pra.jwol",
    "nickname": "Lol"
}
  • Added an optional input field earliestDate that is used to filter videos posted after the latest Date of Oldest Video

Industries

See how Tiktok Scraper is used in industries around the world