Search packages, repositories and app categories

Package detailsv2.1.4

youtube_parser

A minimalist library that extracts IDs from all kinds of YouTube urls

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.3K
Likes
27
Pub points
160

Install package

flutter pub add youtube_parser

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A lightweight Flutter/Dart package designed to extract YouTube video IDs from various URL formats. It supports standard YouTube links, shortened URLs, embedded links, and query parameters, making it ideal for applications needing reliable ID extraction without additional dependencies. The library is minimal, fast, and works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux. Perfect for integrating YouTube functionality into apps with minimal overhead.

Use cases

  • Extracting video IDs from user-input URLs
  • Parsing YouTube links in chat or comment sections
  • Integrating YouTube content into media players
  • Building social media apps with YouTube embeds
  • Automating YouTube link processing

Key features

  • Supports all YouTube URL variations
  • Minimal and lightweight
  • Cross-platform compatibility
  • No external dependencies
  • Fast and reliable parsing

Suitable for

  • Simple YouTube URL processing
  • Apps requiring video ID extraction
  • Lightweight parsing needs
  • Developers avoiding heavy libraries
  • Multi-platform Flutter projects

Considerations

  • Does not validate if the video exists
  • Only extracts IDs, not metadata
  • No support for playlist or channel URLs
  • Limited to basic URL parsing
  • Not suitable for complex YouTube API interactions

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Dart YouTube Parser

A tiny Dart library that extracts YouTube video IDs from all kinds of valid Youtube urls.

Usage

import 'package:youtube_parser/youtube_parser.dart';

String? a = getIdFromUrl('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
// returns 'dQw4w9WgXcQ'

String? b = getIdFromUrl('https://youtu.be/dQw4w9WgXcQ');
// returns 'dQw4w9WgXcQ'

String? c = getIdFromUrl('https://www.some-other-website.com/blog-post');
// returns null

Categories

Source repository

Projects using this package

No data available yet.