Skip to content

SudoR2spr/Instagram-media-downloader-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📥 Instagram Media Downloader API

🚀 A Simple API to download Instagram Reels, Posts, Videos, Albums.
Supports fallback to Puppeteer if instagram-url-direct fails.
Made with ❤️ by WOODcraft


🌐 Features

✅ Supports Reels / Videos / Posts / Albums
✅ Automatic fallback → instagram-url-directPuppeteer
✅ Proxy endpoint /proxy to bypass CORS
✅ JSON API responses with emojis ✅
✅ Fully CORS Enabled → works with web browsers
✅ ⚡ Fast caching for repeated links


🛠️ Installation & Deployment

🔸 Requirements

  • Node.js v18+
  • Preferable deploy → Render / Railway

🔸 Clone the Project

git clone https://github.com/SudoR2spr/Instagram-media-downloader-API.git
cd Instagram-media-downloader-API

🔸 Install Dependencies

npm install

🔸 Local Development

npm run dev

⚙️ Deployment Options

▶️ Deploy to Render (Recommended)

npm install && npm run start
  • ✅ Add Node version: 18
  • ✅ Enable Build Command: npm install
  • Deploy 🚀

▶️ Deploy to Railway (Alternative)

❗ Vercel ❌ (Puppeteer works poorly/free not suitable)


🔑 Endpoints

📥 Download Instagram Media

POST /api/instagram
Content-Type: application/json
Body: { "url": "<instagram-post-url>" }

OR (GET Support Added)

GET /api/instagram?url=<instagram-post-url>

📦 Example Response:

{
  "status": "success",
  "postType": "Reel",
  "caption": "🔥 Caption Text here...",
  "totalMedia": 1,
  "downloads": [
    {
      "type": "video",
      "url": "https://..."
    }
  ]
}

🛰️ Proxy Endpoint (to bypass CORS)

GET /proxy?url=<direct-instagram-cdn-url>

🖥️ Default Route

GET /

Response →

{
  "status": "✅ API Active",
  "message": "🚀 ইন্সটাগ্রাম মিডিয়া ডাউনলোডার এপিআই চালু রয়েছে!",
  "developer": "👨‍💻 Developed by: 𝐖𝐎𝐎𝐃𝐜𝐫𝐚𝐟𝐭",
  "version": "🔖 v1.007",
  "channels": [
    {
      "name": "📢 Updates Channel",
      "link": "https://t.me/Opleech_WD"
    },
    {
      "name": "💬 Support",
      "link": "https://t.me/Farooq_is_king"
    }
  ],
  "usage": "📥 POST /api/instagram with JSON { url: '<instagram-url>' }"
}

🛡️ License

MIT License © 2025 WOODcraft


📢 Join Our Telegram


👨‍💻 Developer

WOODcraft 🔥 | ❤️ Coding | 🚀 API Maker