Skip to main content

Get Post Details

Retrieves detailed information about a specific Instagram post using its shortcode or URL. Returns comprehensive post data including caption, engagement metrics, media URLs, location, tagged users, and carousel items.

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.
  • Post Shortcode or URL - Either the post shortcode (e.g., "CxYz123") or the full Instagram post URL (e.g., "https://www.instagram.com/p/CxYz123/").

Output

  • Post Details - A comprehensive object containing:
    • shortcode - Unique post identifier
    • post_id - Numeric post ID
    • typename - Post type (GraphImage, GraphVideo, GraphSidecar)
    • caption - Post caption text
    • caption_hashtags - Array of hashtags in the caption
    • caption_mentions - Array of mentioned usernames
    • date - Post publication date (UTC)
    • likes - Number of likes
    • comments_count - Number of comments
    • is_video - Boolean indicating if it's a video post
    • video_view_count - View count (for videos)
    • video_duration - Duration in seconds (for videos)
    • location - Location object with name, latitude, longitude (if tagged)
    • owner_username - Username of the post owner
    • owner_id - User ID of the post owner
    • tagged_users - Array of usernames tagged in the post
    • is_sponsored - Boolean indicating if post is sponsored
    • accessibility_caption - Alt text description (if available)
    • media_items - Array of media items (for carousel posts):
      • is_video - Boolean for this item
      • url - Media URL
      • thumbnail_url - Thumbnail (for videos)
    • post_url - Full Instagram post URL

How It Works

The Get Post Details node fetches comprehensive information about a specific post. When executed, it:

  1. Validates the Session ID and Post Shortcode/URL
  2. Extracts the shortcode from the URL if a full URL was provided
  3. Retrieves the post data from Instagram's API
  4. For carousel posts (multiple images/videos):
    • Fetches all sidecar nodes
    • Extracts media URLs for each item
  5. Compiles all post metadata and media information
  6. Returns the complete post details object

Requirements

  • An active Instagram session (from Login node)
  • A valid post shortcode or Instagram post URL
  • The post must exist and be accessible

Error Handling

The node will return specific errors in the following cases:

  • ErrInvalidArg - Post shortcode/URL is missing or empty
  • ErrNotFound - Post does not exist or was deleted
  • ErrRuntime - General failure to retrieve post details

Common Errors

Post Not Found:

Post with shortcode 'CxYz123' not found

Solution: Verify the shortcode is correct and the post still exists.

Invalid Shortcode: If you provide a malformed URL or shortcode, extraction may fail. Solution: Use the exact shortcode or copy the full post URL.

Usage Notes

  • Accepts both shortcode and full URL for convenience
  • Automatically extracts shortcode from URLs in various formats (/p/, /reel/, /tv/)
  • For carousel posts, media_items contains all images/videos in order
  • Single posts have one item in the media_items array
  • Location data includes coordinates when available
  • typename helps identify the post type programmatically
  • Video posts include both view count and duration
  • Accessibility captions provide AI-generated image descriptions

Example: Analyze Specific Post

Inputs:

Output Sample:

{
"shortcode": "CxYz123",
"post_id": "1234567890123456789",
"typename": "GraphSidecar",
"caption": "Beach vacation highlights! 🏖️ #travel #beach @friend",
"caption_hashtags": ["travel", "beach"],
"caption_mentions": ["friend"],
"date": "2024-01-10T14:30:00+00:00",
"likes": 3542,
"comments_count": 89,
"is_video": false,
"video_view_count": null,
"video_duration": null,
"location": {
"name": "Malibu Beach",
"lat": 34.0259,
"lng": -118.7798
},
"owner_username": "travel_enthusiast",
"owner_id": "987654321",
"tagged_users": ["friend", "photographer_pro"],
"is_sponsored": false,
"accessibility_caption": "Photo of a beach sunset with palm trees",
"media_items": [
{
"is_video": false,
"url": "https://instagram.com/.../photo1.jpg",
"thumbnail_url": null
},
{
"is_video": false,
"url": "https://instagram.com/.../photo2.jpg",
"thumbnail_url": null
},
{
"is_video": true,
"url": "https://instagram.com/.../video1.mp4",
"thumbnail_url": "https://instagram.com/.../thumb1.jpg"
}
],
"post_url": "https://www.instagram.com/p/CxYz123/"
}

Workflow:

Get Post Details (carousel post)

For each item in media_items:
If is_video:
Download video from url
Else:
Download image from url

Store all media files locally

Use Case: Archive all images and videos from a carousel post.

Example: Engagement Analysis

Workflow:

Get Post Details

Calculate metrics:
- Engagement rate: (likes + comments_count)
- Like-to-comment ratio: likes / comments_count
- Video completion rate (if video): compare views to follower count

Store metrics in database

Example: Location-Based Research

Workflow:

For each post_url in list:
Get Post Details

If location exists:
Extract location.name, lat, lng
Add to location database

Generate location popularity map

Example: Sponsored Content Detection

Workflow:

Get Profile Posts → Extract post URLs

For each post URL:
Get Post Details

If is_sponsored == true:
Log as sponsored content
Analyze caption for brand mentions

Best Practices

  • Use full URLs for convenience when copying from Instagram
  • Check typename to handle different post types appropriately
  • For carousel posts, iterate through media_items to access all media
  • Extract location data for geographic analysis
  • Monitor is_sponsored to filter organic vs paid content
  • Use tagged_users to discover collaborations and partnerships
  • Cache post details to avoid repeated API calls
  • Handle deleted posts gracefully (ErrNotFound)

Tips for Effective Use

  • URL Flexibility: The node accepts various URL formats (/p/, /reel/, /tv/)
  • Carousel Detection: Check typename == "GraphSidecar" for multi-item posts
  • Complete Media: media_items ensures you get all content from carousel posts
  • Location Intelligence: Use lat/lng for mapping and geographic insights
  • Content Attribution: owner_username and tagged_users reveal collaborations
  • Video Metrics: video_view_count provides engagement data beyond likes
  • Accessibility: accessibility_caption offers AI-generated image descriptions
  • Sponsored Detection: Filter or flag sponsored content for analysis

Common Use Cases

  1. Post Archival - Save complete post data and all media files
  2. Engagement Tracking - Monitor specific posts' performance over time
  3. Carousel Analysis - Extract and analyze multi-image/video posts
  4. Location Research - Map posts by geographic location
  5. Influencer Campaign Tracking - Monitor sponsored post performance
  6. Content Verification - Confirm post details and authenticity
  7. User-Generated Content - Find posts with your brand tags
  8. Competitive Analysis - Study individual competitor posts in detail

Post Types by Typename

  • GraphImage - Single image post
  • GraphVideo - Single video post (includes reels)
  • GraphSidecar - Carousel post (multiple images/videos)
  • XDTGraphVideo - Alternative video type designation

Media Items Structure

For Single Posts:

"media_items": [
{
"is_video": false,
"url": "https://instagram.com/.../image.jpg",
"thumbnail_url": null
}
]

For Carousel Posts:

"media_items": [
{ "is_video": false, "url": "...img1.jpg", "thumbnail_url": null },
{ "is_video": false, "url": "...img2.jpg", "thumbnail_url": null },
{ "is_video": true, "url": "...vid.mp4", "thumbnail_url": "...thumb.jpg" }
]

Important Notes

  • URL Parsing: The node intelligently extracts shortcodes from various URL formats
  • Carousel Support: Unlike basic post lists, this node provides all carousel items
  • Location Precision: Location coordinates are approximate, based on Instagram's data
  • Deleted Posts: Will return ErrNotFound if the post has been deleted
  • Private Posts: Post must be accessible to the authenticated account
  • Media URLs: URLs are direct links to Instagram's CDN, valid for a limited time