Support needed? Reach out! 📧

Instagram Posts API

Access Instagram post feeds from any public account including captions, media URLs, and engagement metrics for content research and strategy.

python-logo Python
Instagram User Posts
1 import requests
2  
3 root = "https://ensembledata.com/apis"
4 endpoint = "/instagram/user/posts"
5 params = {
6   "user_id"18428658,
7   "depth"1,
8   "oldest_timestamp"1666262030,
9   "chunk_size"10,
10   "start_cursor""",
11   "alternative_method"False,
12   "token""YOUR-TOKEN-HERE"
13 }
14  
15 res = requests.get(root+endpoint, params=params)
16 print(res.json())
17  

Parameters

user_id (integer) ID of the user. REQUIRED
depth (integer) Abstraction of the API pagination. Depth 1 returns X results, depth N returns N * X results. Note that the exact number of results per depth (X) may differ per endpoint. Please refer to the specific endpoint description for more information. REQUIRED
oldest_timestamp (integer) This parameter is used as a stopping condition for fetching posts. If a post older than the provided `oldest_timestamp` is found, the system will stop fetching posts and return the results. For instance, if depth is 10, the system will aim to send 10 requests. However, if an `oldest_timestamp` is set, and we find a post which is older than the `oldest_timestamp`, the system will not send any more requests and return the results. Note: we do not filter out posts older than the provided `oldest_timestamp` before returning the results. Please do this filtering in your own integration if required.
chunk_size (integer) The number of posts to fetch per depth. If alternative_method=False, the maximum allowed chunk_size is 20. If alternative_method=True, the maximum chunk_size is 12.
start_cursor (string) Parameter to manually handle pagination. Each response contains a `last_cursor` which can be used to retrieve the next page of results by sending it as the next `start_cursor`. If the `last_cursor` is not present in the response, it means that there are no more results to retrieve.
alternative_method (boolean) If true, use a different method to fetch the user posts from the ID (this method returns at least 1 non pinned post when `start_cursor` is an empty string). The response JSON will be differ from the default method.
token (string) Private token assigned to each client to access the APIs. REQUIRED

Scrape Instagram Data Effortlessly

Crawl Instagram content at scale with our posts API, great for auditing a creator's feed, spotting content trends, or benchmarking against competitors.

deco-icon

Plug & Play API

Integrate in minutes with clear docs and code samples. Get started with a single REST call.

deco-icon

Real-Time Results

Every request scrapes the latest data in seconds. No stale datasets, just up-to-date insights.

deco-icon

Flexible APIs

Need something special? We tailor endpoints and data delivery to your unique business needs.

Instagram Scraping Features

Scrape user-generated content and post data from Instagram to understand what is resonating with audiences in your niche.

  • Instagram Posts Scraper Api
  • Instagram Media Data Extractor
  • Instagram Post Feed Api
  • Instagram Caption Scraper
  • Instagram Like Count Api
  • Instagram User Content History Api
  • Instagram Post Url Extractor
  • Instagram Bulk Post Download Api

Starting crawling Instagram now!

deco-icon

Get Your API Key in Minutes

Create a free account (no credit card required) and receive an API token instantly to test endpoints, pull live data, and rapidly prototype integrations. Upgrade as your needs grow.

Get started free
deco-icon

Developer Support

Need help integrating or customizing data for your workflows? Our developer success team offers onboarding, guidance, and enterprise support to get your project production-ready.

Contact us

Frequently Asked Questions

A Instagram data scraping API allows you to programmatically collect and analyze public data from Instagram and other platforms. This helps businesses, researchers, and marketers gain insights, monitor trends, and automate data collection for various use cases.

We only collect publicly available data, nothing behind a login wall or marked as private. We're GDPR-compliant and follow applicable data protection laws. That said, you're responsible for how you use the data on your end.

Yes, though some basic comfort with HTTP requests helps. We have copy-paste code snippets in Python, JavaScript, and cURL, plus a dashboard where you can test endpoints without writing any code. Most non-technical users get up and running within an afternoon.

You can fetch different type of public data from Instagram, including user profiles, posts, videos, comments, hashtags, followers, and engagement statistics.

Our platform delivers real-time Instagram data with high reliability and minimal downtime. Most requests are processed in under 5 seconds, ensuring you always have access to the latest public Instagram data for your needs.