Instagram Data in Claude Code: Install the Skill, or Build an MCP Server
Give Claude Code live Instagram data in two commands. What a skill actually is, when an MCP server is worth the extra work instead, and the plugin that wires the whole API up for you.
- /v1/profile/reels
- /v1/post/comments
- /v1/influencers/search
A language model is good at deciding what to look up and incapable of looking it up. Claude Code can already run your code, so the missing half is knowing which endpoint answers which question - and that is exactly what a skill is: a folder with a Markdown file in it that Claude reads when the task calls for it. One is published for this API, so the short version is two commands.
The two-command version
claude plugin marketplace add abdel-ml/hammadi-plugins
claude plugin install instagram-scraper@hammadiSet RAPIDAPI_KEY in your environment and ask for what you want in English - "pull nasa's last 50 reels and rank them by views", "export every comment on this post to CSV", "find skincare nano-influencers in the US". Claude writes and runs the code.
What a skill actually is
A directory containing SKILL.md: YAML frontmatter with a name and a description, then Markdown instructions. The description is always in context so Claude knows when the skill is relevant; the body is only loaded when it fires. That keeps the standing cost tiny - this one is about 150 tokens idle and 3k when it runs. Drop a folder in ~/.claude/skills/ and you have a skill; there is no build step, no server and no protocol.
What goes in it matters more than the endpoint list
An endpoint table is the easy half. The half that decides whether Claude gives someone a useful answer is the constraints: that a follower list caps around 50 for anyone who isn't the account owner, that likers cap around 100, that media URLs are signed and expire, that private accounts are unreadable. Without those, the model confidently promises a complete follower export and then quietly returns 48 rows. Write the limits down, and tell it to report a short result honestly.
Verify the skill against the running API, not against memory
Skills are prose, so nothing type-checks them. Every call in the published skill was run against the live API before shipping, which caught two things a careful write-up still got wrong: four endpoints are POST rather than GET (parameters still in the query string), and /v1/influencers/search returns results, not rows - a KeyError on the very first run. Generate your endpoint list from /openapi.json and run each snippet once.
When you want an MCP server instead
A skill teaches Claude to call your API with code it writes. An MCP server exposes the endpoints as tools Claude calls directly - no intermediate script, arguments validated against a schema, and results come back structured. That is a better experience, and it is a service you now operate: a process to host, auth to broker, versions to keep compatible, and an outage that breaks every user at once.
- Skill - zero infrastructure, works offline, the user brings their own key. Start here.
- Plugin - the same skill, versioned and installable in one command. This is what the two commands above install.
- MCP server - worth it when the calls are frequent enough that writing a script each time is the bottleneck, or when you want to broker auth so users never hold a key.
Rolling your own for a private API
If your API isn't public, skip the marketplace: put .claude/skills/<name>/SKILL.md in the repo and it works for everyone who checks it out, versioned with the code it describes. A marketplace is only needed to distribute outside one repository - it is a Git repo with .claude-plugin/marketplace.json listing your plugins, and claude plugin marketplace add <owner>/<repo> is how anyone installs from it.
Full example (Python)
# What the skill does for you, if you'd rather write it yourself.
# Save as .claude/skills/instagram/SKILL.md in your repo:
#
# ---
# name: instagram
# description: Read public Instagram data - a profile's posts or reels with
# view counts, comments on a post, followers, and creator search. Use when
# the user asks to pull, export or analyse anything on Instagram.
# ---
#
# ...then the endpoint table, the limits, and recipes like the one below.
import os
import requests
HOST = "YOUR-API-HOST.p.rapidapi.com"
HEADERS = {"x-rapidapi-key": os.environ["RAPIDAPI_KEY"], "x-rapidapi-host": HOST}
BASE = f"https://{HOST}"
# Live page loads, so give them room.
reels = requests.get(
f"{BASE}/v1/profile/reels",
params={"channel_url": "nasa", "count": 50},
headers=HEADERS,
timeout=330,
).json()
for r in sorted(reels["posts"], key=lambda r: r["view_count"] or 0, reverse=True)[:10]:
print(f'{r["view_count"] or 0:>12,} views {r["url"]}')
# The part a skill has to spell out, or the model over-promises:
meta = reels["meta"]
if meta.get("exhausted"):
print(meta.get("notice") or "That is everything the account has.")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 give Claude Code access to Instagram data?
Install the skill: claude plugin marketplace add abdel-ml/hammadi-plugins then claude plugin install instagram-scraper@hammadi. Set RAPIDAPI_KEY and ask in plain English - Claude writes and runs the request itself.
Can ChatGPT or Claude read Instagram on their own?
No. Neither can log in to Instagram or browse it for you. They can call an API that does, which is what this skill sets up.
What is the difference between a skill, a plugin and an MCP server?
A skill is instructions Claude reads when they're relevant. A plugin is one or more skills packaged so they install with a command. An MCP server is a running service that exposes your endpoints as tools Claude calls directly. Skill is the cheapest to ship and needs no infrastructure; MCP gives the best experience and is a service you have to operate.
Do I need an MCP server to use an API from Claude Code?
No. Claude Code can already run code, so a skill that documents your endpoints is enough for most APIs. MCP earns its keep when calls are frequent enough that writing a script each time is the bottleneck, or when you want to handle auth so users never hold a key.
Does the plugin cost anything?
The plugin is free and open source. It calls the Instagram Scraper API, which needs a RapidAPI key - there's a free tier. For a one-off lookup you don't need a key at all; the free browser tools do the same thing.
How much context does a skill use?
Only its description sits in context permanently - around 150 tokens for this one. The body (about 3k) loads only when the skill actually fires, so an installed skill you aren't using costs almost nothing.