Instagram Scraper API guides

Export All Posts from an Instagram Profile to CSV: Captions, Likes, Views & Dates

Download up to 1,000 posts and reels from any public Instagram account - captions, dates, like, comment and view counts, media URLs - into a CSV, then chart posting frequency and engagement over time.

Archiving a brand's feed, benchmarking a competitor's content calendar or building a dataset all need the whole grid, not the last dozen posts. /v1/profile/posts returns up to 1,000 posts and reels from a public profile in one request.

Try it free in your browser, no key needed →
Paste a URL, see the result as a table and export it. Come back here for the code when you want it automated.

Get your API key on RapidAPI

1. Fetch the grid

Pass the profile and a count from 1 to 1,000. Each post includes its URL, type (image, video or carousel), taken_at timestamp, caption, like, comment and view counts, and image/video URLs. include_profile=true adds the follower count and bio.

2. Save it as CSV

Flatten the fields you need into one row per post. Timestamps are Unix seconds - convert them to dates for spreadsheets.

3. Analyse the content calendar

Group by month to see posting frequency, compare average likes for reels, photos and carousels, and list the top posts. Pinned posts are flagged with is_pinned so they don't skew a timeline.

4. Get full-resolution media

For every slide of a carousel at full resolution, call /v1/post/media on the posts you need.

Full example (Python)

# Get an API key: https://rapidapi.com/goodstobkal-goodstobkal-default/api/instagram-scraper57
HOST = "YOUR-API-HOST.p.rapidapi.com"
HEADERS = {"x-rapidapi-key": "YOUR_RAPIDAPI_KEY", "x-rapidapi-host": HOST}
BASE = f"https://{HOST}"

import csv
from collections import Counter, defaultdict
from datetime import datetime, timezone
import requests

data = requests.get(
    f"{BASE}/v1/profile/posts",
    params={"channel_url": "nasa", "count": 300},
    headers=HEADERS,
    timeout=330,
).json()
posts = data["posts"]

def day(ts):
    return datetime.fromtimestamp(ts, timezone.utc).strftime("%Y-%m-%d") if ts else ""

with open("posts.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.writer(f)
    writer.writerow(["date", "type", "likes", "comments", "views", "url", "caption"])
    for p in posts:
        writer.writerow([day(p["taken_at"]), p["type"], p["like_count"], p["comment_count"],
                         p["view_count"], p["url"], (p["caption"] or "").replace("\n", " ")])

print(len(posts), "posts saved to posts.csv")
per_month = Counter(day(p["taken_at"])[:7] for p in posts if p["taken_at"])
print("posts per month:", sorted(per_month.items())[-6:])

likes = defaultdict(list)
for p in posts:
    likes[p["type"]].append(p["like_count"] or 0)
print("average likes by type:", {t: round(sum(v) / len(v)) for t, v in likes.items()})

Replace YOUR-API-HOST and YOUR_RAPIDAPI_KEY with the values from the listing's Endpoints tab on RapidAPI.

Frequently asked questions

How do I download all posts from an Instagram account?

Call /v1/profile/posts with the username and a count of up to 1,000, then save the JSON or write it to CSV as shown below.

Does it include reels?

Yes - the main grid includes reels alongside photos and carousels. Use /v1/profile/reels for the Reels tab alone.

Can I export posts from a private account?

No. Only public profiles are supported; a private account returns a private_account error.

More guides