Skip to Content

Hashtag Posts

Posts under a hashtag, 30 a page.

GET
/v1/tiktok/hashtag/posts

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

name?string

The hashtag, with or without #.

id?string

TikTok's id for it, instead of name.

url?string

Its page's link, instead of name.

cursor?string

nextCursor of the previous page.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.tiktok.hashtagPosts({ name: "fyp" });
Example Response
{  "data": [    {      "id": "7075778590062988546",      "url": "https://www.tiktok.com/@mara.lazeez/video/7075778590062988546",      "text": "بسكويت ولا اطيب 🍪😍 #شي_طيب #حلويات #foodie #foodart #cookies #TikTokCookBook #instafood",      "createdAt": "2022-03-16T19:14:45.000Z",      "author": {        "id": "6976937168171336706",        "username": "mara.lazeez",        "displayName": "Mara Lazeez | مره لذيذ",        "avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-alisg-avt-0068/d9ab3fcc591559c96e84aa66b57731dd~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=6a11a851&x-expires=1795730400&x-signature=ZMuf0E9SPc17IMOgTSXQB1SAg3w%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",        "verified": true,        "url": "https://www.tiktok.com/@mara.lazeez"      },      "stats": {        "views": 1200000,        "likes": 25200,        "comments": 297,        "shares": 524,        "saves": 1416,        "engagementRate": 0.0217      },      "media": [        {          "kind": "video",          "url": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/97f69bb7c2c64a959eeeae341caebe5b/?a=1988&bti=ODszNWYuMDE6&&bt=602&ft=-Csk_mK9PD12NXpGgY-UxO.2SY6e3wv25VcAp&mime_type=video_mp4&rc=M2dnNmU5Z2c1M2k7OTc2PEBpamo1bDs6ZjY2OzMzODczNEBfNjYtNDAzX14xMmIxXmBgYSMyXzVkcjRfYW1gLS1kMS1zcw%3D%3D&expire=1795731757&l=20261125062223923E4BA64DF1ED2F8752&ply_type=2&policy=2&signature=9a5f1eaa836a1ddbb08634f69e952a0d&tk=tt_chain_token&btag=e000b0000",          "thumbnailUrl": "https://p19-common-sign.tiktokcdn.com/tos-alisg-p-0037/077d75412fc848f590d1c195471172fa_1647458088~tplv-tiktokx-dmt-logom:tos-alisg-i-0000/1bdb3f59a77e4098ae6c5312abe16cdf.image?dr=14573&x-expires=1795730400&x-signature=DEi7Br4HUwGVRg%2F9HBvhUwhqnbk%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=my",          "width": 576,          "height": 1024,          "durationSeconds": 13        }      ],      "hashtags": [        "شي_طيب",        "حلويات",        "foodie"      ],      "mentions": [],      "ext": {        "authorSecUid": "MS4wLjABAAAA_ykDfR3ZUs3Mp1nMxgLNopQVxjXN54zE9pcZre3DoTUWizd6VayveAVoFnn9mul0",        "sound": {          "id": "6870193640413612033",          "title": "Takke",          "artist": "Nassif Zeytoun",          "original": false        },        "durationSeconds": 13,        "reposts": null,        "pinned": false,        "ad": false,        "playlistId": null,        "region": null,        "language": "ar",        "screenText": [          "بسكويت بالمارشمالو 🍪😍",          "بسكويت"        ],        "subtitles": []      }    },    {      "id": "7059420819948195073",      "url": "https://www.tiktok.com/@heraf.wa.holoul/video/7059420819948195073",      "text": "مقاس الخصر 😉👖 #حرف_وحلول #lifehack #hack #tips #tricks #fyp #tipsandtricks #homemade #pants",      "createdAt": "2022-01-31T17:18:14.000Z",      "author": {        "id": "7003397820921955330",        "username": "heraf.wa.holoul",        "displayName": "Heraf wa Holoul | حرف و حلول",        "avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-alisg-avt-0068/074a2df5a25451e763bf80aeaf775280~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=5921aae7&x-expires=1795730400&x-signature=EnrXdz4rUVXQvuys4IukUWWfNwQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my",        "verified": false,        "url": "https://www.tiktok.com/@heraf.wa.holoul"      },      "stats": {        "views": 1500000,        "likes": 25400,        "comments": 262,        "shares": 489,        "saves": 1310,        "engagementRate": 0.0174      },      "media": [        {          "kind": "video",          "url": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/c512537b1049445a8c69e644b693cd67/?a=1988&bti=ODszNWYuMDE6&&bt=959&ft=-Csk_mK9PD12NXpGgY-UxO.2SY6e3wv25VcAp&mime_type=video_mp4&rc=M2doNzg6OTllZDQ0NmkzZUBpanZyODw6Zjw0OjMzODczNEBeMGAyMGEvNTExXzVgYjNfYSNgczVpcjQwZ3BgLS1kMS1zcw%3D%3D&expire=1795731754&l=20261125062223923E4BA64DF1ED2F8752&ply_type=2&policy=2&signature=1ee4658e17c2b383b56fcbec307e7016&tk=tt_chain_token&btag=e000b0000",          "thumbnailUrl": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0037/a62a8c275f9f46f5816cbbed2d3b022b~tplv-tiktokx-dmt-logom:tos-alisg-i-0000/276ef60d6c23454783e810a92f3dc686.image?dr=14573&x-expires=1795730400&x-signature=1EWj1W%2Bf%2FCDyXV%2FEgbovoqOgmLQ%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=my",          "width": 576,          "height": 1024,          "durationSeconds": 10        }      ],      "hashtags": [        "حرف_وحلول",        "lifehack",        "hack"      ],      "mentions": [],      "ext": {        "authorSecUid": "MS4wLjABAAAAd1rRWLBsAR9VJiwH1lxAJ2IORYUywi0H8GIOvR_9bhAO081xTU6K-RRdRWbV48NU",        "sound": {          "id": "6704992801559414786",          "title": "Infinity",          "artist": "Jaymes Young",          "original": false        },        "durationSeconds": 10,        "reposts": null,        "pinned": false,        "ad": false,        "playlistId": null,        "region": null,        "language": "ar",        "screenText": [          "كيف تعرف مقاس الخصر 👖",          "مقاس الخصر"        ],        "subtitles": []      }    }  ],  "pagination": {    "nextCursor": "40",    "hasMore": true  }}