# Instagram Scraper — how to use (mcp.ai)

Acesso a perfis públicos do Instagram: posts, reels, stories, highlights, hashtags, busca e seguidores. Hospedado pela plataforma, sem necessidade de credencial.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_instagram_scraper?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `instagram_user_info`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/instagram`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/instagram/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/instagram/user_info` — Full public account data for a profile: id (numeric pk), username, full_name, biography, bio_links, follower/following counts, verification, private/public, business category and profile pic. Accepts username, numeric id, or profile URL. Returns { data }.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_info_v2` — Same profile payload as instagram_user_info plus the 'About this account' block (country, date joined, former usernames). Use when you need transparency data in the same call.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_basic` — Profile preview: the same public account data as instagram_user_info. Accepts username, numeric id, or profile URL.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_about` — Account transparency 'About this account' info (country, date joined, date verified, former usernames, accounts with shared followers) for a public profile.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_similar_accounts` — Accounts Instagram suggests as similar to the given profile (the 'Suggested for you' chips). Returns { data } with an array of user objects.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_posts` — A page of a user's feed posts (carousel/image/video) with code, id, caption, counts and media URLs. Returns { data: { count, items, user }, pagination_token }; pass the token back for the next page.
  - body: { username_or_url: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/user_reels` — A page of a user's reels (12 per page). Returns { data, pagination_token }; pass the token back for the next page.
  - body: { username_or_url: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/user_tagged_posts` — A page of posts where the user is tagged. Returns { data, pagination_token }; pass the token back for the next page.
  - body: { username_or_url: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/user_stories` — Currently-active stories for a public profile (empty list when the user has no live stories).
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/user_highlights` — A user's story highlights (the cover reels). Each item's id feeds instagram_highlight_stories as highlight_id.
  - body: { username_or_url: string }
- `POST https://api.mcp.ai/api/instagram/highlight_stories` — The individual story items inside one highlight reel. Requires a highlight_id from instagram_user_highlights.
  - body: { highlight_id: string }
- `POST https://api.mcp.ai/api/instagram/user_followers` — A page of a profile's followers. Returns { data, pagination_token }; pass the token back for the next page.
  - body: { username_or_url: string, amount?: number, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/user_following` — A page of the accounts a profile follows. Returns { data, pagination_token }; pass the token back for the next page.
  - body: { username_or_url: string, amount?: number, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/search` — Universal search across users, hashtags and places for a query string. Returns { data: { users, hashtags, places } }.
  - body: { search_query: string }
- `POST https://api.mcp.ai/api/instagram/hashtag_posts` — Top and recent posts/reels for a hashtag. Returns { data, pagination_token }; pass the token back for the next page.
  - body: { hashtag: string, feed_type?: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/media_info` — Full details for a single post/reel/story (counts, caption, media URLs, dimensions, owner). Accepts the shortcode, the numeric media id, or the post URL.
  - body: { media_id: string }
- `POST https://api.mcp.ai/api/instagram/media_resolve` — Resolve a post/reel between its shortcode and numeric media id. Provide one of media_code (shortcode) or media_id; returns the full media object containing both id and code.
  - body: { media_code?: string, media_id?: string }
- `POST https://api.mcp.ai/api/instagram/post_likers` — Accounts that liked a post. Accepts the shortcode, numeric media id, or post URL. Returns { data } with an array of user objects.
  - body: { post_code: string }
- `POST https://api.mcp.ai/api/instagram/post_comments` — Top-level comments on a post. Accepts the shortcode, numeric media id, or post URL. Returns { data, pagination_token }; pass the token back for the next page.
  - body: { post_id: string, sort_by?: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/comment_replies` — Child replies for one comment on a post. Pass the post (shortcode, numeric id or URL) plus the comment_id from instagram_post_comments.
  - body: { post_id: string, comment_id: string, pagination_token?: string }
- `POST https://api.mcp.ai/api/instagram/reel_caption` — Caption/title for a reel or post. Pass the shortcode or URL. For the full media payload prefer instagram_media_info.
  - body: { reel_post_code_or_url: string, type?: string }

## Example prompts
- "Resuma o perfil público do @instagram"
- "Liste os últimos posts de @natgeo"
- "Busque usuários com "climate" no nome"

## More
- Page: https://mcp.ai/instagram_scraper
- Agent spec (llms.txt): https://mcp.ai/instagram_scraper/llms.txt
- Postman collection: https://mcp.ai/instagram_scraper/postman.json
