Mobile App API integration
This documentation guides you on how to integrate YT Streamer endpoints into mobile client applications (Flutter, React Native, Native Android/iOS). Use the interactive forms below to live test queries and view output payload structure.
https://youtube.mertsamettaş.com.tr
/api/search
Searches YouTube using yt-dlp and returns mapped search results including title, thumbnail, duration, views, channel name, and publish date.
Test Request
Code Snippet (Flutter / Dart)
import 'package:dio/dio.dart';
Future<List> searchVideos(String query) async {
var response = await Dio().get(
'${window.location.origin}/api/search',
queryParameters: {'q': query}
);
return response.data;
}
Response JSON
/api/suggest
Retrieves real-time query completion strings. Crucial for implementing autocomplete search bars in mobile apps.
Test Request
Code Snippet (Dart)
Future<List<String>> getSuggestions(String query) async {
var response = await Dio().get(
'${window.location.origin}/api/suggest',
queryParameters: {'q': query}
);
return List<String>.from(response.data);
}
Response JSON
/api/video
Extracts and returns the full JSON metadata profile of a specific video ID (such as formats, exact sizes, tags, descriptions).
Test Request
Code Snippet (Dart)
Future<Map> getVideoDetails(String videoId) async {
var response = await Dio().get(
'${window.location.origin}/api/video',
queryParameters: {'id': videoId}
);
return response.data;
}
Response JSON (Truncated)
/api/stream
Resolves and redirects (HTTP 302) to the direct, playable `.googlevideo` media stream URL. Set this route directly as the source URL in your mobile video player widget.
Test Live Stream Playback
Video player will appear here after clicking "Play Stream".
Integration Notes
- Flutter Video Player: Use
VideoPlayerController.networkUrl(Uri.parse('${window.location.origin}/api/stream?id=VIDEO_ID')). - React Native Video: Set source
{ uri: '${window.location.origin}/api/stream?id=VIDEO_ID' }.
/api/download/mp4
Downloads a complete MP4 file matching the requested resolution. Uses temporary server-side storage to mux high-quality video and audio seamlessly with ffmpeg before returning it.
Test Video Download
Mobile Downloader Integration
// Example GET request for direct download
${window.location.origin}/api/download/mp4?id=dQw4w9WgXcQ&quality=720
// Flutter implementation:
await Dio().download(
'${window.location.origin}/api/download/mp4',
savePath,
queryParameters: {'id': id, 'quality': quality}
);
/api/download/mp3
Extracts and converts the audio track into an MP3 file at specified bitrates (128kbps, 192kbps, 320kbps).
Test Audio Download
Mobile Downloader Integration
// Example GET request for direct audio download
${window.location.origin}/api/download/mp3?id=dQw4w9WgXcQ&quality=192
// Flutter implementation:
await Dio().download(
'${window.location.origin}/api/download/mp3',
savePath,
queryParameters: {'id': id, 'quality': quality}
);