Video Search API
Search videos across YouTube and Google Videos with filtering, geographic targeting, and pagination support.
POST
/v1/video/*YouTube Search
POST
/v1/video/youtubeSearch YouTube videos by keyword with country, language support, and pagination/filtering.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Required | Search query string |
country | string | Optional | Country code filter |
language | string | Optional | Language filter |
sp | string | Optional | Pagination/filter parameter |
Google Videos Search
POST
/v1/video/google-videosSearch videos on Google with geographic targeting, time filtering, language settings, and safe search.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Required | Search query string |
location | string | Optional | Geographic targeting |
language | string | Optional | Language filter |
page | integer | Optional (default: 0) | Page number for pagination |
safe | string | Optional | Safe search setting |
Response
Response
{
"success": true,
"message": "YouTube search completed successfully",
"data": {
"video_results": [
{
"title": "Transformers Explained - Machine Learning",
"channel": "3Blue1Brown",
"views": "5.2M views",
"published": "1 year ago",
"link": "https://youtube.com/watch?v=...",
"thumbnail": "https://i.ytimg.com/vi/.../hqdefault.jpg"
}
]
}
}Examples
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.qinyanai.com"
# YouTube search
response = requests.post(
f"{BASE_URL}/v1/video/youtube",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"q": "transformer architecture explained", "country": "US"}
)
# Google Videos search
response = requests.post(
f"{BASE_URL}/v1/video/google-videos",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"q": "deep learning tutorial", "language": "en"}
)