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​

NameTypeRequiredDescription
linkstringNoInstagram profile URL
usernamestringNoInstagram 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​

NameTypeRequiredDescription
usernamestringYesInstagram username
linkstringNoInstagram 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​

NameTypeRequiredDescription
usernamestringNoInstagram username (recommended — returns more results)
user_idstringNoInstagram user ID (alternative to username)
end_cursorstringNoPagination 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​

NameTypeRequiredDescription
user_idstringYesInstagram user ID
end_cursorstringNoPagination 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​

NameTypeRequiredDescription
user_idstringYesInstagram 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​

NameTypeRequiredDescription
highlight_idstringYesHighlight 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​

NameTypeRequiredDescription
linkstringYesInstagram 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​

NameTypeRequiredDescription
shortcodestringYesInstagram 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​

NameTypeRequiredDescription
clips_media_idstringNoClip 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​

NameTypeRequiredDescription
audio_idstringYesAudio cluster ID (music ID)
max_idstringNoPagination 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​

NameTypeRequiredDescription
keywordstringYesSearch keyword/query
end_cursorstringNoPagination 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​

NameTypeRequiredDescription
location_idstringYesInstagram location ID
tabstringNoFilter: recent or ranked
end_cursorstringNoPagination 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​

NameTypeRequiredDescription
location_idstringYesInstagram 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.