Search YouTube videos by keyword. Returns video title, URL, channel name, publication date, description, view count, video length, thumbnail, and more. Supports filtering by upload date and fetching multiple pages in a single API call.
curl "https://apidirect.io/v1/youtube/posts?query=tutorial&pages=2&upload_date=this_week" \
-H "X-API-Key: YOUR_API_KEY"
{
"posts": [
{
"title": "Tutorial Video Title",
"url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
"date": "2024-01-15 14:30:00",
"author": "Channel Name",
"source": "YouTube",
"domain": "youtube.com",
"snippet": "Video description...",
"views": 86979,
"video_length": "14:45",
"video_id": "dQw4w9WgXcQ",
"channel_id": "UCeMcDx6-rOq_RlKSPehk2tQ",
"is_live": null,
"type": "NORMAL",
"keywords": [],
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hq720.jpg",
"sentiment": {
"emotions": {
"joy": 40,
"trust": 55,
"fear": 0,
"surprise": 10,
"sadness": 0,
"disgust": 0,
"anger": 0,
"anticipation": 30
},
"dominant_emotion": "trust",
"emotional_intensity": 5,
"polarity": "positive"
}
}
],
"pages": 2,
"count": 20
}
Currently, the API returns video metadata including title, description, channel, view count, and thumbnail. Video transcripts and captions are not included in the response.
The upload_date parameter filters results to videos uploaded within a specific time period: last_hour, today, this_week, this_month, or this_year.
The API searches by keyword across all of YouTube. To focus on a specific channel, include the channel name in your search query.
Each video includes view count, duration, video ID, channel ID, thumbnail URL, video type, keywords, and live status. Views may be null for some videos where this data is unavailable.
You only pay for successful requests. The YouTube Videos API costs $0.005 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.
No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.
Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.
Get your API key and start making requests in minutes. 50 requests/month free every month.
Get API Key