Skip to main content
GET
/
v1
/
scrape
/
youtube
/
search
/
hashtag
Search by Hashtag
curl --request GET \
  --url https://api.sociavault.com/v1/scrape/youtube/search/hashtag \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.sociavault.com/v1/scrape/youtube/search/hashtag"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.sociavault.com/v1/scrape/youtube/search/hashtag', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sociavault.com/v1/scrape/youtube/search/hashtag",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sociavault.com/v1/scrape/youtube/search/hashtag"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sociavault.com/v1/scrape/youtube/search/hashtag")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sociavault.com/v1/scrape/youtube/search/hashtag")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "success": true,
    "videos": {
      "0": {
        "type": "video",
        "id": "4OmI_cLYTJQ",
        "url": "https://www.youtube.com/watch?v=4OmI_cLYTJQ",
        "title": "A MUST: Cute Baby & Siblings Compilation 2025 - Funny Babies Video || COOL PEACHY🍑",
        "thumbnail": "https://i.ytimg.com/vi/4OmI_cLYTJQ/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLDG4VsY7NbZBiaXTxxdSrHGqjjBQg",
        "channel": {
          "id": "UCOTtZqs7-0kLZ6zSxkIF5Gw",
          "title": "COOL PEACHY",
          "thumbnail": "https://yt3.ggpht.com/ytc/AIdro_mwUh53qtt8ekfmMXWEt_hRwYlWUxmnq-QWRvAJuclf6g=s68-c-k-c0x00ffffff-no-rj"
        },
        "viewCountText": "685,316 views",
        "viewCountInt": 685316,
        "publishedTimeText": "3 months ago",
        "publishedTime": "2025-11-08T23:16:44.540Z",
        "lengthText": "30:38",
        "lengthSeconds": 1838,
        "badges": {}
      }
    },
    "channels": {},
    "playlists": {},
    "shorts": {
      "0": {
        "type": "short",
        "id": "DqdQPQOVdeM",
        "url": "https://www.youtube.com/watch?v=DqdQPQOVdeM",
        "title": "Super Bow LX field looking pretty 🤩 #superbowllx #levistadium #football",
        "thumbnail": "https://i.ytimg.com/vi/DqdQPQOVdeM/hq2.jpg?sqp=-oaymwFBCNACELwBSFryq4qpAzMIARUAAIhCGADYAQHiAQoIGBACGAY4AUAB8AEB-AG2CIACgA-KAgwIABABGD0gWyhyMA8=&rs=AOn4CLBol18tZ8yUmsaPKnzv90pUWBRocA",
        "channel": {
          "id": "UCvQrivswRDGK0lZ_AcUHp8g",
          "title": "NFL on FOX",
          "thumbnail": "https://yt3.ggpht.com/z109GEe10U2CSuUgrkBgQCPmQlGWOx742u3se4l_AXclvxp4Ygq2P-FdP-gQOEO6GDeb49xYNcQ=s68-c-k-c0x00ffffff-no-rj"
        },
        "viewCountText": "17,369 views",
        "viewCountInt": 17369,
        "publishedTimeText": "2 hours ago",
        "publishedTime": "2026-02-08T23:17:20.093Z",
        "lengthText": "0:07",
        "lengthSeconds": 7,
        "badges": {}
      }
    },
    "shelves": {},
    "lives": {}
  },
  "credits_used": 1,
  "endpoint": "youtube/search/hashtag"
}
{
"error": "Missing required parameter: handle",
"endpoint": "<string>",
"credits_required": 123
}
{
"error": "Invalid API key",
"docs": "https://docs.sociavault.com/authentication"
}
{
"error": "Insufficient credits",
"required": 1,
"available": 0
}
{
"error": "Service configuration error"
}
💳 1 credit per request

Authorizations

X-API-Key
string
header
required

API key for authentication. Format: sk_live_xxxxxxxxxxxxx

Get your API key from the Dashboard.

Query Parameters

hashtag
string
required

Hashtag to search for

Example:

"funny"

continuationToken
string

Continuation token to get more videos. Get 'continuationToken' from previous response.

Example:

"4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB"

type
enum<string>

Search for all types of content or only shorts

Available options:
all,
shorts
Example:

"all"

Response

Successful response

Key Response Fields:

  • data.videos[0].id: Video ID
  • data.videos[0].url: Full YouTube video URL
  • data.videos[0].title: Video title
  • data.videos[0].channel.id: Channel ID of the uploader
  • data.videos[0].channel.title: Channel display name
  • data.videos[0].viewCountInt: View count as integer
  • data.videos[0].publishedTime: ISO timestamp of publication
  • data.videos[0].lengthSeconds: Duration in seconds
  • data.shorts[0]: Short-format videos matching the hashtag (same structure as videos)
  • data.continuationToken: Pagination cursor — pass as continuationToken to get the next page