Skip to main content

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​

NameTypeRequiredDefaultDescription
linkstringNo—Instagram profile URL
usernamestringNo—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​

NameTypeRequiredDefaultDescription
usernamestringYes—Instagram username
linkstringNo—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​

NameTypeRequiredDefaultDescription
usernamestringNo—Instagram username (recommended — returns more results)
user_idstringNo—Instagram user ID (alternative to username)
end_cursorstringNo—Pagination cursor for next page
full_detailsbooleanNofalseWhen true, returns the full details of each post. Default: false. Pricing: 12 credits when true, 1 credit otherwise.

Pricing​

Per call: 1 credit; up to 12 credits per call depending on the result.

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​

NameTypeRequiredDefaultDescription
user_idstringYes—Instagram user ID
end_cursorstringNo—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​

NameTypeRequiredDefaultDescription
user_idstringYes—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​

NameTypeRequiredDefaultDescription
highlight_idstringYes—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​

NameTypeRequiredDefaultDescription
linkstringYes—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​

NameTypeRequiredDefaultDescription
shortcodestringYes—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​

NameTypeRequiredDefaultDescription
clips_media_idstringNo—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​

NameTypeRequiredDefaultDescription
audio_idstringYes—Audio cluster ID (music ID)
max_idstringNo—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 Instagram​

Search Instagram by keyword and get popular results (users, hashtags, places).

Endpoint​

GET /instagram/search

Parameters​

NameTypeRequiredDefaultDescription
keywordstringYes—Search keyword/query
end_cursorstringNo—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​

NameTypeRequiredDefaultDescription
location_idstringYes—Instagram location ID
tabstringNo—Filter: recent or ranked
end_cursorstringNo—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​

NameTypeRequiredDefaultDescription
location_idstringYes—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.