Scrape instagram videos with no login required using puppeteer and express.
This is a powerful Instagram video scraper built using Express.js and Puppeteer. It allows you to extract video URL's from Instagram posts/reels with ease. Whether you want to create a personal video collection or analyze content for research, this tool makes the process straightforward.
Clone the repository
git clone https://github.com/riad-azz/instagram-video-scraper.git
Install dependencies
cd instagram-video-scraper && npm install
Running the server
# Development
npm run dev
# Production
npm start
GET /api/video?url={POST_URL}
: Scrapes the video URL of the specified Instagram Post/Reel URL.
const fetch = require('node-fetch');
const postUrl = 'https://www.instagram.com/p/{shortcode}/';
const apiUrl = `http://localhost:3000/api/video?url=${postUrl}`;
fetch(apiUrl)
.then(response => response.json())
.then(data => {
// Handle the scraped data here
mp4Url = data.videoUrl;
console.log(mp4Url);
})
.catch(error => {
console.error(error);
});
{
"videoUrl": "https://scontent.cdninstagram.com/v/t50.2886-16/385047357_643...mp4?...",
}
This Instagram Video Scraper is licensed under the MIT License - see the LICENSE file for details.