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.

Base URL: https://youtube.mertsamettaş.com.tr
GET

/api/suggest

Autocomplete Suggestions

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);
}
GET

/api/video

Video Metadata Details

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;
}
GET

/api/stream

Direct HTTP Playback URL

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' }.
GET

/api/download/mp4

Complete MP4 Video Stream Download

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}
);
GET

/api/download/mp3

Convert and 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}
);