Skip to main content
skill CX Codex

scraping-instagram-profile-data — Claude Code skill for profile data

Collect Instagram profile stats and recent post metrics through an Apify scraper. Use it to check a set of accounts or export profile details.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-profile-data -a claude-code
Open on GitHub

What scraping-instagram-profile-data does

The skill sends usernames to Apify’s apidojo~instagram-scraper and returns profile fields such as follower and following counts, post count, biography, verification status, and business-account details. To collect post-level engagement metrics, set includeRecentPosts: true; profile statistics alone do not include them.

Set the APIFY_TOKEN environment variable before running the scraper. The workflow can use scripts/run_actor.js, Apify MCP, or the REST API. The script can wait for the run to finish and save results as CSV or JSON. Private accounts return profile stats but no posts, so their post data will be missing.

What it helps with

  • collect stats for a list of Instagram accounts
  • export profile bios and follower counts to CSV
  • fetch metrics for recent Instagram posts
  • flag private or missing accounts

Example prompts for the agent

  • Collect profile stats for these Instagram accounts and save the results as CSV.
  • Check the bios and follower counts for this list of Instagram profiles.
  • Include recent post metrics for these accounts.

How to install scraping-instagram-profile-data

1Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-profile-data -a claude-code

2Manually: put the files in place

~/.claude/skills/scraping-instagram-profile-data/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scraping-instagram-profile-data/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about scraping-instagram-profile-data

How do I install scraping-instagram-profile-data in Claude Code?

Run npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-profile-data -a claude-code. The skill file is at ~/.claude/skills/scraping-instagram-profile-data/SKILL.md.

What does scraping-instagram-profile-data do?

It gathers Instagram profile statistics through an Apify scraper and can include metrics for recent posts. Results can be shown in chat or saved as CSV or JSON.

What is required to run the scraper?

Set the APIFY_TOKEN environment variable. Enable includeRecentPosts: true for post metrics; private accounts return no posts.

Source text

SKILL.md · Apache-2.0
---
name: scraping-instagram-profile-data
description: >
  Scrapes Instagram profile statistics and recent posts for any list of accounts using
  apidojo's Instagram scraper on Apify. Triggers when the user asks to: get Instagram
  profile data for an account, fetch follower count and post count for Instagram users,
  scrape Instagram bio and stats in bulk, export Instagram account metadata, check
  profile information for a list of Instagram handles, or get engagement data from
  Instagram profiles. Returns username, follower count, following count, post count,
  bio, and recent post metrics.
  Ideal for influencer vetting, brand research, and list enrichment.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/instagram-scraper
---

# Scraping Instagram Profile Data

Bulk profile export for any set of Instagram usernames. Returns account-level stats and optional recent post data.

## Prerequisites

- `APIFY_TOKEN` environment variable set
- Optional: Apify MCP server installed

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | ✅ | `[]` | Instagram URLs — profiles, hashtags, locations, audio pages, reels |
| `until` | string | Optional | — | Scrape posts until this date (YYYY-MM-DD) |
| `maxItems` | number | Optional | Unlimited | Maximum posts to return |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## Workflow

```
Progress:
- [ ] Step 1: Normalize username list
- [ ] Step 2: Run instagram-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver profile dataset
```

### Step 2: Run the Actor


**Recommended — run_actor.js (handles waiting, output, and file saving automatically):**
```bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~instagram-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~instagram-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~instagram-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json
```
> `APIFY_TOKEN` must be set in environment or `.env` file.

**If Apify MCP is available:**
```
Tool: apify:run-actor
Actor: "apidojo~instagram-scraper"
Input:
{
  "usernames": ["handle1", "handle2"],
  "includeRecentPosts": false
}
```

**REST API fallback:**
```bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["handle1", "handle2"]}'
```

Save `id` as `RUN_ID`. Poll until `status = SUCCEEDED`:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'
```

Fetch results:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
```

### Step 3: Handle Edge Cases

- **Private accounts**: Returns profile stats but no posts — flag `isPrivate: true`.
- **Account not found**: Handle may be renamed or deactivated — note in output.
- **Business vs personal accounts**: Business accounts expose contact info; personal accounts do not.

## Output Format

```
# Instagram Profile Dataset
Accounts requested: N | Returned: N | Private: N | Not found: N

| Username | Followers | Following | Posts | Bio (truncated) | Business | Verified |
|----------|-----------|-----------|-------|-----------------|----------|----------|
| ...      | ...       | ...       | ...   | ...             | ...      | ...      |

Available fields: username, fullName, followersCount, followingCount, postsCount,
biography, isVerified, isBusinessAccount, businessCategory, externalUrl, profilePicUrl
```

## Troubleshooting

**Missing accounts:** Username changed or account deactivated since list was compiled.
**No engagement data:** Engagement is per-post; use `includeRecentPosts: true` for post-level data.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Similar skills

Everything for Marketing and content →

From the same set82

tracking-youtube-trending-topics-by-niche This skill finds current YouTube trends within a niche and reports video formats, themes, views, and engagement. Use it to shape video research and ideas. CX Codex +1 813installs finding-tiktok-creators-using-trending-sounds Pulls TikTok posts made to a given track and returns the accounts behind them. Useful when you need a creator list for a brand placement. CX Codex +1 813installs building-full-social-audit-for-brand Audits brand profiles across Twitter, Instagram, TikTok, and YouTube via Apify scrapers. Computes engagement metrics and an aggregate brand health score. CX Codex +1 813installs scraping-instagram-location-content Pulls public Instagram posts tagged at one place and returns post URLs, captions, handles, likes and dates. Useful when you want to see what visitors post about a venue. CX Codex +1 810installs discovering-brand-ambassadors-across-platforms Finds prospective brand ambassadors across Instagram, TikTok, and Twitter using Apify scrapers. Calculates combined reach and groups creators into tiers. CX Codex +1 804installs extracting-google-paa-questions-for-seo Pulls Google People Also Ask questions for SEO planning, then sorts them by intent and turns the findings into a usable content outline. CX Codex +1 804installs scraping-tweets-from-account This skill pulls tweets, replies and media from a public Twitter/X account through apidojo's tweet scraper on Apify. Handy when you need a dataset for someone else's profile. CX Codex +1 802installs analyzing-youtube-competitor-channel-strategy This skill examines a competitor’s YouTube strategy, video mix, publishing rhythm, and engagement. Use it when a channel benchmark needs data behind it. CX Codex +1 800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor