Instagram Posts Scraper avatar

Instagram Posts Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Instagram Posts Scraper

Instagram Posts Scraper

📸 Instagram Posts Scraper (instagram-posts-scraper) pulls posts at scale — captions, hashtags, likes, comments, timestamps, media URLs (photos, videos, Reels) & engagement metrics. 🚀 Perfect for competitor analysis, social listening, content planning & reporting. Fast, reliable, export-ready.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

Scraply

Scraply

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Share

Instagram Posts Scraper

The Instagram Posts Scraper is a production-ready Instagram post scraper that collects public posts from profile usernames at scale — including captions, media URLs, engagement counts, and timestamps. Built for marketers, developers, data analysts, and researchers, this Instagram post data extractor automatically detects whether you provide profile URLs, plain usernames, or post shortcodes and extracts the profile username for scraping. With Python-based reliability, it enables bulk Instagram posts scraper workflows for competitor analysis, social listening, content planning, and reporting.

What data / output can you get?

Below are examples of real fields produced by this Instagram posts scraper tool (keys match the Instagram API response, plus minimal metadata added by the actor):

Data typeDescriptionExample value
idUnique post identifier (combines media and user IDs)"3727992219681477950_173560420"
pkPost primary key"3727992219681477950"
codePost shortcode (used to build the URL)"DO8fSwLiNU-"
taken_atUnix timestamp when the post was published1758631325
like_countNumber of likes7141379
comment_countNumber of comments72516
media_typeMedia type (e.g., image, video, carousel)8
product_typePost type/category"carousel_container"
caption.textFull caption text if present"Happy Saudi National Day to everyone in Saudi Arabia! ..."
image_versions2.candidates[0].urlDirect URL to an image variant"https://scontent-iad3-1.cdninstagram.com/v/t51.2885-15/..."
user.usernamePost owner’s username"cristiano"
scraped_usernameUsername that was scraped (added by the actor)"cristiano"
scraped_atUnix timestamp when the post was scraped (added by the actor)1758728197
post_urlCanonical Instagram post URL (added by the actor)"https://www.instagram.com/p/DO8fSwLiNU-/"

Notes:

  • Outputs are stored in the Apify dataset and can be exported to JSON, CSV, or Excel.
  • Depending on the post type, some nested fields (e.g., carousel_media, caption) may be missing or vary in structure.

Key features

  • 🚀 Automatic input detection
    Paste profile URLs, plain usernames, or post shortcodes — the scraper validates and extracts the correct profile username before scraping.

  • 🧭 Robust profile post pagination
    Fetches posts page-by-page using Instagram’s web endpoints, with retry and backoff to improve stability when you scrape Instagram posts at scale.

  • 📊 Engagement & metadata capture
    Collects fields such as like_count, comment_count, taken_at, media_type, product_type, and caption metadata for downstream analytics.

  • 🖼 Media URLs for images and carousels
    Access multiple image variants via image_versions2.candidates[].url and (when present) carousel_media for comprehensive media harvesting.

  • 🧱 Minimal, analytics-ready enrichment
    Adds scraped_username, scraped_at, and a constructed post_url per item — preserving the original Instagram structure for flexible analysis.

  • 🔒 Residential proxy by default
    Always uses Apify Residential Proxy automatically to improve reliability and reduce blocking; proxy fallback logic is included.

  • 🧑‍💻 Developer-friendly Python actor
    Built in Python using the Apify SDK — ideal for teams that want an Instagram post scraper API endpoint and IG posts scraper automation in pipelines.

  • 🔁 Sorting control
    Choose newest or oldest to order the returned posts for consistent analytics and exports.

  • 🧩 Apify-native integrations
    Orchestrate runs via the Apify API and connect results to Make, Zapier, n8n, or BI tools for end-to-end automation.

How to use Instagram Posts Scraper - step by step

  1. 🔑 Sign in to Apify
    Log in to your Apify account (or create one) to run the IG posts scraper in the cloud.

  2. 🔍 Open the actor
    Find “Instagram Posts Scraper” and open it from the Apify Store.

  3. 🧾 Add input data
    In startUrls, enter any mix of:

    The actor auto-detects and extracts the profile username.

  4. ⚙️ Configure settings (optional)

    • maxPosts: Set the maximum number of posts to scrape per profile (1–1000).
    • sortOrder: Choose "newest" or "oldest".
    • maxComments: Present for future use (default 0).
    • proxyConfiguration: You can provide settings, but residential proxy is always used automatically.
  5. ▶️ Run the actor
    Click Start. The scraper validates inputs, acquires tokens, and paginates through the user feed to collect posts.

  6. ⏱ Monitor progress
    Follow logs to see page-by-page progress and retries. The actor adds scraped_username, scraped_at, and post_url to each item.

  7. 💾 Download results
    Open the run’s dataset to export results in JSON, CSV, or Excel for analysis and reporting.

Pro tip: Use the Apify API to trigger bulk Instagram posts scraper online workflows and pipe data to your analytics stack or dashboards.

Use cases

Use case nameDescription
Digital marketing — competitor content analysisBenchmark posting cadence, top-performing media types, and engagement using like_count, comment_count, and taken_at.
Social listening — content & mentions trackingAggregate captions and media to monitor trends and public narratives across target profiles.
Content planning — creative researchBuild a reference library of image URLs and captions to inform your own posts and campaigns.
Reporting — campaign trackingTrack engagement deltas over time by scraping posts in consistent intervals and ordering by sortOrder.
Data engineering — API pipelinesUse the Apify API with this Instagram post scraper API to automate ingestion into data warehouses.
Academic research — behavioral analysisAnalyze public posting behavior and media formats using structured timestamps and metadata.

Why choose Instagram Posts Scraper?

This Instagram public posts scraper is built for precision, stability, and automation on Apify’s infrastructure.

  • ✅ Accuracy-first extraction: Preserves Instagram’s native structure with minimal, useful enrichment for analytics.
  • 🌍 Scalable & reliable: Uses residential proxy by default with retry/backoff and proxy fallback logic.
  • 🧑‍💻 Developer access: Python-based IG posts scraper with Apify API control for CI/CD and data pipelines.
  • 🔒 Ethical by design: Targets publicly available profile posts only; no private profile access.
  • 💰 Cost-effective automation: Run at scale in the cloud and export to common analytics formats.
  • 🔌 Integration-ready: Connect datasets to Make, Zapier, n8n, or BI tools without brittle browser extensions.
  • 🧰 Built for production: Cloud-native runs, dataset storage, and logs for observability and repeatability.

In short, this Instagram profile posts scraper outperforms manual tools and extensions with stable, structured, and automation-friendly results.

Yes — when done responsibly. This tool targets publicly available Instagram profile posts and does not access private accounts or authenticated data.

Guidelines for responsible use:

  • Scrape only public data from public profiles.
  • Respect Instagram’s terms and policies and applicable laws (e.g., GDPR/CCPA).
  • Avoid collecting or processing personal data beyond what is publicly available.
  • Validate your use case with your legal team for edge scenarios.

The actor does not log in or use user accounts and does not access private or gated endpoints.

Input parameters & output format

Input JSON example

{
"startUrls": [
"https://www.instagram.com/cristiano/",
"neymarjr"
],
"maxPosts": 10,
"sortOrder": "newest",
"maxComments": 0,
"proxyConfiguration": { "useApifyProxy": false }
}

Input parameters

  • startUrls (array[string], required):
    Description: List one or more Instagram profile URLs (e.g., https://www.instagram.com/username), usernames (e.g., username), or post shortcodes (e.g., ABC123DEF). The actor will automatically detect the input type and extract the profile username.
    Default: none

  • maxPosts (integer, optional):
    Description: Maximum number of posts to scrape per profile (1-1000).
    Default: 10

  • sortOrder (string, optional):
    Description: Order in which to sort the posts. Supported values: "newest", "oldest".
    Default: "newest"

  • maxComments (integer, optional):
    Description: Maximum number of comments to extract per post (0-100).
    Default: 0

  • proxyConfiguration (object, optional):
    Description: Note: This actor always uses residential proxy regardless of your selection. You can configure proxy settings here, but residential proxy will be used automatically.
    Default: { "useApifyProxy": false }

Output JSON example

Each pushed item preserves Instagram’s original structure with a few added fields for analytics (scraped_username, scraped_at, post_url). Example:

{
"fbid": "18057741575412011",
"pk": "3727992219681477950",
"id": "3727992219681477950_173560420",
"code": "DO8fSwLiNU-",
"media_type": 8,
"product_type": "carousel_container",
"taken_at": 1758631325,
"like_count": 7141379,
"comment_count": 72516,
"caption": {
"text": "Happy Saudi National Day to everyone in Saudi Arabia! 🇸🇦 Wishing you a day filled with pride, unity, and celebration with your loved ones."
},
"image_versions2": {
"candidates": [
{
"height": 1839,
"url": "https://scontent-iad3-1.cdninstagram.com/v/t51.2885-15/552825156_18648550693056421_6760424445129157822_n.jpg?...",
"width": 1440
}
]
},
"user": {
"username": "cristiano",
"is_verified": true,
"id": "173560420"
},
"scraped_username": "cristiano",
"scraped_at": 1758728197,
"post_url": "https://www.instagram.com/p/DO8fSwLiNU-/"
}

Notes:

  • The actor adds only three fields: scraped_username, scraped_at, and post_url.
  • Other fields come directly from Instagram’s web responses and may vary by media type (single image, video, carousel, etc.).

FAQ

Do I need to provide profile URLs, usernames, or post shortcodes?

You can provide any of the three. The actor automatically detects the input type and extracts the correct profile username to scrape.

Does this work without login?

Yes. The Instagram public posts scraper uses publicly accessible endpoints and does not require login or cookies.

Can I sort results by newest or oldest?

Yes. Use the sortOrder input parameter and set it to "newest" or "oldest" to control ordering.

What engagement data is included?

The output includes like_count, comment_count, and taken_at for each post, along with media_type and product_type for content classification.

Does it extract comments text?

No. While maxComments is available as an input, this version does not extract comment bodies. It captures comment_count and other post-level metadata.

Can I use it with the Apify API or Python?

Yes. This is a Python-based Instagram posts scraper that runs on Apify. You can trigger runs and fetch datasets via the Apify API for automation.

What proxies does it use?

The actor always uses Apify Residential Proxy automatically, with fallback logic for stability. You can still pass a proxyConfiguration object, but residential proxy is enforced.

How many posts can I scrape per profile?

Configure maxPosts between 1 and 1000. The actor paginates the user feed and stops when it reaches your limit or when no more posts are available.

Closing CTA / Final thoughts

The Instagram Posts Scraper is built for structured, scalable extraction of public Instagram profile posts. It preserves native Instagram data while adding minimal metadata for analytics and automation.

Whether you’re a marketer, analyst, developer, or researcher, you can scrape Instagram posts reliably, sort them for reporting, and export clean datasets for BI tools. Developers can orchestrate bulk runs via the Apify API and integrate this Instagram post scraper API into pipelines.

Start extracting smarter Instagram insights today — at scale, with reliability, and in formats your team can use immediately.