Skip to Content

Hashtag

A hashtag with its post and view counts.

GET
/v1/tiktok/hashtag

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 (https://www.tiktok.com/tag/fyp), instead of name.

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

One item, as every single-item endpoint answers: { "data": … }.

data*

A TikTok hashtag.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.tiktok.hashtag({ name: "fyp" });
Example Response
{  "data": {    "id": "229207",    "name": "fyp",    "description": null,    "url": "https://www.tiktok.com/tag/fyp",    "posts": 9557629436,    "views": 132490583953866,    "ext": {      "coverUrl": null,      "commerce": false    }  }}