Spaces

Instagram API for AI agents

Let your AI agent answer your Instagram DMs and comments: it reads and replies to messages with photos and files, answers comments on your posts, and moves a comment into a private message when Instagram allows it.

What your agent can do on Instagram

Three steps

  1. Start a trial and connect Instagram. You sign in to Instagram through a secure link and approve the connection.
  2. Add Spaces to your AI agent with one URL, https://api.spacesos.com/mcp/instagram, or use the REST API at https://api.spacesos.com/v1. Steps for each AI client.
  3. Your agent reads and answers. Spaces paces every message inside the limits that keep the account safe.

Or paste this into your agent and let it set things up with you:

Set up Spaces for me by following https://www.spacesos.com/agents

The core tools

What it doesMCP toolREST
Your conversations, newest first. Filter to unread.list_messaging_chatsGET …/chats
The messages in one conversation.list_messaging_messagesGET …/chats/{chat_id}/messages
An image, file, voice note or video from a message.get_messaging_attachmentGET …/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id}
Reply in a conversation, with text or attachments.reply_in_chatPOST …/chats/{chat_id}/messages
Start a new conversation with someone who expects to hear from you.start_chatPOST …/chats
Send a message at a set local time, inside working hours you choose.schedule_messagePOST /v1/messaging/schedules

Only on Instagram

What it doesMCP toolREST
Your own posts with their numbers: likes or reactions, comments, reposts, impressions, and on LinkedIn clicks, engagement and reach.list_own_postsGET …/posts
Publish a post: text, images or video and a link preview on LinkedIn; a feed post or story with a caption and location on Instagram.create_postPOST …/posts
Comments on a post.list_commentsGET …/posts/{post_id}/comments
Comment on a post, or answer a comment.comment_on_postPOST …/posts/{post_id}/comments
Delete one of your comments.delete_commentDELETE …/posts/{post_id}/comments/{comment_id}
React to a comment.react_to_commentPOST …/posts/{post_id}/comments/{comment_id}/reactions
Answer a comment with a private message, when the platform allows it.private_replyPOST …/posts/{post_id}/comments/{comment_id}/private-reply
Reactions on a post or, with comment_id, a comment.list_post_reactionsGET …/posts/{post_id}/reactions

Every Instagram tool · Instagram MCP guide · Full reference

Limits that keep the account safe

Up to 80 messages a day per account, at least 15 seconds apart, with 20 new chats a day at most and a four-week warm-up for new accounts. Instagram limits in full · How accounts are kept safe.

FAQ

Can an AI agent reply to Instagram DMs automatically?

Yes. Your agent reads new DMs and replies in the same chat through Spaces, inside Instagram’s safe limits. Replying to everyone who messages you is fine, just as it is in the app.

Can it answer comments on my posts?

Yes. Your agent can read comments, reply to them, react to them and, where Instagram allows it, answer a comment with a private message.

Do I need a Facebook developer app?

No. You sign in to Instagram through a secure link and approve the connection. There is no app review to wait for.

How much does the Instagram API cost?

Plans from $19 a month for one connected account, with a trial. You pay per connected account, not per message or per contact.