YouTube

Search YouTube Videos

Search for YouTube videos by keyword. Returns video title, URL, channel name, channel ID, video ID, publication date, description snippet, view count, video length, thumbnail, and a flag for live content. Supports filtering by upload date and fetching up to 20 pages in a single call. Set get_sentiment=true to add AI emotion analysis to each result.

Price: $0.005 per page. Free tier: 50 requests/month.

get/v1/youtube/posts

Request

  • Base URL: https://apidirect.io
  • URL: https://apidirect.io/v1/youtube/posts
  • Auth: API key in header X-API-Key

Query parameters

querystring required

Search query (max 500 characters)

pagesinteger

Number of pages to fetch and merge (1-20). Billed per page.

upload_date'last_hour' | 'today' | 'this_week' | 'this_month' | 'this_year'

Filter by upload date

get_sentimentboolean

Set to true to add AI emotion analysis to each post. Adds a sentiment object containing emotions (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), dominant_emotion, emotional_intensity (0-10), and polarity (positive, negative or neutral). Any post that cannot be scored returns sentiment: null.

Response

Successful response

countnumber nullable
pagesnumber nullable

Changes

No recorded changes to this operation across all 1 revision of this API.