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.
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
0to 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 tofalse, only image posts will be returned.
Output
-
Posts - Array of post objects, each containing:
shortcode- Unique post identifierpost_id- Numeric post IDcaption- Post caption textcaption_hashtags- Array of hashtags in the captioncaption_mentions- Array of mentioned usernamesdate- Post creation date (UTC)likes- Number of likescomments_count- Number of commentsis_video- Boolean indicating if post is a videovideo_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 usernamesis_sponsored- Boolean indicating if post is sponsoredpost_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:
- Validates the Session ID and Username
- Retrieves the profile using the Instagram API
- Iterates through the profile's posts
- Filters out videos if Include Videos is disabled
- Extracts comprehensive data for each post
- Stops when Max Posts limit is reached or all posts are retrieved
- 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_sponsoredflag - 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_sponsoredflag to filter organic vs paid content - Use caption_hashtags for hashtag strategy analysis
- Check
locationfield 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
- Content Curation - Find and analyze top-performing content
- Competitive Analysis - Study competitor posting strategies
- Hashtag Research - Discover effective hashtags from successful accounts
- Brand Monitoring - Track posts mentioning your brand
- Influencer Analysis - Evaluate influencer content quality and engagement
- Trend Discovery - Identify popular content themes in your industry
- Media Collection - Extract URLs for content archiving
- 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