All endpoints
YouTube Videos

YouTube Videos API

Search YouTube videos by keyword. Returns video title, URL, channel name, publication date, and description snippet for each result. Supports filtering by upload date and fetching multiple pages in a single API call.

Price: $0.005 per page
Free tier: 50 requests/month
Endpoint
GET /v1/youtube/posts

Parameters

query *
Search keyword (max 500 characters)
pages
Number of pages to fetch, 1-10 (default: 1)
upload_date
Filter: last_hour, today, this_week, this_month, this_year

Response fields

posts
Array of matching videos
title
Video title
url
Direct link to the video
date
Publication date and time
author
Channel name
source
Platform name (YouTube)
snippet
Video description text
pages
Number of pages fetched
count
Total results returned

Example Request

curl "https://api.apidirect.io/v1/youtube/posts?query=tutorial&pages=2&upload_date=this_week" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "posts": [
    {
      "title": "Tutorial Video Title",
      "url": "https://youtube.com/watch?v=...",
      "date": "2024-01-15 14:30:00",
      "author": "Channel Name",
      "source": "YouTube",
      "snippet": "Video description..."
    }
  ],
  "pages": 2,
  "count": 20
}

Frequently asked questions

Can I get video transcripts or captions?

Currently, the API returns video metadata including title, description, channel, and URL. Video transcripts and captions are not included in the response.

What does the upload_date filter do?

The upload_date parameter filters results to videos uploaded within a specific time period: last_hour, today, this_week, this_month, or this_year.

Can I search for videos from a specific channel?

The API searches by keyword across all of YouTube. To focus on a specific channel, include the channel name in your search query.

How does pricing work?

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.

Do I need a credit card to start?

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.

Are there rate limits?

Yes, there's a concurrency limit of 3 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the YouTube Videos API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key