An unofficial Pinterest image downloader
Project description
Pinterest Media Downloader (pinterest-dl)
English | 中文
CLI to download images and videos from any Pinterest board, pin, or search query.
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(orfirefox) before using--client chromium/firefox. - Video to MP4: install ffmpeg. Without it, use
--skip-remuxto 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
- CLI guide - every command and option
- Python API guide - programmatic usage and patterns
- Optional dependencies - the full extras matrix
- Testing guide - offline-by-default tests and live integration tests
- Contributing - how to contribute
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
- pinterest-dl-gui - a graphical interface built on this library.
- Inspired by pinterest-image-scraper.
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.
Made by sean1832. Not affiliated with Pinterest; all trademarks are property of their respective owners.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinterest_dl-1.2.1.tar.gz.
File metadata
- Download URL: pinterest_dl-1.2.1.tar.gz
- Upload date:
- Size: 74.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7815c26c0fccb5243f1faa995b7612894046ad4e1158204bf43e39f2c2b471a0
|
|
| MD5 |
d9ad1befb5e35254dc3fa7163531dadf
|
|
| BLAKE2b-256 |
c77352f835b08f7f4716205f620d565bf2985941af659900ec225f391819dfdd
|
Provenance
The following attestation bundles were made for pinterest_dl-1.2.1.tar.gz:
Publisher:
release_pypi.yml on sean1832/pinterest-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinterest_dl-1.2.1.tar.gz -
Subject digest:
7815c26c0fccb5243f1faa995b7612894046ad4e1158204bf43e39f2c2b471a0 - Sigstore transparency entry: 1809419744
- Sigstore integration time:
-
Permalink:
sean1832/pinterest-dl@4e75e708946c4d15ec9f2cb471c0930815d6f5bf -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/sean1832
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yml@4e75e708946c4d15ec9f2cb471c0930815d6f5bf -
Trigger Event:
release
-
Statement type:
File details
Details for the file pinterest_dl-1.2.1-py3-none-any.whl.
File metadata
- Download URL: pinterest_dl-1.2.1-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fee2e94c4bd7094acce5f81665756604308536db796b0754c719cc01b8e9d66
|
|
| MD5 |
788f866809cc1933ce8691aac4f75a1c
|
|
| BLAKE2b-256 |
80273936680ba99d0c86391e4c01fc02076aa33ec997ebe90aca99830ef0d4b1
|
Provenance
The following attestation bundles were made for pinterest_dl-1.2.1-py3-none-any.whl:
Publisher:
release_pypi.yml on sean1832/pinterest-dl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinterest_dl-1.2.1-py3-none-any.whl -
Subject digest:
7fee2e94c4bd7094acce5f81665756604308536db796b0754c719cc01b8e9d66 - Sigstore transparency entry: 1809419767
- Sigstore integration time:
-
Permalink:
sean1832/pinterest-dl@4e75e708946c4d15ec9f2cb471c0930815d6f5bf -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/sean1832
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yml@4e75e708946c4d15ec9f2cb471c0930815d6f5bf -
Trigger Event:
release
-
Statement type: