Skip to Content

Hashtag

A hashtag with its video and channel counts.

GET
/v1/youtube/hashtag

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

name?string

The hashtag, with or without #.

url?string

Its page's link (https://www.youtube.com/hashtag/cooking), 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 hashtag.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.youtube.hashtag({ name: "cooking" });
Example Response
{  "data": {    "id": "cooking",    "name": "cooking",    "description": null,    "url": "https://www.youtube.com/hashtag/cooking",    "posts": 43000000,    "views": null,    "ext": {      "channels": 4300000    }  }}