Instagram Video Scraper
Try for free
Pay $9.99 for 1,000 results
View all Actors
Instagram Video Scraper
social_media_scraper/instagram-video-scraper
Try for free
Pay $9.99 for 1,000 results
Scrape data from Instagram video.
Instagram Stats Actor
An Apify actor that fetches statistical data from Instagram posts using the Apify Instagram Scraper. This actor retrieves view counts, play counts, likes, and comments for Instagram posts.
Features
- Fetches comprehensive statistics for Instagram posts
- Handles timeouts and retries automatically
- Provides structured output data
- Supports both single post URLs and batch processing
- Includes detailed error handling and logging
Prerequisites
- Python 3.7 or later
- Apify SDK
- Valid Apify API token
- Instagram Apify API token
Installation
- Clone this repository or download the source files
1git clone <repository-url> 2cd instagram-stats-actor
- Install required dependencies
pip install apify-client httpx tenacity
Usage
Running as Apify Actor
- Input Schema:
1{ 2 "url": "https://www.instagram.com/p/example" 3}
- Example output:
1{ 2 "url": "https://www.instagram.com/p/example", 3 "shortCode": "example", 4 "statistics": { 5 "views": 1000, 6 "plays": 950, 7 "likes": 500, 8 "comments": 50 9 }, 10 "success": true 11}
Configuration Options
Parameter | Type | Description | Default |
---|---|---|---|
timeout | int | Request timeout in seconds | 30 |
max_retries | int | Maximum number of retry attempts | 3 |
Error Handling
The actor implements comprehensive error handling:
- Timeouts: Automatically retries with exponential backoff
- API Errors: Detailed error messages in the output
- Invalid URLs: Validation and meaningful error messages
- Network Issues: Automatic retry mechanism
Examples
Basic Actor Input
1{ 2 "url": "https://www.instagram.com/p/example" 3}
Custom Configuration Input
1{ 2 "url": "https://www.instagram.com/p/example", 3 "timeout": 60, 4 "maxRetries": 5 5}
Success Output Example
1{ 2 "url": "https://www.instagram.com/p/example", 3 "shortCode": "example", 4 "statistics": { 5 "views": 1000, 6 "plays": 950, 7 "likes": 500, 8 "comments": 50 9 }, 10 "success": true 11}
Error Output Example
1{ 2 "url": "https://www.instagram.com/p/example", 3 "error": "Request timed out after 30 seconds", 4 "success": false 5}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Developer
Maintained by Community
Actor Metrics
6 monthly users
-
0 No stars yet
>99% runs succeeded
Created in Oct 2024
Modified a month ago
Categories