Skip to content

ajisth69/pintrest-tg-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pinterest Telegram Bot & Unofficial Node.js API 📌🤖

Welcome to pintrest-tg-api, the ultimate open-source Pinterest Image Downloader and Telegram Webhook Bot. Built entirely on a headless Node.js Serverless architecture, this project allows you to seamlessly extract maximum-resolution (4K/8K) images from Pinterest and deliver them natively as media albums directly to any Telegram chat.

Designed for instant deployment on Vercel, this bot bypasses strict anti-scraping walls by utilizing authenticated session cookies, making it one of the most reliable Pinterest Web Scrapers available on GitHub.

🔥 Core Features

  • Maximum Quality Extraction: The dynamic image engine safely upgrades thumbnail links and guarantees the highest original resolution (/orig/ or /736x/) stored on Pinterest servers without encountering AWS S3 403 Access Denied errors.
  • Interactive Telegram Albums: Transforms Pinterest queries into beautifully formatted 5-photo Telegram Albums (MediaGroups) paired with interactive inline keyboard buttons for endless image discovery.
  • Anti-Bot Bypass: By injecting your real PINTEREST_COOKIE directly into HTTP headers, it entirely avoids CAPTCHAs and 403 Forbidden blocks.
  • Vercel Serverless Ready: 100% optimized for Edge deployment. Zero server maintenance, zero polling—pure webhook-driven architecture.
  • Universal Telegram Compatibility: Operates perfectly in both private Direct Messages (DMs) and public Group Chats without requiring admin rights.

🚀 One-Click Vercel Deployment

Deploy your own instance of this Node.js Pinterest API Bot in seconds. The Vercel setup will automatically prompt you for your environment variables.

Deploy with Vercel

⚙️ Required Environment Variables

To securely connect the bot, you must provide:

  • BOT_TOKEN: Your unique Telegram Bot Token generated by @BotFather.
  • PINTEREST_COOKIE: Your serialized Pinterest login session cookie (should start with _pinterest_referrer=...).

🛠 Telegram Webhook Setup

Once Vercel finishes deploying your API, you must link your bot by registering the Webhook URL. Open your browser and paste the following URL (replace the bracketed info):

https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=https://<YOUR-VERCEL-PROJECT-URL>.vercel.app/api

💻 Local Development & Testing

If you want to modify the scraper or add features locally:

  1. Clone this repository: git clone https://github.com/ajisth69/pintrest-tg-api.git
  2. Install dependencies: npm install
  3. Create a .env file containing your BOT_TOKEN and PINTEREST_COOKIE.
  4. Start the local Express testing environment: npm run dev
  5. Use Ngrok to expose port 3000 to the internet and set your Telegram webhook to the Ngrok URL.

📝 Telegram Bot Commands

  • /start - Initialize the bot.
  • /help - View the help menu and command list.
  • /owner - Show developer credits.
  • /pic <query> - Scrape and download the top 5 high-res photos for your search term (e.g., /pic cyberpunk 4k wallpaper).

Keywords: Pinterest Downloader, Pinterest Scraper, Unofficial Pinterest API, Telegram Bot, Node.js Scraper, Vercel Serverless, Webhook Bot, High-Resolution Pinterest Images, Image Extractor.

Created by @letmesolo_her

About

An open-source Node.js Serverless API and Telegram Webhook Bot for downloading high-resolution (4K/8K) Pinterest images. Bypasses anti-bot protections using session cookies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors