Skip to main content

TikTok Collector

A Python library for collecting TikTok data including hashtags and keywords.

Installation

pip install tiktok-collector

Features

  • Collect TikTok posts by hashtag
  • Collect TikTok posts by keyword
  • Collect TikTok Comment by post link
  • Configurable API settings
  • Rate limiting and error handling

Usage

Basic Usage

from tiktok_collector import TiktokHashtagCollector, SparkS3Writer

# Initialize collector
collector = TiktokHashtagCollector(api_key="your_rapidapi_key")

# Collect posts by hashtag
posts = collector.collect_by_hashtag(
    hashtag="python",
    max_posts=100,
    min_likes=1000
)

# Collect posts by keyword


### Configuration

You can configure the collector using environment variables:

```bash
export TIKTOK_API_KEY=your_rapidapi_key
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_REGION=us-east-1

Requirements

  • Python 3.7+
  • requests
  • pandas
  • numpy
  • python-dotenv
  • boto3
  • pytz
  • httplib2
  • sqlalchemy
  • openpyxl
  • pyspark
  • hadoop-aws
  • aws-java-sdk-bundle

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for tiktok-collector 0.6.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiktok-collector 0.6.7
File Size Uploaded Provenance Actions
tiktok_collector-0.6.7.tar.gz 14.0 kB Without provenance Details for tiktok_collector-0.6.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiktok-collector 0.6.7
File Interpreter ABI Platform Actions
tiktok_collector-0.6.7-py3-none-any.whl Python 3 none any Details for tiktok_collector-0.6.7-py3-none-any.whl

Total release size: 38.0 kB

Release files / tiktok_collector-0.6.7.tar.gz

Download URL tiktok_collector-0.6.7.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
229fd954bbf5f6f1cbca6671ed5414d554731d6afc04f8b8c3af02c695f500c1
BLAKE2b-256 checksum
How to use checksums
fc435a6d7a88939a948fecf3116688cc3f18da634697c3f4d75d833cb6e4fad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / tiktok_collector-0.6.7-py3-none-any.whl

Download URL tiktok_collector-0.6.7-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f58ef0385ed018f84628757a4f135e68a5f246b6dbc85e034e5b69dc05a7e361
BLAKE2b-256 checksum
How to use checksums
956a531f18de68cb0ce0767fb9f27993cc00ee22b50c8318b7e5e60bf37c0524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for tiktok-collector 0.6.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page