Network API

Instagram API for Posting, Scheduling, and Analytics

Ayrshare's Instagram API lets developers publish photos, carousels, reels, and stories to Instagram Business and Creator accounts via a single REST endpoint. It supports scheduled posts, collaborators, comments, direct messages, boosted ads, and analytics across 14+ social networks through one integration.

Your users link their own Instagram Business or Creator accounts through an OAuth flow inside your product, on Ayrshare's approved Meta app. You don't need your own App Review or permission requests.

One integration, 14+ networks, 30M+ API calls a day.

X
Facebook
Instagram
TikTok
Bluesky
YouTube
LinkedIn
Pinterest
Telegram
Reddit
Threads
Snapchat
Google Business
WhatsApp

>99.99%

API uptime

30M+

API calls per day

14+

Social media networks

AI-Native

Native MCP server for any AI agent

>99.99%

API uptime

30M+

API calls per day

14+

Social media networks

AI-Native

Native MCP server for any AI agent

Before you build

What Do You Need to Use the Instagram API?

Meta's Instagram API is free to call, but it only publishes to professional accounts, and your app has to clear Meta's review first. You choose between two login flows with different permissions: Instagram Login (instagram_business_basic and instagram_business_content_publish) or Facebook Login (instagram_basic, instagram_content_publish, and pages_read_engagement, plus a linked Facebook Page). Each flow gives you different features. With Ayrshare, you skip App Review and both login flows: your users link their accounts and you post on the same day.

Access

A Meta developer app, App Review for the publishing permissions, and Business Verification when Meta asks for it. Your app then switches to Live mode to serve real users.

Cost

Meta charges no usage fee. The cost is the review, token refresh logic, and keeping up with Meta's API versions.

Account types

Instagram Business and Creator accounts. Personal accounts can't publish through Meta's API.

Key limits

Meta caps API-published posts per account in a rolling 24 hours, and its crawler must be able to fetch every media URL you send.

Linking two Instagram accounts through Ayrshare's OAuth connect screen, with a personal account that can't publish, next to the steps of going direct: App Review, Business Verification, two login flows, and token refresh logic

Post and Schedule to Instagram in Your Language

Each sample publishes a photo with hashtags now, then schedules a reel for later. Same endpoint, same JSON, in Node.js, Python, PHP, Java, Go, Ruby, C#, or plain cURL. Add a Profile-Key header to post for one of your users.

# 1. Publish now: a photo post with hashtagscurl -X POST https://api.ayrshare.com/api/post \  -H "Authorization: Bearer $AYRSHARE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "post": "New analytics dashboard, live today #analytics #saas",    "platforms": ["instagram"],    "mediaUrls": ["https://example.com/dashboard.jpg"]  }'
# 2. Schedule for later (ISO 8601, UTC)curl -X POST https://api.ayrshare.com/api/post \  -H "Authorization: Bearer $AYRSHARE_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "post": "Friday product drop #newrelease",    "platforms": ["instagram"],    "mediaUrls": ["https://example.com/drop.mp4"],    "instagramOptions": {      "shareReelsFeed": true    },    "scheduleDate": "2026-11-06T17:00:00Z"  }'
Full Post API Reference
The fine print

Instagram API Limits: Post Types, Media, and Characters

Meta's rules in one place. The full list lives in the Instagram media guidelines and the Instagram publishing options.

Post types

4post types: photo, carousel, reel, story

Single photos, carousels of up to 10 images and videos, reels, and stories. Hashtags are clickable in the caption, links are not. Media can go out with an empty caption.

Accounts

2login flows: Instagram or Facebook

Instagram Business and Creator accounts, linked directly with Instagram Login or through a connected Facebook Page. Stories publish from Business accounts only.

Images

8 MBper image

JPG, PNG, or GIF, 320 to 1440 px wide, with an aspect ratio between 4:5 and 1.91:1 or a 9:16 portrait. WebP, HEIC, HEIF, and AVIF are converted to JPEG before posting.

Video

15 minmax reel length

Every video post publishes as a reel. MP4 or MOV, 3 seconds to 15 minutes, up to 1 GB, 23 to 60 FPS. 9:16 at 1080 x 1920 px is recommended.

Characters

2,200caption characters

Up to 5 hashtags and 3 @mentions per post. Alt text runs to 1,000 characters per image, not on reels or stories.

Stories

60 secmax video story

One JPEG or one video of 3 to 60 seconds, up to 100 MB. Stories ignore caption text and expire after 24 hours.

Carousels

2 to 10images or videos per carousel

Add the image or video URLs to mediaUrls and Ayrshare builds the carousel. Location and user tags don't apply inside carousels.

Scheduling and limits

50posts per account per 24 hours

Pass a scheduleDate to publish later. The 50-post cap is a rolling 24 hours, and each response reports usedQuota. Instagram doesn't allow deleting posts through the API.

Beyond the basic post

Publish reels with a cover frame

A video post to Instagram is a reel. Pick a cover frame by offset (thumbNailOffset, in milliseconds) or supply your own cover image, let it also show in the Feed, and add Instagram's AI info label when the media is generated. Attaching a licensed track needs the account linked through Facebook Login.

Skip the setup

Why Use Ayrshare Instead of the Instagram API Directly?

Ayrshare runs the Meta app and both login flows, so your product sends one request and gets back the Instagram post ID, URL, and the account's remaining quota. Ayrshare converts WebP and HEIC images to JPEG, retries a blocked media fetch and re-hosts the file on its own CDN, and surfaces Meta's raw error text in the details field. When Meta changes the API, the fix ships on our side, not in your sprint.

For a step-by-step walkthrough, read Instagram Reels API: How to Post Videos to Reels Using a Social Media API.

See the Instagram Publishing Options
  1. Step 1

    One simple endpoint

    Just send a single POST request with your caption, media URL, and user Profile-Key. We keep the integration incredibly lean so your team can launch faster.

  2. Step 2

    We deal with Meta

    Login flows, image conversion, blocked media fetches, reel processing, token refresh. None of it reaches your code.

  3. Live

    Build for scale

    Instantly receive the live post URL, daily quotas, and the post ID you need to drive analytics and engagement.

After you publish

Beyond Posting: The Rest of the Instagram Lifecycle

The same Instagram connection that publishes also reads analytics, handles comments and DMs, boosts posts, and pulls history, including posts made in the Instagram app.

Instagram analytics from GET /analytics/social (reach 612K, reel plays 1.2M, saves 28K, shares 9.4K) beside a direct message inbox with an automated reply to a story reply and a reel comment with a Reply link

Analytics

Reach, saves, shares, and views per post, plus reel plays and watch time. Account analytics can take up to 48 hours and need at least 100 followers. Story insights last 24 hours.

Analytics API

Comments

Read up to the 1,000 most recent comments on a post, reply, and delete, including on posts made in the Instagram app. Turn comments off with disableComments.

Engagement API

Messages and automations

Read and send DMs with text, images, video, and voice. The other person starts the conversation, and replies must land within 7 days. Automations (in beta) send a DM, call a webhook, or email when someone comments a keyword or replies to a story.

Messaging API

Boosted ads

Boost a post into an ad, then read spend and results from the insights endpoint.

Ads API docs

History

Pull an account's past posts and active stories with metrics, including posts published outside Ayrshare.

History API

Not available on Instagram: deleting posts, story comments, and story stickers, which Meta's API doesn't expose. See every network you can reach with the same integration on the supported networks page.

Common questions

FAQs About the Instagram API

Yes, you can post to Instagram through an API. Ayrshare's Instagram API lets developers publish photos, carousels, reels, and stories to Instagram Business and Creator accounts via a single REST endpoint. It supports scheduled posts, collaborators, comments, direct messages, boosted ads, and analytics across 14+ social networks through one integration. Start with the Instagram publishing options.

The Instagram API is free to call: Meta charges no usage fee. Going direct costs you time instead, between App Review, two login flows, token refresh, and Meta's API version changes. Ayrshare's plans include Instagram publishing on Ayrshare's approved Meta app, so you can start posting without waiting on review. Compare Ayrshare plans.

To get access to the Instagram API, create a Meta developer app, pick Instagram Login or Facebook Login, request the publishing permissions, and pass App Review before switching to Live mode. Your users also need professional accounts. With Ayrshare, they link their accounts through Ayrshare's approved app, and the Post API reference shows the one request you need.

Instagram Business and Creator accounts can use the API; personal accounts can't publish through it. Switching a personal account takes a minute in the Instagram app. One difference to plan for: stories publish from Business accounts only. The guide to Instagram Business, Creator, and Personal profiles covers the rest.

Yes, you can post Instagram reels through an API: every video post to Instagram publishes as a reel. Send an MP4 or MOV of 3 seconds to 15 minutes, up to 1 GB, 9:16 recommended, then set a cover frame and invite up to three collaborators. The tutorial Instagram Reels API: How to Post Videos to Reels walks through it.

The Instagram API posting limits through Ayrshare are 50 posts per account in a rolling 24 hours, and every response includes usedQuota so you can track it. Captions take up to 2,200 characters with up to 5 hashtags and 3 @mentions, and a carousel holds up to 10 items. Ayrshare's own limit is 300 API calls per 5 minutes per profile. See the Instagram media guidelines.

Your Users Are on Instagram. Your Product Can Be Too.

Get an API key, publish your first reel or carousel, and turn on the other networks with the same call when you need them.