Instagram Post Super Scraper avatar
Instagram Post Super Scraper

Pricing

$1.50 / 1,000 results

Go to Apify Store
Instagram Post Super Scraper

Instagram Post Super Scraper

Developed by

Muhammad Noman Riaz

Muhammad Noman Riaz

Maintained by Community

Scrape Instagram posts from any public profile or post URL. Extract captions, hashtags, mentions, likes, comments, media URLs, and timestamps. Built for speed, stability, and accuracy with infinite scroll handling and anti-blocking automation.

0.0 (0)

Pricing

$1.50 / 1,000 results

0

2

1

Last modified

2 days ago

Instagram Post Scraper

Scrape Instagram posts from public profiles or specific post URLs. Extract comprehensive data including captions, likes, comments, hashtags, mentions, images, videos, and more. Supports both authenticated and guest access modes.

Features

  • Multiple Input Formats: Scrape by username, profile URL, or direct post URL
  • Comprehensive Data Extraction: Get all available post data including:
    • Post metadata (ID, type, shortcode, URL)
    • Content (caption, hashtags, mentions)
    • Engagement metrics (likes, comments count)
    • Media (images, videos, carousels)
    • Comments with replies
    • Tagged users and coauthors
    • Music information (for reels)
    • Sponsored status
  • Date Filtering: Only scrape posts newer than a specified date
  • Pinned Posts Control: Option to skip pinned posts
  • Configurable Limits: Control how many posts and comments to extract

Input Parameters

Required

  • username (Array): List of Instagram usernames, profile URLs, or post URLs
    • Examples: ["natgeo"], ["https://www.instagram.com/natgeo/"], ["https://www.instagram.com/p/ABC123/"]

Optional

  • resultsLimit (Integer, default: 200): Maximum posts per profile (1-10000)
  • onlyPostsNewerThan (String): Date filter in various formats:
    • Relative: "1 day", "2 months", "3 years"
    • Absolute: "2025-01-01" or ISO format
  • skipPinnedPosts (Boolean, default: false): Skip pinned posts
  • maxComments (Integer, default: 10): Maximum comments per post (0-100)
  • proxy (Object): Proxy configuration for reliable scraping

Output Format

The scraper outputs data in JSON format with the following structure:

{
"inputUrl": "https://www.instagram.com/p/ABC123/",
"id": "1234567890",
"type": "Image",
"shortCode": "ABC123",
"caption": "Post caption text",
"hashtags": ["tag1", "tag2"],
"mentions": ["user1", "user2"],
"url": "https://www.instagram.com/p/ABC123/",
"commentsCount": 100,
"firstComment": "First comment text",
"latestComments": [...],
"dimensionsHeight": 1080,
"dimensionsWidth": 1080,
"displayUrl": "https://...",
"images": [],
"alt": "Alternative text",
"likesCount": 5000,
"timestamp": "2025-01-01T00:00:00.000Z",
"childPosts": [],
"ownerFullName": "Account Name",
"ownerUsername": "username",
"ownerId": "123456",
"isSponsored": false,
"isCommentsDisabled": false,
"videoUrl": "https://...",
"videoDuration": 30.5,
"videoViewCount": 10000,
"videoPlayCount": 15000,
"taggedUsers": [...],
"coauthorProducers": [...],
"musicInfo": {...}
}

Example Usage

Scrape Posts from a Profile

{
"username": ["natgeo"],
"resultsLimit": 20
}

Scrape Specific Posts

{
"username": [
"https://www.instagram.com/p/ABC123/",
"https://www.instagram.com/p/DEF456/"
]
}

Scrape Recent Posts Only

{
"username": ["natgeo"],
"resultsLimit": 50,
"onlyPostsNewerThan": "7 days",
"skipPinnedPosts": true
}

Data Fields Explanation

Post Types

  • Image: Single image post
  • Video: Video or reel post
  • Sidecar: Carousel with multiple images/videos

Comment Structure

Each comment includes:

  • Comment text and ID
  • Owner information (username, profile picture, verification status)
  • Timestamp
  • Like count
  • Replies (nested comments)

Video Data

For video posts, additional fields are included:

  • videoUrl: Direct video URL
  • videoDuration: Duration in seconds
  • videoViewCount: Number of views
  • videoPlayCount: Number of plays

Tagged Users

Array of users tagged in the post with:

  • Username and full name
  • User ID
  • Verification status
  • Profile picture URL

Technical Details

Rate Limiting

Instagram has rate limits. Use proxy rotation for reliable large-scale scraping.

Authentication

This scraper supports authenticated access for enhanced data collection. Authentication is handled securely through a session file and is not exposed in the public input schema.

Session File:

  • session/instagram-session.json: Contains encrypted session cookies for authenticated access

When authenticated, the scraper can access:

  • Full post data with complete engagement metrics
  • Private profiles (if accessible)
  • Stories and additional content
  • Reduced rate limits

Without authentication, the scraper operates in guest mode with limited access to recent posts only.

Error Handling

  • Automatic retries for failed requests
  • Graceful error handling for unavailable posts
  • Detailed logging for debugging

Requirements

  • Node.js 20+
  • Apify SDK
  • Proxy configuration (recommended for production use)

Limitations

  • Authentication Required for Full Access: Without authentication (via environment variables), only recent public posts are accessible
  • Rate Limits: Instagram applies stricter rate limits for unauthenticated requests
  • Data Availability: Some engagement metrics may be hidden or limited for guest users
  • Cannot scrape private accounts (unless authenticated user has access)
  • Some posts may return -1 for likes if the count is hidden by the user

Support

For issues or questions, please create an issue in the repository.

License

ISC