Skip to main content
POST
/
v1
/
social
/
search
/
create
curl -X POST "https://api.hooked.ai/v1/social/search/create" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerm": "fitness motivation",
    "platform": "tiktok",
    "limit": 25
  }'
{
  "success": true,
  "message": "Search created successfully",
  "data": {
    "search": {
      "id": "clx123abc",
      "searchTerm": "fitness motivation",
      "platform": "tiktok",
      "totalResults": 25,
      "analytics": {
        "avgViews": 1250000,
        "avgLikes": 89000,
        "avgComments": 1200,
        "avgShares": 5600,
        "engagementRate": 7.8
      },
      "topHashtags": ["fitness", "motivation", "workout", "gym"],
      "keywords": [],
      "keywordsStatus": "pending",
      "lastSearched": "2024-01-15T10:30:00Z",
      "createdAt": "2024-01-15T10:30:00Z"
    },
    "videosFound": 25
  }
}

Overview

This endpoint creates a new search by scraping videos from the specified platform that match your search term. The results are saved and can be retrieved later.

Request Body

searchTerm
string
required
The search query (1-200 characters). Will be trimmed automatically.
platform
string
required
The platform to search:
  • tiktok: Search TikTok
  • youtube: Search YouTube
limit
number
default:"20"
Maximum number of videos to scrape (1-50)

Response

success
boolean
Indicates if the request was successful
message
string
Status message
data
object
curl -X POST "https://api.hooked.ai/v1/social/search/create" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerm": "fitness motivation",
    "platform": "tiktok",
    "limit": 25
  }'
{
  "success": true,
  "message": "Search created successfully",
  "data": {
    "search": {
      "id": "clx123abc",
      "searchTerm": "fitness motivation",
      "platform": "tiktok",
      "totalResults": 25,
      "analytics": {
        "avgViews": 1250000,
        "avgLikes": 89000,
        "avgComments": 1200,
        "avgShares": 5600,
        "engagementRate": 7.8
      },
      "topHashtags": ["fitness", "motivation", "workout", "gym"],
      "keywords": [],
      "keywordsStatus": "pending",
      "lastSearched": "2024-01-15T10:30:00Z",
      "createdAt": "2024-01-15T10:30:00Z"
    },
    "videosFound": 25
  }
}

Notes

If a search with the same term and platform already exists, it will be updated with fresh results rather than creating a duplicate.
Keyword extraction runs asynchronously. Check the keywordsStatus field to see if processing is complete.
Creating searches consumes API credits based on the number of videos scraped.

Authorizations

x-api-key
string
header
required

Body

application/json
searchTerm
string
required
platform
enum<string>
required
Available options:
tiktok,
youtube
limit
integer
default:20

Response

201

Search created successfully