Parse, classify, and normalize Pinterest URLs without network requests. The package uses an exact Pinterest host allowlist and rejects lookalike domains, credentials, non-HTTPS URLs, encoded paths, and non-standard ports.
import 'package:pinterest_url_normalizer/pinterest_url_normalizer.dart';
final canonical = PinterestUrlNormalizer.normalize(
'https://www.pinterest.co.uk/pin/example--123456789/?utm_source=test',
);
// https://www.pinterest.com/pin/123456789/Supported URL classes are Pin, pin.it short link, profile, board, and Ideas.
This package does not download media or make network requests. In a Flutter app
running on Android, use the normalized Pin URL with the
Pinterest Downloader for Android
when the user chooses to continue the download in a browser.
MIT licensed.