agentleFS
Intropix-teamIntropix-team/instagram-scraper-skills/skills/instagram-scraper/SKILL.md

instagram-scraper

Skill0 starsChanged 23 days agoMITView on GitHub

Scrape Instagram without logging in: stories, posts, reels and carousels of public business, creator and brand accounts, or single posts from their links, with captions, likes, comments, view counts, dates, music, locations, collab co-authors, sponsor brands and the account's public business contacts, plus the image and video files. Use whenever the user wants Instagram data or downloads of any kind: scrape an Instagram profile, download stories or reels, export posts to JSON or CSV, monitor or audit a competitor, find brand deals, or build a lead list. Three Intropix scrapers on Apify; works on the free Apify plan.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep the results only as long as the user's purpose needs them (the terms suggest at most 30 days), and do not republish them as a dataset.

    line 19
  2. Distinctive:

    Use the cheapest scraper that has the fields the user needs.

    line 30
  3. Very specific:

    If one of these skills is installed and fits the job better, use it instead: save-instagram-stories, save-instagram-reels, …

    line 33
  4. Distinctive:

    Ask how many items if the user did not say.

    line 74
  5. Distinctive:

    Use the first path that is available.

    line 79
  6. Very specific:

    If the CLI says you are not logged in, ask the user to run apify login themselves (it opens a browser).

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Instagram scraper

Runs the Intropix Instagram scrapers on Apify and saves what they return. One skill for any Instagram job; it picks the right scraper, runs it, and saves the files.

Rules

  • Public business, creator and brand accounts only. If the user asks for a private person's account, say the scrapers' terms do not allow it and stop. Private accounts are never readable.
  • Tagged accounts, mentions and partners in the results can be private people: do not scrape them in turn or build profiles of them.
  • Keep the results only as long as the user's purpose needs them (the terms suggest at most 30 days), and do not republish them as a dataset.

1. Pick the scraper

The user wantsScraperPrice
Stories that are live now (they vanish after 24 hours)intropix/instagram-stories-scraper$2.50 per 1,000 stories
Posts, reels, carousels with captions, likes, comments, views, datesintropix/instagram-posts-reels-scraper$1.90 per 1,000 posts
Also music, shares, location, sponsor brand names, partner sizes, the account's public email, phone, address and websiteintropix/instagram-posts-reels-scraper-pro$3.90 per 1,000 posts

Use the cheapest scraper that has the fields the user needs. Every run also costs $0.005, plus $0.002 per account scanned; failed lookups are not charged.

If one of these skills is installed and fits the job better, use it instead: save-instagram-stories, save-instagram-reels, save-instagram-posts, download-competitor-instagram, track-instagram-brand-deals, get-instagram-business-contacts.

2. Build the input

Stories:

{"usernames": ["natgeo"], "maxResults": 10}

maxResults is the most story items to deliver (default 10).

Posts and reels (standard and PRO take the same input):

{"usernames": ["nike"], "maxPosts": 10}
FieldUse
usernamesAccount handles without @.
postUrlsInstead of or besides usernames: links like https://www.instagram.com/p/<code>/ or /reel/<code>/. Every valid link is delivered.
maxPostsHow many of the newest posts to read. Default 10. One shared total for the whole run.
maxPostsPerAccountInstead of maxPosts: up to this many of EACH account's newest posts. Use it whenever there are several accounts.
sinceDate, untilDateOptional YYYY-MM-DD (UTC) bounds.
mediaTypeany (default), image or video. With a filter, maxPosts counts posts read, not posts delivered, and every match among them is delivered and billed: for N reels set maxPosts to about 1.5 times N (2 for one reel), and save everything delivered.
includeOffGridReelstrue also returns reels shown only on the reels tab.
enrichPartnersPRO only: true adds follower count, category and verification for each co-author and sponsor brand ($0.005 per profile, paid Apify plans only).

For the public contact details of accounts, run PRO with maxPostsPerAccount: 1; the owner_* fields of each post carry them.

Several accounts: for posts, use maxPostsPerAccount; maxPosts alone is one shared total spent in input order, so the first account can use it all. A run holds at most 1,000 posts on a paid plan (10 on the free plan), filled account by account. The stories scraper has no per-account limit: for stories, start one run per account.

Ask how many items if the user did not say; otherwise use 10. A free Apify plan delivers at most 10 results per run and 40 per day.

3. Run the scraper

Use the first path that is available.

A. Apify tools are connected (tools named call-actor and get-dataset-items, from the Apify connector or https://mcp.apify.com): call call-actor with the scraper id and the input. If the run is not finished when the call returns, poll get-actor-run until it is. Then read the results with get-dataset-items using the run's dataset id, and set limit to the run's item count (the default is 20). With a shell, write the returned items, as one JSON array, to items.json for step 4.

B. A shell with the Apify CLI (apify --version prints 1.5 or later): write the input to input.json, then run

apify actors call <scraper id> --input-file input.json --json 2>/dev/null

Take storage.defaultDatasetId and storage.defaultKeyValueStoreId from the printed JSON (do not add --silent: together with --json it prints nothing). Then save the results:

apify datasets get-items <defaultDatasetId> --format json > items.json

If the CLI says you are not logged in, ask the user to run apify login themselves (it opens a browser). Never ask the user to paste an API token into the conversation.

C. Neither is available: tell the user to either connect Apify (https://mcp.apify.com) or install the CLI (npm install -g apify-cli, then apify login). An Apify account is free to create. Stop there.

4. Save the files

Skip this step when the user wants data only. Media links point at Instagram's CDN and expire within days, so download right after the run. With a shell and Python 3:

python3 ${CLAUDE_SKILL_DIR}/scripts/save_media.py items.json instagram --covers

(${CLAUDE_SKILL_DIR} is this skill's folder; use its real path if the variable is not set.) This writes instagram/<username>/<date>_<id>[_<slide>].jpg|mp4, reel covers beside the videos, and appends each item once to instagram/<username>/items.jsonl, so repeated runs only add what is new.

Without Python, download each media_url (stories) or media[].media_url (posts) with curl -L -o. Without a shell, show the links and say they expire.

For a spreadsheet, write a CSV from items.json with the columns the user asked for.

5. Report

Say what was saved and where, then answer the user's question from the data. Null means "not available", never zero.

Fewer results than expected or none: stories return nothing when the account posted none in the last 24 hours. Otherwise read the run's OUTPUT record (apify key-value-stores get-value <defaultKeyValueStoreId> OUTPUT, or get-key-value-store-record with key OUTPUT): not_found (wrong handle), user_daily_exhausted (free plan daily limit reached), temporarily_unavailable or upstream_outage (retry later).

Scraper pages:

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.