Full Hashtag Search
Fetch all the posts that Tiktok shows for a given hashtag. All the posts are fetched directly from https://www.tiktok.com/tag/magic and filter out any that are were not posted within the last N days. This is a convenience endpoint which internally calls the 'Hashtag Search' endpoint repeatedly (iterating the cursor) to collect all the posts for a given hashtag in one api call. Additionally, any posts which were created more than N days ago are filtered out. The `max_depth` is the total number of calls which need to be made to the 'Search Hashtag' endpoint to collect all the posts. The maximum value of `max_depth` is 250, given that 1 call retrieves 20 posts and a maximum of 5000 posts can be retrieved from TikTok. The cost is `max_depth` divided by 10 to provide a discount over manually making all the individual calls to the 'Search Hashtag' endpoint.
API Pricing (per request): max_depth / 10 units
API usage examples
- Hashtag does not exist:
-> 0 posts returned.
Cost: 1 unit - Hashtag exists, days is set to 10000 and hashtag has 80 posts (max_depth here is 4 because 80 total posts / 20 posts per chunk):
-> 80 posts returned.
Cost: 1 unit - Hashtag exists, days is set to 10000 and hashtag has 800 posts (max_depth here is 40 because 800 total posts / 20 posts per chunk):
-> 800 posts returned.
Cost: 4 units - Hashtag exists, days is set to 10 and hashtag has 800 posts (max_depth here is 40 because 800 total posts / 20 posts per chunk) and only 10 posts are from the past 10 days:
-> 10 posts returned.
Cost: 4 units - Hashtag exists, days is set to 10000 and hashtag has 3200 posts (max_depth here is 160 because 3200 total posts / 20 posts per chunk):
-> 3200 posts returned.
Cost: 16 units - Hashtag exists, days is set to 10 and hashtag has 3200 posts (max_depth here is 160 because 3200 total posts / 20 posts per chunk) and only 10 posts are from the past 10 days:
-> 10 posts returned.
Cost: 16 units
Try the API
Request
- Base URL: https://ensembledata.com/apis
- URL: https://ensembledata.com/apis/tt/hashtag/recent-posts
- Auth: none declared
Query parameters
Hashtag to search (input without #).
Filter out posts created more than N days ago.
If True, map the output to match the TikTok Web API. If False, the mapping is matches the mobile TikTok API.
The endpont will stop fetching more posts once it reaches this cursor value (famous hashtags can return up to 4000-5000 posts, therefore, the cursor typically stops at 4000-5000).
Private token assigned to each client to access the APIs.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.