Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Instagram API

Skill by CraftOS-dev

Instagram API posts photos, stories, Reels, carousels and Threads posts using the official Meta Graph API. It is aimed at users who want to publish to Instagram or Threads through shell scripts.

  • Score 76
  • 429 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install Instagram API

Built from the published package, never by AI.

git clone --depth 1 https://github.com/CraftOS-dev/CraftBot /tmp/CraftBot && mkdir -p ~/.claude/skills && cp -r /tmp/CraftBot/skills/instagram-api ~/.claude/skills/instagram-api

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install Instagram API in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The Instagram API skill posts content to Instagram and Threads using the official Meta Graph API. It includes five shell scripts that cover feed posts, stories, Reels, carousels and Threads posts. The Graph API only accepts public URLs, so the skill uploads local media to Imgur to create temporary public links before publishing.

Setup requires a Meta developer app with the Instagram Graph API product, an access token, an Instagram Business Account ID and an Imgur Client ID. Threads posting needs a separate Threads token and user ID and is optional. The skill suits users who want to publish to Instagram or Threads from the command line. Failed API calls are logged under ~/logs/sns/.

Written from the project's SKILL.md and checked against it.

What it can do

  • post-feed.shPublishes an image to the Instagram feed with a caption file.
  • post-story.shPublishes an image as an Instagram story.
  • post-reels.shPublishes a video as an Instagram Reel with a caption file.
  • post-carousel.shPublishes a multi-image carousel post with a caption file.
  • post-threads.shPublishes a text post to Threads, with an optional image URL.

What you need

  • Meta developer app with the Instagram Graph API product
  • Instagram Business Account ID
  • Access token with instagram_basic and instagram_content_publish permissions
  • Imgur API Client ID
  • Threads access token and user ID (optional, for Threads posts)

Try asking

  • Post ./photo.jpg to my Instagram feed with the caption in ./caption.txt
  • Share ./story.jpg as an Instagram story
  • Publish ./reel.mp4 as a Reel with the caption in ./caption.txt

Good to know

  • Instagram only accepts public URLs, so local files are uploaded to Imgur first.
  • Long-lived access tokens are valid for 60 days.
  • Reel video processing can take several minutes.
  • Failed API calls are logged under ~/logs/sns/.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/instagram-api/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md4 KB
  • _meta.json635 B
  • scripts/post-carousel.sh6 KB
  • scripts/post-feed.sh3 KB
  • scripts/post-reels.sh6 KB
Show all 7 files
  • scripts/post-story.sh2 KB
  • scripts/post-threads.sh4 KB

Alternatives to Instagram API

All alternatives →
video-shortformnexu-io
94

Generates 3 to 10 second short-form video clips for product reveals, motion teasers and ambient loops. It defaults to Seedance 2 and also works with Kling 3 and 4, Veo 3 and Sora 2, saving one MP4 to the project folder.

AAA Skill 110k
seo-plansickn33
94

Builds a strategic SEO plan for new or existing websites, covering competitors, architecture, content, technical setup and a 12-month roadmap. It is aimed at people who need an SEO strategy rather than a one-time audit.

AAA Skill 50k
linkedin-profilealirezarezvani
94

Audits and rewrites a LinkedIn profile for people who want their headline, About section and other parts improved. It scores the headline, audits the whole profile from 0 to 100 and drafts an About section that works above the fold.

AAA Skill 31k
linkedin-strategyalirezarezvani
94

Builds a LinkedIn plan covering content pillars, positioning, posting cadence and whether to start a newsletter. Aimed at people pursuing a career change, consulting, thought leadership or similar goals on LinkedIn.

AAA Skill 31k
landing-pageMengTo
94

Guides an AI assistant to design or rewrite a single-offer landing page for SaaS, apps and services. It covers structure, layout, copywriting, conversion tactics, and SEO/AEO.

AAA Skill 8.5k
linkedin-analyticsalirezarezvani
94

Analyzes your own exported LinkedIn post data to show which posts worked, test whether a pattern is real, and plan posting experiments. Built for people who want to understand their own LinkedIn numbers. It refuses to draw conclusions from fewer than 10 posts.

AAA Skill 31k

Compare with video-shortform, seo-plan or linkedin-profile

Instagram API: common questions

Can it upload local files directly to Instagram?

No. The source says Instagram only accepts public URLs, so the skill creates temporary public links through Imgur.

How long does the Instagram access token last?

The source says a long-lived token exchanged from the Graph API Explorer is valid for 60 days.

Where can I find logs if a post fails?

The source says API call failures are logged in the ~/logs/sns/ folder.

How do I install Instagram API?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is Instagram API free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Instagram API safe to use?

It scores 76 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Instagram API?

Similar skills: video-shortform, seo-plan, linkedin-profile, linkedin-strategy.

Instagram API Install

Add to stack

Loading.