Instagram API
Access public Instagram profiles, posts, reels, highlights, search and locations.
Base URL https://api.socialapis.io. Every call needs your API key in the x-api-token header.
User IDs
Get User ID
Get the unique ID of any Instagram profile from link or username.
Endpoint
GET /instagram/user/id
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| link | string | No | Instagram profile URL |
| username | string | No | Instagram username |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/user/id' \
--header 'x-api-token: YOUR_API_KEY'
Profiles
Get Profile Details
Get user profile information by username including bio, followers, posts count, and related profiles.
Endpoint
GET /instagram/profile/details
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Instagram username |
| link | string | No | Instagram profile URL (alternative to username) |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/profile/details?username=instagram' \
--header 'x-api-token: YOUR_API_KEY'
Get Profile Posts
Get posts from a user profile with pagination.
Endpoint
GET /instagram/profile/posts
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | No | Instagram username (recommended — returns more results) |
| user_id | string | No | Instagram user ID (alternative to username) |
| end_cursor | string | No | Pagination cursor for next page |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/profile/posts' \
--header 'x-api-token: YOUR_API_KEY'
Get Profile Reels
Get reels from a user profile with pagination.
Endpoint
GET /instagram/profile/reels
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Instagram user ID |
| end_cursor | string | No | Pagination cursor for next page |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/profile/reels?user_id=YOUR_USER_ID' \
--header 'x-api-token: YOUR_API_KEY'
Get Profile Highlights
Get all highlights from a user profile.
Endpoint
GET /instagram/profile/highlights
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | Instagram user ID |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/profile/highlights?user_id=YOUR_USER_ID' \
--header 'x-api-token: YOUR_API_KEY'
Highlights
Get Highlight Details
Get details of a specific highlight by ID.
Endpoint
GET /instagram/highlight/details
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| highlight_id | string | Yes | Highlight ID (from profile highlights endpoint) |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/highlight/details?highlight_id=YOUR_HIGHLIGHT_ID' \
--header 'x-api-token: YOUR_API_KEY'
Posts
Get Post Shortcode
Extract the post shortcode from an Instagram URL.
Endpoint
GET /instagram/post/id
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| link | string | Yes | Instagram post URL |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/post/id?link=YOUR_POST_URL' \
--header 'x-api-token: YOUR_API_KEY'
Get Post Details
Get details of a specific Instagram post.
Endpoint
GET /instagram/post/details
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| shortcode | string | Yes | Instagram post shortcode |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/post/details?shortcode=YOUR_SHORTCODE' \
--header 'x-api-token: YOUR_API_KEY'
Reels
Get Reels Feed
Get Instagram Reels feed with recommended, trending, or chained clips.
Endpoint
GET /instagram/reels/feed
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clips_media_id | string | No | Clip media ID for chaining/pagination |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/reels/feed' \
--header 'x-api-token: YOUR_API_KEY'
Get Reels by Audio
Get Instagram Reels associated with a specific audio/music ID.
Endpoint
GET /instagram/reels/audio
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| audio_id | string | Yes | Audio cluster ID (music ID) |
| max_id | string | No | Pagination cursor for next page |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/reels/audio?audio_id=YOUR_AUDIO_ID' \
--header 'x-api-token: YOUR_API_KEY'
Search
Search Instagram
Search Instagram by keyword and get popular results (users, hashtags, places).
Endpoint
GET /instagram/search
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| keyword | string | Yes | Search keyword/query |
| end_cursor | string | No | Pagination cursor for next page |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/search?keyword=coffee' \
--header 'x-api-token: YOUR_API_KEY'
Locations
Get Location Posts
Get Instagram posts from a specific location (ranked or recent).
Endpoint
GET /instagram/location/posts
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| location_id | string | Yes | Instagram location ID |
| tab | string | No | Filter: recent or ranked |
| end_cursor | string | No | Pagination cursor for next page |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/location/posts?location_id=YOUR_LOCATION_ID' \
--header 'x-api-token: YOUR_API_KEY'
Get Nearby Locations
Get nearby places/locations for a specific Instagram location.
Endpoint
GET /instagram/location/nearby
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| location_id | string | Yes | Instagram location ID |
Pricing
Per call: 1 credit.
Example Request
curl --request GET \
--url 'https://api.socialapis.io/instagram/location/nearby?location_id=YOUR_LOCATION_ID' \
--header 'x-api-token: YOUR_API_KEY'
Verifying what you were charged
Every paid response carries an X-SocialAPIs-Credits-Deducted header with the exact credit amount charged for that request. Variable-priced endpoints (page and group posts, media download) report the resolved amount here, so you can reconcile usage without checking the dashboard. Prices on this page come from the live endpoint catalog when the docs were built; socialapis.io/openapi.json always has the current ones.