pinterest-url-normalizer: Parse and normalize Pinterest URLs without network requests

[ library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

A small, zero-I/O library for classifying and normalizing Pinterest Pin, short, profile, board, and Ideas URLs. It uses an exact host allow list and rejects HTTP URLs, credentials, non-standard ports, and lookalike domains.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.1.0
Change log CHANGELOG.md
Dependencies base (>=4.15 && <5), network-uri (>=2.6 && <2.7) [details]
License MIT
Copyright 2026 SavePinner
Author SavePinner
Maintainer jiankn@users.noreply.github.com
Uploaded by jiankn at 2026-08-07T15:39:30Z
Category Web
Home page https://savepinner.com/
Bug tracker https://github.com/jiankn/pinterest-url-normalizer-haskell/issues
Source repo head: git clone https://github.com/jiankn/pinterest-url-normalizer-haskell.git
Distributions
Downloads 2 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-08-07 [all 1 reports]

Readme for pinterest-url-normalizer-0.1.1.0

[back to package description]

pinterest-url-normalizer

Parse, classify, and normalize Pinterest URLs without making network requests.

SavePinner ยท Hackage

The library recognizes Pin, pin.it, profile, board, and Ideas URLs across Pinterest country domains. It uses an exact host allow list, rejects HTTP URLs, credentials, non-standard ports, and lookalike domains, and removes query parameters from normalized output.

Install

Add the package to your Cabal file:

build-depends: pinterest-url-normalizer ^>= 0.1.1.0

Usage

import SavePinner.PinterestURL

normalizePinterestUrl
  "https://de.pinterest.com/pin/987654321/?utm_source=share"
-- Right "https://www.pinterest.com/pin/987654321/"

parsePinterestUrl "https://pin.it/AbC123"
isPinterestUrl "https://www.pinterest.com/savepinner/media-tools/"

parsePinterestUrl returns Either ParseError PinterestUrl, so callers get a specific failure instead of an exception.

Supported URL kinds

Kind Example
Pin https://www.pinterest.com/pin/123456789/
Short https://pin.it/AbC123
Profile https://www.pinterest.com/savepinner/
Board https://www.pinterest.com/savepinner/media-tools/
Ideas https://www.pinterest.com/ideas/space-wallpaper/926295399832/

pin.it links are classified and normalized but are not followed. Resolving them requires a network request and belongs in the consuming application.

Development

cabal update
cabal test
cabal check
cabal sdist

Why this package exists

This parser is maintained by the team behind the Pinterest image downloader, a browser tool for inspecting media exposed by public Pinterest Pin URLs. The library contains no downloader, tracking, browser automation, or remote code.

Pinterest is a trademark of Pinterest, Inc. This project is independent and is not affiliated with or endorsed by Pinterest.

License

MIT