Instagram Post Scraper API
Our Instagram post scraper takes a post URL or shortcode and returns the whole post as structured JSON: the caption, owner, timestamp, like and comment counts, post type, the media URLs, and the top comments, all from a single request with no login.
Use it for
Competitor and trend tracking
Campaign measurement
Content archives
Engagement audits
Quickstart
curl "https://api.instagramscraperapi.com/api/v1/instagram/post?url=https://www.instagram.com/p/C5xExample/&api_key=$API_KEY" import requests, os
BASE = "https://api.instagramscraperapi.com"
API_KEY = os.environ["API_KEY"]
# Pass a post/reel URL or a bare shortcode.
data = requests.get(
f"{BASE}/api/v1/instagram/post",
params={"url": "https://www.instagram.com/p/C5xExample/", "api_key": API_KEY},
timeout=30,
).json()
print(data["caption"])
print(data["like_count"], "likes |", data["comment_count"], "comments")
for c in data["comments"]:
print("-", c["username"], ":", c["text"]) Response
{
"shortcode": "C5xExample",
"media_id": "3312345678901234567",
"url": "https://www.instagram.com/p/C5xExample/",
"media_type": "image",
"is_video": false,
"caption": "Sunrise over the ridge.",
"owner_username": "space_explorer",
"owner_id": "1748234592",
"taken_at": "2026-03-31T14:20:05.000Z",
"like_count": 4821,
"comment_count": 63,
"image_urls": [
"https://scontent-lax7-1.cdninstagram.com/v/t51.2885-15/example.jpg"
],
"video_url": null,
"comments": [
{
"id": "17954321098765432",
"username": "trail_notes",
"text": "Incredible light.",
"likes": 12
}
],
"source": "instagram",
"data_source": "embedded"
} | Field | Type | Description |
|---|---|---|
shortcode | string | The post shortcode, parsed from the URL you passed. |
media_id | string | The numeric media id resolved for the post, used to enrich from the media API. |
media_type | string | image, carousel, or video. |
caption | string | The full caption text, or null when the post has none. |
owner_username | string | The handle of the account that published the post. |
like_count | integer | Likes at capture time, or null when Instagram hides the count. |
comment_count | integer | Total comment count on the post. |
image_urls | array | Full-resolution media URLs, every carousel frame in order. video_url carries the file for a reel or video post. |
comments | array | The top comments embedded on the post page. For a full thread with cursor pagination, use the comments endpoint. |
How it works
- Send a GET request with your target and API key.
- We route through residential proxies, handle anti-bot, and parse the response.
- You get validated JSON back, ready to use.
How it compares
| Our API | DIY (requests / headless) | Instagram Graph API | |
|---|---|---|---|
| Input by URL or shortcode | Yes, post or reel URL | Manual page fetch and parse | By owned media id only |
| Public posts | Any public post | Possible but parser breaks often | Only media you own or manage |
| Setup | API key only | Residential proxies, headless browser, parsers | Facebook app, linked Business account, app review |
| Caption and counts | Parsed from the post object | Buried in a hydrated blob you must locate | Available for your own media |
| Media URLs | Full-res, carousel frames included | You extract and race the CDN yourself | Scoped to your assets |
| Output | Validated JSON, stable schema | Raw HTML you parse yourself | JSON, scoped to your assets |
Pricing
| Plan | Price | Best for |
|---|---|---|
| Free | 1,000 requests | Testing and small jobs |
| Pro | $0.60 / 1k | Production workloads |
| Pay-as-you-go | $0.90 / 1k | Spiky or one-off volume |
Median response 2.6s. You only pay for successful requests.
FAQ
What is an Instagram post scraper?
An Instagram post scraper is a tool that reads a public post and returns its data in a structured format. Our endpoint takes a post URL or shortcode and returns the caption, owner, timestamp, like and comment counts, post type, media URLs, and the top comments as JSON from a single request, with no login or Facebook app.
How do I scrape an Instagram post without writing a parser?
Send one GET request to the instagram/post endpoint with the post URL (or a bare shortcode) and your API key. We route through residential IPs, handle anti-bot checks, retry on failure, and parse the post object, so you get clean JSON back without maintaining selectors against Instagram's changing markup.
Does the post endpoint return all comments?
It returns the comments embedded on the post page, which is the top slice of the thread rather than every comment. Instagram serves the full comment list through a separate authenticated API that pages with a cursor. To pull a long thread in full, use the dedicated comments endpoint, which resolves the media id and pages through the thread and reports honestly when Instagram gates it.
Can I get the images and video from a post?
Yes. image_urls returns the full-resolution photo for each frame of a carousel, and video_url carries the file for a reel or video post. The links are served from Instagram's CDN and expire, so download the files while they are fresh rather than storing the URLs for later.
Does Instagram have an official post API?
Only a limited one. The official Instagram Graph API reads media on accounts you own or manage through a connected Business or Creator account and is capped at 200 calls per hour. It does not let you pull an arbitrary public post by URL, which is exactly where a post scraper applies.
Is scraping Instagram posts legal?
Scraping publicly visible data is broadly permitted in many jurisdictions, and in Meta Platforms v. Bright Data (January 2024) a federal court held that Meta's terms do not bar logged-off scraping of public data. Captions and media can carry personal data and copyrighted work, though, so use post data only where you have a lawful basis, comply with GDPR and CCPA, and take your own legal advice.