Instagram API

Social / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

The Instagram Graph API allows you to access Instagram account data, media, comments, and insights for business and creator accounts. It uses OAuth 2.0 and requires users to grant permission through Facebook Login before you can access their Instagram data. Note that the legacy Instagram API is deprecated — use the Graph API via Facebook for Developers.

💡

Beginner Tip

You must connect an Instagram Business or Creator account to a Facebook Page to use the Graph API — personal accounts are not supported. Start in sandbox mode with your own account to test without going through app review.

Available Data

stock price and symbol
open/close/high/low values
trading volume
market cap
historical price data

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Instagram",
    "description": "Instagram Login, Share on Instagram, Social Plugins and more",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

id Unique identifier for the media object
caption The caption text written for the post
media_type Type of media: IMAGE, VIDEO, or CAROUSEL_ALBUM
permalink Permanent URL to the post on Instagram
timestamp ISO 8601 date and time when the media was posted
like_count Number of likes on the media; requires instagram_manage_insights permission

Implementation Example

const url = "https://www.instagram.com/developer/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 OAuthException: Invalid OAuth access token Access token is expired or was generated for a different app
Refresh your long-lived access token or re-authenticate; Instagram user tokens expire after 60 days of inactivity
403 Insufficient Permission Missing required OAuth scopes for the endpoint you are calling
Re-authorize the user with the needed scopes such as instagram_basic and instagram_content_publish in your Facebook app settings
Empty media array even though account has posts The account is a personal account, not a Business or Creator account
Switch the Instagram account to Business or Creator in the Instagram app settings, then connect it to a Facebook Page

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Social
Difficulty Advanced
Verified: 2026-04-04

Similar APIs

View All →