TikTok Hashtag Scraper avatar
TikTok Hashtag Scraper

Pricing

$25.00/month + usage

Go to Apify Store
TikTok Hashtag Scraper

TikTok Hashtag Scraper

A powerful and efficient actor that scrapes TikTok videos by hashtag, extracting comprehensive metadata including author information, engagement statistics, video details, and music information.

Pricing

$25.00/month + usage

Rating

0.0

(0)

Developer

Pratham Yadav

Pratham Yadav

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 hours ago

Last modified

Share

TikTok Hashtag Scraper with Video Downloader

A powerful and efficient Apify actor that scrapes TikTok videos by hashtag, extracting comprehensive metadata and optionally downloading videos directly to Apify storage for easy access.

๐ŸŒŸ Features

  • ๐Ÿท๏ธ Multi-Hashtag Scraping - Scrape videos from multiple hashtags in a single run
  • โšก Parallel Processing - Fast data extraction using batch processing (3x faster)
  • ๐Ÿ“ฅ Video Download - Download videos in HD quality and store them in Apify's key-value store
  • ๐Ÿ“Š Rich Metadata - Comprehensive data including:
    • Author details (username, nickname, avatar, verification status, bio)
    • Video metadata (duration, resolution, cover image, download URL)
    • Music information (song title, artist, cover image)
    • Engagement statistics (likes, comments, shares, views, saves)
    • Timestamps (creation date, scrape date)
    • Download information (storage key, quality, file size)
  • ๐Ÿ” Proxy Support - Built-in Apify Proxy integration for reliable access
  • ๐ŸŽฏ Smart Extraction - Uses multiple extraction methods (JSON + DOM) for reliability
  • ๐Ÿ’พ Real-time Export - Data pushed to dataset as it's collected
  • ๐ŸŽฌ HD Quality - Automatically downloads videos in highest quality available

๐Ÿš€ Quick Start

  1. Add hashtags you want to scrape (without # symbol)
  2. Set number of results per hashtag (1-100)
  3. Enable video download (optional) to save videos to storage
  4. Enable Apify Proxy (RESIDENTIAL recommended)
  5. Run the actor and watch results appear in real-time!

๐Ÿ“ฅ Input Configuration

Required Settings

FieldTypeDescription
HashtagsArrayList of hashtags to scrape (e.g., ["travel", "food", "tech"])

Optional Settings

FieldTypeDefaultDescription
Results Per HashtagInteger20Number of videos to scrape per hashtag (1-100)
Download VideosBooleanfalseDownload actual video files to Apify key-value store (HD quality when available)
Get Detailed DataBooleantrueVisit each video page for complete details (slower but more data)
Proxy ConfigurationObject-Apify Proxy settings (highly recommended)
Download CoversBooleanfalseDownload video cover images (not yet implemented)

Example Input

{
"hashtags": ["travel", "foodie", "tech"],
"resultsPerPage": 30,
"shouldDownloadVideos": true,
"getDetailedData": true,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

๐Ÿ“ค Output Format

Each scraped video contains:

{
"videoUrl": "https://www.tiktok.com/@username/video/1234567890",
"videoId": "7484313881280564526",
"text": "Video description with hashtags...",
"hashtag": "travel",
"authorMeta": {
"name": "username",
"nickname": "Display Name",
"avatar": "https://...",
"verified": false,
"signature": "User bio text"
},
"videoMeta": {
"duration": 15,
"width": 720,
"height": 1280,
"coverUrl": "https://...",
"downloadUrl": "https://..."
},
"musicMeta": {
"musicId": "7249132457248737282",
"musicName": "Song Title",
"musicAuthor": "Artist Name",
"musicOriginal": false,
"coverUrl": "https://..."
},
"stats": {
"likesCount": 122600,
"commentsCount": 255,
"sharesCount": 4867,
"viewsCount": 775200,
"savedCount": 13806
},
"createTime": "1742577652",
"createTimeISO": "2025-03-21T17:20:52.000Z",
"scrapedAt": "2024-12-14T16:39:49.802993",
"downloadInfo": {
"success": true,
"storage_key": "video_7484313881280564526",
"quality": "HD",
"file_size": 2458932
}
}

Accessing Downloaded Videos

When shouldDownloadVideos is enabled, videos are stored in Apify's key-value store:

  1. Go to Storage tab in your actor run
  2. Click on Key-Value Store
  3. Find videos named video_{videoId}
  4. Download or access videos directly from there

Each video is stored with a unique key in the format: video_7484313881280564526

๐ŸŽฌ Video Download Feature

How It Works

  1. Actor scrapes video metadata from hashtag pages
  2. For each video, it fetches the HD download URL using tikwm.com API
  3. Videos are downloaded and stored in Apify's key-value store
  4. Download information is added to the dataset output

Video Quality

  • HD Quality: Automatically downloads HD version when available
  • Fallback: Downloads standard quality if HD is unavailable
  • File Format: MP4 format, compatible with all devices

Storage & Access

  • Videos stored in Apify Key-Value Store
  • Accessible via Apify Console โ†’ Storage โ†’ Key-Value Store
  • Can be downloaded individually or via API
  • Storage key format: video_{videoId}

Performance Impact

  • Downloading videos increases run time (1-2 seconds per video)
  • Increases storage usage (videos typically 2-10 MB each)
  • May increase actor costs due to longer runtime and storage

๐Ÿ”’ Proxy Configuration

Why Proxies Are Required

TikTok restricts access from:

  • Data center IPs
  • Cloud server IPs (AWS, Google Cloud, etc.)
  • Known scraping/bot IPs

Without proxy: Actor will fail to connect or get blocked quickly

{
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Proxy Options

  1. Apify Residential Proxy (Recommended)

    • Best success rate for TikTok
    • Slower but more reliable
    • Higher cost but worth it
  2. Apify Datacenter Proxy

    • Faster but may get blocked
    • Lower cost
    • Use as backup option

Alternative Options

  • Use your own proxy server (configure in input)
  • Deploy on servers in TikTok-supported regions
  • Use VPN before running locally

๐Ÿ“Š Performance

  • Speed: ~2-3 minutes for 40 videos (with detailed data)
  • With Download: ~3-5 minutes for 40 videos (including video downloads)
  • Accuracy: 95%+ data extraction success rate
  • Download Success: 90%+ video download success rate
  • Reliability: Automatic fallback mechanisms if extraction fails

๐ŸŽฏ Use Cases

  • Social Media Analytics - Track hashtag performance and trends
  • Content Research - Discover popular content in your niche
  • Competitor Analysis - Monitor competitor hashtags and engagement
  • Content Archive - Download and archive viral videos for analysis
  • Market Research - Understand audience preferences and behaviors
  • Influencer Discovery - Find creators in specific niches
  • Trend Monitoring - Stay updated with viral content
  • Content Repurposing - Download videos for editing or compilation (respect copyright)

โš ๏ธ Limitations

  • Maximum 100 videos per hashtag per run
  • Video download requires stable internet connection
  • TikTok may change their structure (actor maintained regularly)
  • CAPTCHA challenges may appear (rare with good proxies)
  • Some videos may be region-restricted or private
  • Rate limiting applies (built-in delays prevent blocking)
  • Downloaded videos increase storage costs

๐Ÿ”ง Troubleshooting

Actor fails to connect

Solution: Enable Apify Proxy with RESIDENTIAL group in input settings

No videos found

Possible causes:

  • Hashtag has no recent content
  • TikTok changed their HTML structure
  • CAPTCHA appeared (check logs)
  • Proxy issue (try different proxy group)

Slow performance

Solutions:

  • Set getDetailedData: false for faster scraping (less data)
  • Disable shouldDownloadVideos for metadata-only scraping
  • Reduce resultsPerPage number
  • Use RESIDENTIAL proxies (faster than datacenter)

Video download fails

Possible causes:

  • Video is private or deleted
  • Download API (tikwm.com) is temporarily unavailable
  • Network timeout
  • Video URL is invalid

Solution: Check logs for specific error messages. Some videos may fail while others succeed.

Missing data fields

Cause: TikTok occasionally updates their data structure

Solution: Check for actor updates or report issue

๐Ÿ“ Best Practices

  1. Start Small - Test with 10-20 videos first
  2. Use Residential Proxies - Better success rate and speed
  3. Enable Detailed Data - For complete information (slightly slower)
  4. Monitor Storage - Video downloads increase storage usage
  5. Monitor Costs - Check usage in Apify Console
  6. Respect Rate Limits - Don't scrape thousands of videos at once
  7. Regular Updates - Keep actor updated for best performance
  8. Test Downloads - Try with a few videos before bulk downloading

๐Ÿ’ฐ Cost Considerations

Without Video Download

  • Typical cost: $0.05-0.15 per 100 videos scraped
  • Storage: Minimal (only metadata, < 1 MB per 100 videos)

With Video Download

  • Typical cost: $0.15-0.40 per 100 videos (includes download time)
  • Storage: 200-1000 MB per 100 videos (depends on video length)
  • Network: Higher bandwidth usage

Tip: Start without downloads to test, then enable for selected runs

  • โœ… Respect TikTok's Terms of Service
  • โœ… Use scraped data responsibly
  • โœ… Do not scrape private or sensitive content
  • โœ… Be mindful of creator rights and privacy
  • โœ… Respect video copyrights when downloading
  • โœ… Do not redistribute downloaded videos without permission
  • โœ… Follow data protection regulations (GDPR, etc.)
  • โœ… Rate limiting is built-in to prevent abuse

Note: This tool is for research and analytics purposes. Downloaded videos should only be used for personal analysis, research, or with proper permissions. Users are responsible for how they use the scraped data and downloaded videos.

๐Ÿ†˜ Support

๐Ÿ† Why Choose This Actor?

  • โšก Fast - Parallel processing for maximum speed
  • ๐Ÿ“Š Comprehensive - Extracts 20+ data fields per video
  • ๐ŸŽฌ Complete Solution - Metadata + actual video downloads
  • ๐Ÿ”’ Reliable - Multiple extraction methods + error handling
  • ๐Ÿ’พ Easy Access - Videos stored in Apify storage, ready to download
  • ๐Ÿ’ฐ Affordable - Optimized to minimize compute costs
  • ๐ŸŽฏ Easy - Simple configuration, no coding required
  • ๐Ÿ”„ Maintained - Regular updates for TikTok changes
  • ๐Ÿ“ฆ HD Quality - Downloads highest quality available

๐Ÿ”„ Version History

Latest Update

  • โœจ Added video download functionality with HD quality support
  • ๐Ÿ“ฅ Videos stored in Apify key-value store for easy access
  • ๐Ÿ“Š Download information included in dataset output
  • ๐ŸŽฌ Automatic quality detection (HD/Standard)
  • โšก Optimized download process with error handling

Ready to scrape TikTok? Start by adding your hashtags and enable the video download feature to get complete access to viral content! ๐Ÿš€