A package to collect TikTok posts by hashtag
Project description
TikTok Hashtag Collector
A Python package to collect TikTok posts by hashtag using the RapidAPI TikTok API.
Installation
pip install tiktok-hashtag-collector
Usage
from tiktok_hashtag_collector import TiktokHashtagCollector
# Initialize the collector with your RapidAPI key
collector = TiktokHashtagCollector(
api_key="YOUR_RAPIDAPI_KEY", # Required: Your RapidAPI key
country_code="US", # Optional: Default is "US"
max_post_by_hashtag=100, # Optional: Default is 100
max_hashtag_post_retry=3, # Optional: Default is 3
max_profile_retry=3 # Optional: Default is 3
)
# Collect posts for a hashtag
df = collector.collect_posts_by_hashtag("python")
# The DataFrame will contain the following columns:
# - search_method
# - input_kw_hst
# - post_id
# - post_link
# - caption
# - hashtag
# - hashtags
# - created_date
# - num_view
# - num_like
# - num_comment
# - num_share
# - target_country
# - user_id
# - username
# - bio
# - full_name
# - display_url
# - taken_at_timestamp
Requirements
- Python 3.6+
- requests
- pandas
- boto3
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiktok-hashtag-collector-0.1.2.tar.gz.
File metadata
- Download URL: tiktok-hashtag-collector-0.1.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fab69e6727c4ec591f05616c14692efbaff833e01582c1eb45056d0e01ff218
|
|
| MD5 |
c3931c953a7b8244fc8af1929914846c
|
|
| BLAKE2b-256 |
f2cd5ace97a09de17f5524cd2fab66e82ad5b6d71e9265c66b0d77ecca4583ac
|
File details
Details for the file tiktok_hashtag_collector-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tiktok_hashtag_collector-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e51dd2940b904e3d992a2ff95731af1daa85c3362ee6e31b446293790013f01
|
|
| MD5 |
292b793653c88e07bc6e718011a4fda9
|
|
| BLAKE2b-256 |
d99418a3dfab7d366bcb4f36448079adbe2887850c71896948b978c404176fff
|