This is a simple API for downloading Pinterest images in their best quality. Created because Pinterest's default download is absolute garbage - giving you potato quality images and sometimes random non-image files.
Let's face it - Pinterest's default download feature sucks. It's frustrating as hell when you find that perfect image, hit download, and get some crappy low-res version instead of the crisp, high-quality original. This API fixes that BS by always fetching the best possible version of any Pinterest image.
This API was specifically built to power the Pinterest Downloader Extension - a browser extension that makes downloading high-quality Pinterest images actually bearable. Check out the extension repo for the complete solution!
- 🔍 Get complete Pinterest pin details
- 📥 Download images in various sizes:
- HD/Original quality (best quality available)
- 736x resolution (large)
- 474x resolution (medium)
- 236x resolution (small)
⚠️ Current Limitations:
- Only works with single-image pins
- No support for video pins
- No support for carousel/slider pins
- No support for GIFs or animated content
These features might be added when there's time and energy to deal with Pinterest's messy HTML structure.
GET /pin/:id
Returns all available information about a Pinterest pin, including all possible image URLs.
GET /pin/:id/download
GET /pin/:id/download?size=[size]
Downloads the image in the specified size. The size parameter is optional - without it, the API will try to get the HD/original version. If that's not available, it'll fall back to the next best quality (because that's how it should work).
Available sizes:
hd
(default) - Original/highest qualityx736
- Large thumbnailx474
- Medium thumbnailx236
- Small thumbnail (why would you even want this?)
Note about HD/Original quality: The final image quality depends on what was uploaded to Pinterest. If someone uploaded a potato quality image, there's no magic wand to make it HD. The API will get you the best version available, but can't fix what's already broken.
- Bun runtime installed on your system
# Clone the repository
git clone [repository-url]
# Install dependencies
bun install
For development (with hot reload):
bun run dev
For production:
bun run start
The server will start at http://localhost:3000
by default. To use different settings, configure these environment variables:
PORT
- Change the port (default: 3000)HOST
- Change the host (default: 0.0.0.0)
This project is licensed under the MIT License - see the LICENSE file for details.