Instagram Post Details Scraper

Extract public Instagram post captions, authors, timestamps, media URLs, and visible engagement metrics from direct post URLs.

Data fields

FieldTypeDescription
inputUrlstringValue exported as inputUrl.
statusstringValue exported as status.
errorTypestring | nullValue exported as errorType.
errorMessagestring | nullValue exported as errorMessage.
shortCodestring | nullValue exported as shortCode.
urlstring | nullValue exported as url.
typestring | nullValue exported as type.
ownerUsernamestring | nullValue exported as ownerUsername.

Input preview

startUrlsPost URLs *
maxItemsMaximum URLs to process
includeMediaUrlsInclude media URLs
proxyConfigurationProxy configuration

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Extract structured metadata from direct public Instagram post URLs. Paste /p/{shortcode}/ links and get normalized post details for reporting, research, enrichment, exports, API workflows, and AI agents.

At a glance

  • Primary job: Turn public Instagram post URLs into clean dataset rows.
  • Input: Direct public Instagram /p/ post URLs.
  • Output: Caption, author, shortcode, timestamp, visible engagement counts, media links, and diagnostics.
  • Best for: Social media analysis, creator research, brand monitoring, compliance review, and content datasets.

Who is this for?

  • Social media analysts tracking public post performance from known URLs.
  • Influencer and creator marketers auditing campaign posts without crawling full profiles.
  • Brand, compliance, and research teams collecting normalized public post records for review.
  • AI and automation builders feeding public post metadata into reports, alerts, or enrichment pipelines.

Use cases

  • Campaign reporting: Export captions, authors, dates, and visible engagement for a curated URL list.
  • Content research: Build datasets from public posts you already know about.
  • Compliance review: Keep reproducible records of public post metadata and capture missing/error diagnostics.
  • Workflow automation: Trigger runs from API, Zapier-like tools, or MCP agents and process the dataset downstream.

Input recipes

  • Small smoke test: Use one public post URL and maxItems: 1.
  • Campaign audit: Paste a list of saved campaign post URLs and export owner, caption, date, likes, and comments.
  • Research dataset: Schedule repeat runs for the same URL list to refresh public metadata over time.

What data can you extract?

Field Description
inputUrl Original URL from your input.
status success or error for each input URL.
shortCode Instagram post shortcode.
url Normalized canonical post URL.
ownerUsername Public username shown in post metadata.
ownerFullName Public display name when visible.
ownerId Public Instagram owner ID when exposed.
ownerProfileUrl Instagram profile URL for the owner.
caption Public post caption when visible.
hashtags Hashtags parsed from the caption.
mentions Mentioned usernames parsed from the caption.
timestamp Public post date/time when visible.
likesCount Public like count when visible.
commentsCount Public comment count when visible.
viewsCount Public view count when visible.
isVideo Whether the post exposes a video URL.
isCarousel Whether the page indicates a carousel/sidecar post.
displayUrl Public image/display URL when exposed and requested.
videoUrl Public video URL when exposed and requested.
thumbnailUrl Public thumbnail URL when exposed and requested.
missingFields Fields not visible in the public page metadata.
errorType, errorMessage Diagnostics for invalid, blocked, deleted, or unsupported URLs.
scrapedAt Timestamp when the row was saved.

Example input

{
  "startUrls": [
    { "url": "https://www.instagram.com/p/DWZitMjgHp1/" }
  ],
  "maxItems": 1,
  "includeMediaUrls": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}

Example output

{
  "inputUrl": "https://www.instagram.com/p/DWZitMjgHp1/",
  "status": "success",
  "shortCode": "DWZitMjgHp1",
  "url": "https://www.instagram.com/p/DWZitMjgHp1/",
  "type": "post",
  "ownerUsername": "cristiano",
  "ownerFullName": "Cristiano Ronaldo",
  "ownerProfileUrl": "https://www.instagram.com/cristiano/",
  "caption": "On the ball ⚽️",
  "hashtags": [],
  "mentions": [],
  "timestamp": "2026-03-27T00:00:00.000Z",
  "likesCount": 3000000,
  "commentsCount": 28000,
  "isVideo": false,
  "isCarousel": false,
  "missingFields": [],
  "scrapedAt": "2026-07-15T08:49:40.909Z"
}

Tips for best results

  • Use direct post links: This Actor is for /p/{shortcode}/ URLs, not profile, hashtag, search, or comment URLs.
  • Start small: Test 1-3 URLs before running larger batches.
  • Expect missing fields: Instagram may hide likes, comments, dates, or media URLs on some public posts. Missing public fields are listed in missingFields.
  • Use proxies: Residential proxy is prefilled because Instagram often rate-limits cloud traffic.

API usage

Node.js:

import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("fetch_cat/instagram-post-details-scraper").call({
  startUrls: [{ url: "https://www.instagram.com/p/DWZitMjgHp1/" }],
  maxItems: 1,
  includeMediaUrls: true
});
console.log(run.defaultDatasetId);

Python:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("fetch_cat/instagram-post-details-scraper").call(run_input={
    "startUrls": [{ "url": "https://www.instagram.com/p/DWZitMjgHp1/" }],
    "maxItems": 1,
    "includeMediaUrls": True,
})
print(run["defaultDatasetId"])

cURL:

curl -X POST "https://api.apify.com/v2/acts/fetch_cat~instagram-post-details-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://www.instagram.com/p/DWZitMjgHp1/"}],"maxItems":1,"includeMediaUrls":true}'

MCP and AI agents

Use this Actor from MCP-compatible tools through the official Apify MCP Server.

claude mcp add --transport http apify "https://mcp.apify.com?tools=fetch_cat/instagram-post-details-scraper"
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/instagram-post-details-scraper"
    }
  }
}

Example prompt: "Run Instagram Post Details Scraper for these public post URLs and summarize captions, owners, and visible engagement."

Limits and caveats

  • Public direct Instagram post URLs only. Private, deleted, age-gated, login-only, profile, hashtag, search, follower, liker, DM, and comment-thread data are out of scope.
  • Visible public metrics can be hidden or rounded by Instagram.
  • Instagram may throttle large or frequent runs; keep concurrency low and use proxies.
  • Error rows are saved for invalid or unsupported URLs so batch runs are easier to debug.

Legality and responsible use

Process only public data that you are allowed to access. Follow Instagram's terms, Apify's terms, and applicable laws. Do not use this Actor for private account data, login-only data, or personal data misuse.

Support

Open an issue from the Actor page if a run fails or output looks wrong. Include the run ID or run URL, input JSON, expected output, actual output, and one reproducible public URL.

Common questions

Questions and answers reused from the canonical actor README.

Does it scrape comments or likers?

No. V1 returns post-level public metadata only. Comment threads, likers, followers, and private account analytics are not included.

Why are some fields empty?

Instagram does not expose every field for every public post. The Actor leaves unavailable fields empty and lists them in missingFields instead of guessing.

Can I export results?

Yes. Apify datasets support JSON, CSV, Excel, XML, RSS, and API access.