This Instagram scraper is optimized for deployment on Vercel using Sparticuz Chromium.
- ✅ Instagram profile data extraction
- ✅ Serverless deployment ready
- ✅ Sparticuz Chromium for Vercel
- ✅ CORS enabled
- ✅ Error handling
- ✅ Private account detection
Health check endpoint
curl https://your-vercel-app.vercel.app/apiScrape Instagram profile
curl -X POST https://your-vercel-app.vercel.app/api/scrape \
-H "Content-Type: application/json" \
-d '{"profile": "https://www.instagram.com/instagram/"}'npm install -g vercelvercel loginvercel --prodSet in Vercel dashboard:
NODE_ENV=production
npm installnpm run devcurl -X POST http://localhost:3000/api/scrape \
-H "Content-Type: application/json" \
-d '{"profile": "https://www.instagram.com/instagram/"}'{
"posts": "8,170",
"followers": "694M",
"following": "244",
"likes": "1.2M",
"comments": "15K",
"privateAcc": false,
"desc": "Discover what's new on Instagram 🔎✨",
"username": "instagram",
"nplu": 0.125,
"hasProfilePicture": true
}- Rate Limiting: Instagram may rate limit requests
- Login Credentials: Update credentials in
/api/scrape.js - Timeout: Functions have 30-second timeout limit
- Memory: Optimized for Vercel's memory limits
- CORS: Enabled for cross-origin requests
- Timeout errors: Reduce page load timeout
- Memory issues: Optimize Chromium args
- Login failures: Check credentials and 2FA settings
vercel logs your-app-name- Store credentials in environment variables
- Enable rate limiting if needed
- Monitor usage and costs
- Consider implementing authentication
- Puppeteer Core: Headless browser automation
- Sparticuz Chromium: Serverless Chromium
- Cheerio: HTML parsing
- Vercel: Serverless deployment platform