Skip to main content

Get Profile Posts

Retrieves posts from an Instagram profile with optional filtering and limits. Returns detailed post information including captions, likes, comments, hashtags, mentions, and media URLs.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Session ID - The session identifier from the Login node.
  • Username - Instagram username to retrieve posts from (without the @ symbol).
  • Max Posts - Maximum number of posts to retrieve. Set to 0 to retrieve all posts (use with caution on profiles with many posts).

Options

  • Include Videos - Include video posts in the results. Default is true. When set to false, only image posts will be returned.

Output

  • Posts - Array of post objects, each containing:

    • shortcode - Unique post identifier
    • post_id - Numeric post ID
    • caption - Post caption text
    • caption_hashtags - Array of hashtags in the caption
    • caption_mentions - Array of mentioned usernames
    • date - Post creation date (UTC)
    • likes - Number of likes
    • comments_count - Number of comments
    • is_video - Boolean indicating if post is a video
    • video_view_count - View count (for videos only)
    • url - Media URL (video URL for videos, image URL for photos)
    • thumbnail_url - Thumbnail URL (for videos only)
    • location - Location name (if tagged)
    • tagged_users - Array of tagged usernames
    • is_sponsored - Boolean indicating if post is sponsored
    • post_url - Full Instagram post URL
  • Post Count - Total number of posts retrieved.

How It Works

The Get Profile Posts node fetches posts from a profile's feed. When executed, it:

  1. Validates the Session ID and Username
  2. Retrieves the profile using the Instagram API
  3. Iterates through the profile's posts
  4. Filters out videos if Include Videos is disabled
  5. Extracts comprehensive data for each post
  6. Stops when Max Posts limit is reached or all posts are retrieved
  7. Returns the posts array and count

Requirements

  • An active Instagram session (from Login node)
  • A valid Instagram username
  • Permission to view the profile (public or followed private accounts)

Error Handling

The node will return specific errors in the following cases:

  • ErrInvalidArg - Username is missing or empty
  • ErrNotFound - Profile does not exist
  • ErrPermission - Profile is private and you don't follow them
  • ErrRuntime - General failure to retrieve posts

Common Errors

Profile Not Found:

Profile 'username' does not exist

Solution: Verify the username is correct.

Private Profile:

Profile 'username' is private and you don't follow them

Solution: You must follow the account to access their posts.

Usage Notes

  • Posts are returned in reverse chronological order (newest first)
  • Setting Max Posts to 0 retrieves all posts, which may take significant time for large profiles
  • Video posts include both video URL and thumbnail URL
  • Carousel posts (multiple images) show only the first image; use Get Post Details for all carousel items
  • Sponsored posts are clearly marked with the is_sponsored flag
  • Location data is only available if the user tagged a location
  • Rate limiting may occur when retrieving large numbers of posts

Example: Content Analysis

Inputs:

  • Session ID: (from Login node)
  • Username: "travel_blogger"
  • Max Posts: 50

Options:

  • Include Videos: true

Output Sample:

{
"posts": [
{
"shortcode": "CxYz123",
"post_id": "1234567890123456789",
"caption": "Amazing sunset in Santorini! #travel #sunset #greece",
"caption_hashtags": ["travel", "sunset", "greece"],
"caption_mentions": [],
"date": "2024-01-15T18:30:00+00:00",
"likes": 5420,
"comments_count": 127,
"is_video": false,
"video_view_count": null,
"url": "https://instagram.com/.../image.jpg",
"thumbnail_url": null,
"location": "Santorini, Greece",
"tagged_users": ["friend_username"],
"is_sponsored": false,
"post_url": "https://www.instagram.com/p/CxYz123/"
}
],
"posts_count": 50
}

Example: Hashtag Analysis

Workflow:

Login

Get Profile Posts (competitor, max: 100)

For each post:
Extract caption_hashtags
Count frequency

Generate hashtag report

Logout

Result: Discover which hashtags your competitors use most frequently.

Example: Engagement Rate Calculation

Workflow:

Get Profile Info → Get followers count

Get Profile Posts (max: 50)

Calculate average: (likes + comments) / followers * 100

Generate engagement report

Example: Content Calendar Analysis

Use Case: Analyze posting frequency and timing

Workflow:

Get Profile Posts (max: 100)

For each post:
Extract date
Parse day of week and hour

Generate posting schedule insights

Best Practices

  • Use reasonable Max Posts limits to avoid rate limiting (50-100 for regular use)
  • Set Include Videos to false if you only need image posts for faster processing
  • Add delays when processing multiple profiles in sequence
  • Store post data locally to avoid repeated API calls
  • Monitor the is_sponsored flag to filter organic vs paid content
  • Use caption_hashtags for hashtag strategy analysis
  • Check location field availability before using it in your logic
  • For large-scale analysis, retrieve posts in batches with delays

Tips for Effective Use

  • Performance: Retrieving 50 posts typically takes 10-15 seconds
  • Video Filtering: Disable videos if you only need images to speed up processing
  • Hashtag Research: Extract caption_hashtags to discover trending tags in your niche
  • Content Strategy: Analyze high-performing posts (likes + comments) to guide your strategy
  • Competitor Intelligence: Track posting frequency and content types
  • User-Generated Content: Find tagged_users to discover brand advocates
  • Media Collection: Combine with Download Post Media to archive content
  • Engagement Patterns: Compare likes vs comments to understand audience behavior

Common Use Cases

  1. Content Curation - Find and analyze top-performing content
  2. Competitive Analysis - Study competitor posting strategies
  3. Hashtag Research - Discover effective hashtags from successful accounts
  4. Brand Monitoring - Track posts mentioning your brand
  5. Influencer Analysis - Evaluate influencer content quality and engagement
  6. Trend Discovery - Identify popular content themes in your industry
  7. Media Collection - Extract URLs for content archiving
  8. Location Analysis - Study geographic patterns in posts

Performance Considerations

  • Retrieving posts is rate-limited by Instagram
  • Large post counts (1000+) can take several minutes
  • Use Max Posts to limit retrieval time
  • Consider caching post data for repeated analysis
  • Video posts may take slightly longer to process
  • Add 1-2 second delays between batches of profile requests