Search Instagram, look up profiles and fetch posts, with every image and video parsed to text by AI. Use it over REST or through the hosted Instagram MCP server. Same key, same credits.
Base URL: https://instapi.co. Agents can read the
machine version of this page at
/api/help (JSON).
# 1. Sign up (returns a JWT and 10 free credits)
curl -X POST https://instapi.co/api/signup \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "..."}'
# 2. Create an API key with the JWT
curl -X POST https://instapi.co/api/keys \
-H "Authorization: Bearer jwt_instapi_..." \
-H "Content-Type: application/json" \
-d '{"name": "my-agent"}'
# 3. Query Instagram with the key
curl "https://instapi.co/api/instagram/search?q=nasa" \
-H "Authorization: Bearer sk_instapi_..."
Prefer a UI? Get an API key in the dashboard.
Every authenticated call uses an Authorization: Bearer header.
jwt_instapi_...: account token from signup or login. Used for account, key and billing endpoints.sk_instapi_...: API key. Used for Instagram data endpoints and the MCP server.GET /api/instagram/search?q={query}
Search Instagram users, hashtags and places by keyword. Costs 1 credit.
curl "https://instapi.co/api/instagram/search?q=nasa" \
-H "Authorization: Bearer sk_instapi_..."
{
"meta": { "credits_remaining": 9 },
"users": [
{
"username": "nasa",
"fullName": "NASA",
"profilePicUrl": "https://...",
"isPrivate": false,
"isVerified": true,
"userId": "..."
}
],
"hashtags": [{ "name": "nasa", "mediaCount": 1234567, "id": "..." }],
"places": [{ "title": "...", "subtitle": "...", "location": { ... } }]
}
GET /api/instagram/users/{username}
Public profile for an Instagram account: bio, links, follower,
following and post counts, verified, private and business flags,
category and public contact info. Works for private accounts too.
username can be a bare name, an @handle or a
profile URL. Costs 1 credit, not charged if the user doesn't exist.
curl "https://instapi.co/api/instagram/users/nasa" \
-H "Authorization: Bearer sk_instapi_..."
| Field | Description |
|---|---|
username, fullName, id | Identity |
biography | Bio text |
externalUrl, bioLinks[] | Links in bio (title, url) |
followerCount, followingCount, postCount | Counts |
isVerified, isPrivate, isBusiness | Flags |
accountType | personal, business or creator |
category | Business category, if set |
contact | Public email, phone, address, if shown |
profilePicUrl | Profile picture |
GET /api/instagram/users/{username}/posts?count={n}
Recent posts for a public Instagram account, newest first. Each image
and video is described in text by AI (parsedContent), so
an agent can read what's in a post without vision. Costs 1 credit.
count: 1 to 30, default 12. Larger values are capped at 30.curl "https://instapi.co/api/instagram/users/nasa/posts?count=3" \
-H "Authorization: Bearer sk_instapi_..."
| Field | Description |
|---|---|
shortcode | Instagram post code |
url | Post URL on instagram.com |
type | image, video or carousel |
takenAt | Post time, ISO 8601 |
pinned | Pinned to the profile grid |
likeCount | Likes |
commentCount | Comments |
caption | Caption text |
media[] | type, imageUrl, videoUrl, width, height, parsedContent (AI text description) |
The same data is available as MCP tools at
https://instapi.co/mcp (streamable HTTP):
get_started (free), instagram_search,
instagram_user_profile and
instagram_user_posts (1 credit each). Setup for Claude,
Cursor, VS Code and Codex is on the
Instagram MCP page.
| Endpoint | Auth | Description |
|---|---|---|
GET /api/start | none | Service info and onboarding steps |
POST /api/signup | none | Create an account: {email, password} (min 8 chars). Returns a JWT and 10 free credits. |
POST /api/login | none | Returns a JWT and credit balance |
GET /api/status | JWT | Credits, API keys, purchase history |
GET /api/keys | JWT | List active API keys |
POST /api/keys | JWT | Create a key: {name}. Shown once. |
DELETE /api/keys/:id | JWT | Revoke a key |
POST /api/checkout | JWT | Stripe payment link: {amountCents} (min 100, steps of 100) |
Every response has a meta object. Successful data calls
include meta.credits_remaining. Many responses include
meta.next_steps, a list of the next calls to make, so an
agent can work through signup, keys and queries on its own. Errors
include meta.error and a machine-readable
meta.reason. Failed calls are refunded.
| Status | Meaning |
|---|---|
400 | Missing or invalid parameter, e.g. invalid_username |
401 | Missing or invalid token or API key |
402 | Out of credits. meta.next_steps points to checkout. |
404 | user_not_found, or private_account for posts on a private account. Not charged. |
429 | Rate limited. Retry later. |
502 | upstream_error: Instagram didn't answer. Refunded, safe to retry. |