Skip to main content

An unofficial Pinterest image downloader

Project description

Pinterest Media Downloader (pinterest-dl)

PyPI - Version PyPI - Python Version PyPI - License Downloads

English | 中文

CLI to download images and videos from any Pinterest board, pin, or search query.

scrape demo

Features

  • Scrape and download images and videos from any board, pin, section, or search query.
  • API-first and fast: scrapes through Pinterest's API by default, with optional browser automation (Playwright or Selenium).
  • Download videos as MP4 (with ffmpeg) or as raw .ts streams (no ffmpeg required).
  • Reach private boards and pins by authenticating with browser cookies.
  • Scrape multiple URLs or queries at once, or batch them from a file.
  • Download asynchronously, and save scraped URLs to JSON to re-download later.
  • Embed alt text as an EXIF comment for searchability, or save it as a sidecar text file.

Installation

Requires Python 3.10 or newer.

pip install pinterest-dl

Optional extras add image and metadata features:

Command Adds
pip install pinterest-dl[image] Image resolution detection and pruning (Pillow)
pip install pinterest-dl[exif] Embed alt text as EXIF metadata (pyexiv2)
pip install pinterest-dl[metadata] Both of the above

Some features need extra tools on your system:

  • Browser backends: run playwright install chromium (or firefox) before using --client chromium/firefox.
  • Video to MP4: install ffmpeg. Without it, use --skip-remux to keep the raw .ts file.

See Optional Dependencies for the full matrix.

Install from source
git clone https://github.com/sean1832/pinterest-dl.git
cd pinterest-dl
pip install .          # or: pip install .[all]

Quick Start

Command line

# Download a single pin (pin URLs return the pin itself)
pinterest-dl scrape "<pin_url>" -o ./output

# Download a pin plus related pins (pin + 49 related)
pinterest-dl scrape "<pin_url>" -o ./output -n 50

# Search and download 30 pins
pinterest-dl search "nature photography" -o ./output -n 30

# Download a pin's video as MP4 (needs ffmpeg)
pinterest-dl scrape "<pin_url>" --video -o ./output

# Reach a private board: log in once, then pass the cookies
pinterest-dl login -o cookies.json
pinterest-dl scrape "<private_board_url>" -c cookies.json -o ./output

Read the full CLI guide for every command and option.

Python

from pinterest_dl import PinterestDL

# Scrape a board and download the images
images = PinterestDL.with_api().scrape_and_download(
    url="https://www.pinterest.com/username/board-name/",
    output_dir="images/art",
    num=30,
)

# Search and download
images = PinterestDL.with_api().search_and_download(
    query="landscape art",
    output_dir="images/landscapes",
    num=50,
)

Read the full API guide or browse runnable examples.

Documentation

Disclaimer

[!WARNING] This project is independent and not affiliated with Pinterest. It is intended for educational use only. Automated scraping may conflict with Pinterest's Terms of Service. The author disclaims any liability for misuse. Use it responsibly and at your own legal risk.

Related

Contributing

Contributions are welcome. See CONTRIBUTING.md for the code of conduct, commit conventions, and pull request process.

License

Licensed under the Apache 2.0 License. See LICENSE.

Support

If this tool saved you time, you can buy me a coffee.

Buy Me A Coffee


Made by sean1832. Not affiliated with Pinterest; all trademarks are property of their respective owners.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinterest_dl-1.2.0.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinterest_dl-1.2.0-py3-none-any.whl (77.6 kB view details)

Uploaded Python 3

File details

Details for the file pinterest_dl-1.2.0.tar.gz.

File metadata

  • Download URL: pinterest_dl-1.2.0.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pinterest_dl-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3a30658ec071c0313dbd260de0da4c50cd35d3e3500585f84b7e6d53cdad0d02
MD5 9592c3812002a1b6b1e807a0481889cf
BLAKE2b-256 ee7532ddc2008c42f7f558583998c817b3ab60a0d98a4a4048a60213e8423c2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinterest_dl-1.2.0.tar.gz:

Publisher: release_pypi.yml on sean1832/pinterest-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pinterest_dl-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pinterest_dl-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 77.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pinterest_dl-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 352d977b0a7b376fc355b663a4c157c02b74e96a6dc190279cd5880953a07379
MD5 cd3b003f37bcc448b6eb17b614bd864e
BLAKE2b-256 97edb63f83b9af3e355136385433f4ca0bf60350863924f0ff8338794ac5e838

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinterest_dl-1.2.0-py3-none-any.whl:

Publisher: release_pypi.yml on sean1832/pinterest-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page