scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTHashtag
  • POSTProduct
  • POSTProduct Reviews
  • POSTTrending Videos
  • POSTUser Profile
  • POSTUser Search
  • POSTVideo Post
  • POSTVideo Transcript
  • POSTVideo Search
  • POSTVideos

TikTok Hashtag

2 credits

Get TikTok hashtags with their videos.

POST/api/v1/tools/tiktok/hashtag

Parameters

hashtagUrlsstring[]required

Hashtag URLs such as https://www.tiktok.com/tag/cooking. A URL given twice is read once. A URL that gives no hashtag gets an entry in errors. The call fails only when no hashtag is read.

resultsLimitnumber

Most videos for each hashtag, from 1 to 1000. Default: 50.

Response Schema

dataobject

TikTok hashtags result

hashtagsobject[]

One record for each hashtag that was read, in the order of the request.

videosobject[]

The videos of each hashtag, in the order of the request and then of its list. Each record has the video fields of the Video Post endpoint (videoId, videoUrl, desc, createTime, video, author, stats, music and more), plus the fields below. A list does not give locationCreated, categories, isAiGenerated, author.createTime or author.seller, so they are empty.

errorsobject[]

One entry for each URL that gave no hashtag, and one for each hashtag whose videos could not be read.

metaobject

Request metadata

toolstring

Tool name (tiktok-hashtag)

creditsUsednumber

Credits consumed (2 for each hashtag)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/tiktok/hashtag \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"hashtagUrls": [
"https://www.tiktok.com/tag/cooking",
"https://www.tiktok.com/tag/nosuchtag12345"
],
"resultsLimit": 20
}'

Response Example

{
"data": {
"hashtags": [
{
"type": "hashtag",
"inputUrl": "https://www.tiktok.com/tag/cooking",
"hashtagId": "24723",
"name": "cooking",
"desc": "Share your favorite recipes.",
"isCommerce": false,
"image": "https://p16-sign-va.tiktokcdn.com/obj/cooking.jpeg",
"stats": {
"videos": 8120000,
"views": 312000000000
}
}
],
"videos": [
{
"type": "video",
"source": "hashtag",
"inputUrl": "https://www.tiktok.com/tag/cooking",
"rank": 1,
"videoId": "7340001234567890001",
"videoUrl": "https://www.tiktok.com/@chefmike/video/7340001234567890001",
"desc": "Three-minute pasta #cooking #foodtok",
"createTime": "1709251200",
"categories": [],
"hashtags": [
"cooking",
"foodtok"
],
"mentions": [],
"effects": [],
"captionLanguages": [
"eng-US"
],
"images": [],
"video": {
"duration": 32,
"width": 576,
"height": 1024
},
"author": {
"id": "6812345678901234567",
"uniqueId": "chefmike",
"nickname": "Chef Mike"
},
"stats": {
"views": 1250000,
"likes": 98000,
"comments": 1200,
"shares": 4300,
"saves": 15000,
"reposts": 0
},
"music": {
"id": "7340001234567890999",
"title": "original sound"
}
}
],
"errors": [
{
"inputUrl": "https://www.tiktok.com/tag/nosuchtag12345",
"error": "The hashtag does not exist or is not available.",
"errorCode": "HASHTAG_UNAVAILABLE"
}
]
},
"meta": {
"tool": "tiktok-hashtag",
"creditsUsed": 4,
"requestId": "req_abc123"
}
}