agentleFS
nikhonitnikhonit/social-media-api-skills/skills/instagram-api/SKILL.md

instagram-api

Skill3 starsChanged 3 months agoMIT-0View on GitHub

Instagram data toolkit via ScraperSocial — reel transcripts, AI summaries, profile and post stats, comments, hashtag and location analytics, keyword search.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    You need to post, comment or follow: Read-only.

    line 53
  2. Very specific:

    Every script also accepts --limit, --cursor, --fields, --format and --fresh.

    line 96
  3. Distinctive:

    Every response uses the same envelope:

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 API skill

Read public Instagram data as clean JSON. This Instagram API skill transcribes reels, summarises them, returns profile and post statistics, walks comment threads, and analyses hashtags and locations — including post counts, top posts and reels for a tag or place. It also covers keyword, profile and reel search.

Instagram is one of the harder platforms to read programmatically. These endpoints return structured JSON without a logged-in session or a browser farm.

This skill wraps 23 live Instagram endpoints from the ScraperSocial API. Public data only, returned as clean JSON.

When to use this skill

  • A user pastes a reel URL and asks what is said in it, or wants it summarised.
  • You are researching a creator or brand account: followers, posting pattern, engagement.
  • You need comments on a post for sentiment or FAQ mining.
  • You are tracking a hashtag or a location and want its stats and top posts.

Do not use this skill when

  • Watch the price on media endpoints. get_transcript.js and get_download.js cost 40 credits, and --section=summary costs 42 — the most expensive calls in the API. Never fire them speculatively; confirm the user actually wants the video's content first.
  • An Instagram link appears in passing with no question attached.
  • You need private accounts, stories from private users, or DMs. Public data only.
  • You run the account yourself. Meta's Graph API gives owners richer insights for free.
  • You need to post, comment or follow. Read-only.

Setup

export SCRAPERSOCIAL_KEY=sk_live_...   # https://scrapersocial.com/app/keys

Signing up at scrapersocial.com/signup includes 100 free credits, no card required.

Permissions and scope

These scripts do exactly three things and nothing else: read one environment variable (SCRAPERSOCIAL_KEY), send HTTPS requests to https://api.scrapersocial.com (the host is a constant in the code, not configurable), and print JSON. They run as node scripts/<name>.js with no other shell use, no file writes and no persistence. call_endpoint.js accepts only the 23 documented /v1/instagram/ paths in the table below and refuses anything else before a request is made.

Scripts

ScriptWhat it doesInputCredits
get_profile.js --section=aboutGet Instagram profile about.handle3 credits
get_profile.js --section=fullGet Instagram profile full.handle3 credits
get_profile.js --section=searchList Instagram profile search.query2 credits per profile
get_profile.js --section=similarGet Instagram similar.handle2 credits
get_profile.js --section=taggedList Instagram tagged.handle2 credits per post
get_channel.js --section=postsLatest posts from an Instagram account with per-post metrics.handle2 credits per post
get_channel.js --section=reelsLatest reels from an Instagram account with per-reel metrics.handle3 credits per reel
get_channel.js --section=statsFollower counts, bio and profile metadata for an Instagram account.handle3 credits
get_hashtag.js --section=analyticsGet Instagram hashtag analytics.query3 credits
get_hashtag.js --section=postsList Instagram hashtag posts.query2 credits per post
get_hashtag.js --section=reelsList Instagram hashtag reels.query2 credits per reel
get_hashtag.js --section=searchList Instagram hashtag search.query2 credits per hashtag
get_hashtag.js --section=statsGet Instagram hashtag stats.query2 credits
get_location.js --section=postsList Instagram location posts.query2 credits per post
get_location.js --section=searchList Instagram location search.query2 credits per place
get_location.js --section=statsGet Instagram location stats.query2 credits
search.js --section=keyword-searchList Instagram keyword search.query2 credits per result
search.js --section=reels-searchKeyword search over Instagram reels.query3 credits per result
get_comments.jsPaginated comments on an Instagram post; charged per comment returned.url3 credits per comment
get_transcript.jsFull transcript of an Instagram reel with timestamped segments.url40 credits
get_transcript.js --section=summaryShort AI summary of an Instagram reel, built on its transcript.url42 credits
get_download.jsResolves a downloadable media URL for an Instagram reel (URL expires within 1h).url40 credits
get_stats.jsLikes, comments and view counts for an Instagram post or reel.url1 credit
call_endpoint.jsCall any /v1/instagram/ endpoint directlypath + paramsvaries

Every script also accepts --limit, --cursor, --fields, --format and --fresh. --limit is clamped to 50: above that the API returns an async job instead of data.

Example

node skills/instagram-api/scripts/get_hashtag.js latteart --section=posts

Every response uses the same envelope:

{ "data": {}, "meta": { "count": 20, "next_cursor": "..." }, "request_id": "a18e4ef88ad4b00b" }

meta appears on paginated endpoints only. Keep request_id — support traces calls with it.

Endpoints

EndpointInputReturnsCreditsPaginated
/v1/instagram/channel-postshandlepost2 credits per postyes
/v1/instagram/channel-reelshandlereel3 credits per reelyes
/v1/instagram/channel-statshandleprofile3 creditsno
/v1/instagram/commentsurlcomment3 credits per commentyes
/v1/instagram/downloadurlvideo40 creditsno
/v1/instagram/hashtag-analyticsqueryhashtag3 creditsno
/v1/instagram/hashtag-postsquerypost2 credits per postyes
/v1/instagram/hashtag-reelsqueryreel2 credits per reelyes
/v1/instagram/hashtag-searchqueryhashtag2 credits per hashtagyes
/v1/instagram/hashtag-statsqueryhashtag2 creditsno
/v1/instagram/keyword-searchqueryresult2 credits per resultyes
/v1/instagram/location-postsquerypost2 credits per postyes
/v1/instagram/location-searchqueryplace2 credits per placeyes
/v1/instagram/location-statsqueryplace2 creditsno
/v1/instagram/profile-abouthandleprofile3 creditsno
/v1/instagram/profile-fullhandleprofile3 creditsno
/v1/instagram/profile-searchqueryprofile2 credits per profileyes
/v1/instagram/reels-searchqueryresult3 credits per resultyes
/v1/instagram/similarhandleprofile2 creditsno
/v1/instagram/statsurlpost1 creditno
/v1/instagram/summaryurlreel42 creditsno
/v1/instagram/taggedhandlepost2 credits per postyes
/v1/instagram/transcripturlreel40 creditsno

Costs shown per item for paginated endpoints, per call otherwise. Failed calls are not charged.

FAQ

How do I transcribe an Instagram reel?

get_transcript.js with the reel URL, 40 credits. --section=summary returns an AI summary instead, for 42. Both read the video directly. These are the priciest calls here — check before spending.

How do I get an Instagram profile as JSON?

get_profile.js --section=full returns the full profile, --section=about a lighter version. This script has no default section, so --section is required.

Can I get hashtag statistics?

Yes. get_hashtag.js --section=stats returns counts, --section=analytics a richer breakdown, and --section=posts or --section=reels the content ranked under the tag.

Why does a post return 404?

It is private, deleted, or from an account that blocks public reads. The API returns not_found rather than guessing, and failed calls are not charged.

Is this an official Instagram API?

No. ScraperSocial is independent and not affiliated with Meta. It returns publicly available data only.

Links

Disclaimer

ScraperSocial is an independent product and is not affiliated with, endorsed by, or sponsored by any platform named in this repository. All product names, logos and brands are property of their respective owners. These skills return only publicly available data.

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.