SOKE
API ReferenceResearch

Content Research

Find trending videos in your niche with engagement metrics, view velocity, and competition data.

POST /api/v1/research/content

Search for trending videos matching given keywords. Returns detailed video metrics including view velocity, engagement rates, and tags. When no keywords are provided, Soke automatically uses keywords extracted from your connected YouTube channel.

Credits: 2 per request

Authentication

X-Soke-Key: sk_live_your_api_key
Authorization: Bearer your_jwt_token

Request Body

FieldTypeRequiredDefaultDescription
keywordsstring[]NoKeywords to search for. Omit to use your connected channel's keywords. Max 10, each up to 100 characters.
platformstringNo"youtube"Target platform
regionstringNo"US"Region code for localized results
maxResultsintegerNo20Maximum videos to return (1–50)
recencyDaysintegerNo365Only return videos published within this many days. Range: 1–3650.

When keywords is omitted or empty, Soke automatically extracts keywords from your connected YouTube channel's top-performing videos and uses the top 5. Channel keywords are cached for 6 hours for fast responses. If no channel is connected and no keywords are provided, the endpoint returns a KEYWORDS_REQUIRED error.

Results are filtered to the last 12 months by default so you see what's working now, not old viral content. Pass recencyDays to widen or narrow the window (e.g., 30 for the last month, 730 for the last two years).

Example Requests

With keywords

curl -X POST https://api.usesoke.ai/api/v1/research/content \
  -H "Content-Type: application/json" \
  -H "X-Soke-Key: sk_live_your_api_key" \
  -d '{
    "keywords": ["stoicism", "philosophy"],
    "platform": "youtube",
    "recencyDays": 90
  }'

Without keywords (channel auto-detect)

curl -X POST https://api.usesoke.ai/api/v1/research/content \
  -H "Content-Type: application/json" \
  -H "X-Soke-Key: sk_live_your_api_key" \
  -d '{}'

Response

200 OK
{
  "success": true,
  "data": {
    "keywords": ["stoicism", "philosophy"],
    "videos": [
      {
        "videoId": "EFkyxzJtiv4",
        "title": "Stoicism: Become Undefeatable",
        "description": "Follow Aperture on Spotify and take these thoughts with you...",
        "channelId": "UCO5QSoES5yn2Dw7YixDYT5Q",
        "channelTitle": "Aperture",
        "thumbnailUrl": "https://i.ytimg.com/vi/EFkyxzJtiv4/mqdefault.jpg",
        "publishedAt": "2025-11-15T18:30:00Z",
        "duration": "PT12M52S",
        "viewCount": 13183781,
        "likeCount": 645609,
        "commentCount": 9229,
        "tags": ["stoicism", "stoic", "stoicism philosophy", "practical stoicism"],
        "viewVelocity": 7373.1,
        "engagementRate": 4.97
      }
    ],
    "totalResults": 40,
    "dataSources": "YouTube Data API v3"
  },
  "meta": {
    "platform": "youtube",
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "processing_time_ms": 2400
  }
}

Response Fields

FieldTypeDescription
keywordsstring[]The keywords used for the search (may be auto-detected from channel)
videosarrayVideos sorted by view count (descending)
videos[].videoIdstringYouTube video ID
videos[].titlestringVideo title
videos[].descriptionstringTruncated description (max 300 characters)
videos[].channelIdstringYouTube channel ID
videos[].channelTitlestringChannel name
videos[].thumbnailUrlstring | nullThumbnail image URL
videos[].publishedAtstringISO 8601 publish date
videos[].durationstring | nullISO 8601 duration (e.g., PT12M52S)
videos[].viewCountintegerTotal view count
videos[].likeCountintegerTotal like count
videos[].commentCountintegerTotal comment count
videos[].tagsstring[]Video tags (up to 15)
videos[].viewVelocitynumberAverage views per day since publish
videos[].engagementRatenumber(likes + comments) / views × 100
totalResultsintegerTotal unique videos found across all keywords
dataSourcesstringData sources used

Error Codes

CodeStatusDescription
KEYWORDS_REQUIRED400No keywords provided and no YouTube channel connected
BAD_REQUEST400Invalid parameters (e.g., too many keywords, keyword too long)
RATE_LIMIT_EXCEEDED429Rate limit exceeded
INSUFFICIENT_CREDITS402Not enough credits
PLATFORM_NOT_IMPLEMENTED501Platform not yet supported

On this page