All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| instagramExploreGet | GET /instagram/explore | Browse Instagram's Explore feed |
| instagramLocationsIdGet | GET /instagram/locations/{id} | Get an Instagram location by id |
| instagramLocationsIdNearbyGet | GET /instagram/locations/{id}/nearby | List Instagram locations geographically near a given location |
| instagramLocationsIdPostsGet | GET /instagram/locations/{id}/posts | List posts tagged with an Instagram location |
| instagramPostsShortcodeCommentsCommentIdRepliesGet | GET /instagram/posts/{shortcode}/comments/{commentId}/replies | List replies to an Instagram comment |
| instagramPostsShortcodeCommentsGet | GET /instagram/posts/{shortcode}/comments | List comments on an Instagram post |
| instagramPostsShortcodeGet | GET /instagram/posts/{shortcode} | Get an Instagram post (photo / video / carousel / reel) by shortcode |
| instagramReelsRecommendedGet | GET /instagram/reels/recommended | Browse Instagram's recommended Reels feed |
| instagramResolveMediaIdGet | GET /instagram/resolve/media-id | Convert an Instagram post shortcode into its numeric media_id |
| instagramResolveShortcodeFromMediaGet | GET /instagram/resolve/shortcode-from-media | Convert an Instagram numeric media_id into its shortcode |
| instagramResolveShortcodeGet | GET /instagram/resolve/shortcode | Extract a post shortcode from an Instagram URL |
| instagramResolveUserIdGet | GET /instagram/resolve/user-id | Convert an Instagram username into its numeric user_id (pk) |
| instagramSearchGet | GET /instagram/search | Cross-type Instagram search (posts/reels) |
| instagramUsersUsernameFollowersGet | GET /instagram/users/{username}/followers | List followers of an Instagram user |
| instagramUsersUsernameFollowingGet | GET /instagram/users/{username}/following | List accounts an Instagram user follows |
| instagramUsersUsernameFormerUsernamesGet | GET /instagram/users/{username}/former-usernames | List former usernames for an Instagram user |
| instagramUsersUsernameGet | GET /instagram/users/{username} | Get an Instagram user profile by username |
| instagramUsersUsernameHighlightsGet | GET /instagram/users/{username}/highlights | List Instagram highlight reels for a user (metadata only) |
| instagramUsersUsernamePostsGet | GET /instagram/users/{username}/posts | List feed posts authored by an Instagram user |
| instagramUsersUsernameReelsGet | GET /instagram/users/{username}/reels | List reels authored by an Instagram user |
| instagramUsersUsernameStoriesGet | GET /instagram/users/{username}/stories | List active Instagram stories for a user |
| instagramUsersUsernameTaggedPostsGet | GET /instagram/users/{username}/tagged-posts | List posts an Instagram user is tagged in |
InstagramExploreGet200Response instagramExploreGet(cursor)
Browse Instagram's Explore feed
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramExploreGet(cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramExploreGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramLocationsIdGet200Response instagramLocationsIdGet(id)
Get an Instagram location by id
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String id = "id_example"; // String | Numeric Instagram location id.
try {
InstagramLocationsIdGet200Response result = apiInstance.instagramLocationsIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramLocationsIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Numeric Instagram location id. |
InstagramLocationsIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramLocationsIdNearbyGet200Response instagramLocationsIdNearbyGet(id)
List Instagram locations geographically near a given location
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String id = "id_example"; // String |
try {
InstagramLocationsIdNearbyGet200Response result = apiInstance.instagramLocationsIdNearbyGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramLocationsIdNearbyGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
InstagramLocationsIdNearbyGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramLocationsIdPostsGet(id, cursor, tab)
List posts tagged with an Instagram location
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String id = "id_example"; // String |
String cursor = "cursor_example"; // String |
String tab = "ranked"; // String | Which tab to fetch — `ranked` (top) or `recent` (latest).
try {
InstagramExploreGet200Response result = apiInstance.instagramLocationsIdPostsGet(id, cursor, tab);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramLocationsIdPostsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| cursor | String | [optional] | |
| tab | String | Which tab to fetch — `ranked` (top) or `recent` (latest). | [optional] [enum: ranked, recent] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response instagramPostsShortcodeCommentsCommentIdRepliesGet(shortcode, commentId, cursor)
List replies to an Instagram comment
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String shortcode = "shortcode_example"; // String |
String commentId = "commentId_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response result = apiInstance.instagramPostsShortcodeCommentsCommentIdRepliesGet(shortcode, commentId, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramPostsShortcodeCommentsCommentIdRepliesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| shortcode | String | ||
| commentId | String | ||
| cursor | String | [optional] |
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response instagramPostsShortcodeCommentsGet(shortcode, cursor, sort)
List comments on an Instagram post
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String shortcode = "shortcode_example"; // String |
String cursor = "cursor_example"; // String |
String sort = "popular"; // String |
try {
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response result = apiInstance.instagramPostsShortcodeCommentsGet(shortcode, cursor, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramPostsShortcodeCommentsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| shortcode | String | ||
| cursor | String | [optional] | |
| sort | String | [optional] [enum: popular, newest] |
InstagramPostsShortcodeCommentsCommentIdRepliesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramPostsShortcodeGet200Response instagramPostsShortcodeGet(shortcode)
Get an Instagram post (photo / video / carousel / reel) by shortcode
`shortcode` is the slug from the post URL, e.g. `DUajw4YkorV` in `instagram.com/p/DUajw4YkorV/`.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String shortcode = "shortcode_example"; // String |
try {
InstagramPostsShortcodeGet200Response result = apiInstance.instagramPostsShortcodeGet(shortcode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramPostsShortcodeGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| shortcode | String |
InstagramPostsShortcodeGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramReelsRecommendedGet(cursor)
Browse Instagram's recommended Reels feed
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramReelsRecommendedGet(cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramReelsRecommendedGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramResolveMediaIdGet200Response instagramResolveMediaIdGet(shortcode)
Convert an Instagram post shortcode into its numeric media_id
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String shortcode = "shortcode_example"; // String |
try {
InstagramResolveMediaIdGet200Response result = apiInstance.instagramResolveMediaIdGet(shortcode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramResolveMediaIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| shortcode | String |
InstagramResolveMediaIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramResolveMediaIdGet200Response instagramResolveShortcodeFromMediaGet(mediaId)
Convert an Instagram numeric media_id into its shortcode
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String mediaId = "mediaId_example"; // String |
try {
InstagramResolveMediaIdGet200Response result = apiInstance.instagramResolveShortcodeFromMediaGet(mediaId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramResolveShortcodeFromMediaGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| mediaId | String |
InstagramResolveMediaIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramResolveShortcodeGet200Response instagramResolveShortcodeGet(url)
Extract a post shortcode from an Instagram URL
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
URI url = new URI(); // URI |
try {
InstagramResolveShortcodeGet200Response result = apiInstance.instagramResolveShortcodeGet(url);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramResolveShortcodeGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| url | URI |
InstagramResolveShortcodeGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramResolveUserIdGet200Response instagramResolveUserIdGet(username)
Convert an Instagram username into its numeric user_id (pk)
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
try {
InstagramResolveUserIdGet200Response result = apiInstance.instagramResolveUserIdGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramResolveUserIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String |
InstagramResolveUserIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramSearchGet(q, cursor)
Cross-type Instagram search (posts/reels)
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String q = "q_example"; // String | Search keyword.
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramSearchGet(q, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramSearchGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Search keyword. | |
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramUsersUsernameFollowersGet200Response instagramUsersUsernameFollowersGet(username, cursor)
List followers of an Instagram user
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramUsersUsernameFollowersGet200Response result = apiInstance.instagramUsersUsernameFollowersGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameFollowersGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramUsersUsernameFollowersGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramUsersUsernameFollowersGet200Response instagramUsersUsernameFollowingGet(username, cursor)
List accounts an Instagram user follows
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramUsersUsernameFollowersGet200Response result = apiInstance.instagramUsersUsernameFollowingGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameFollowingGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramUsersUsernameFollowersGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramUsersUsernameFormerUsernamesGet200Response instagramUsersUsernameFormerUsernamesGet(username)
List former usernames for an Instagram user
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
try {
InstagramUsersUsernameFormerUsernamesGet200Response result = apiInstance.instagramUsersUsernameFormerUsernamesGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameFormerUsernamesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String |
InstagramUsersUsernameFormerUsernamesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramUsersUsernameGet200Response instagramUsersUsernameGet(username)
Get an Instagram user profile by username
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String | Instagram URL slug, e.g. `instagram`
try {
InstagramUsersUsernameGet200Response result = apiInstance.instagramUsersUsernameGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | Instagram URL slug, e.g. `instagram` |
InstagramUsersUsernameGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramUsersUsernameHighlightsGet200Response instagramUsersUsernameHighlightsGet(username, cursor)
List Instagram highlight reels for a user (metadata only)
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramUsersUsernameHighlightsGet200Response result = apiInstance.instagramUsersUsernameHighlightsGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameHighlightsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramUsersUsernameHighlightsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramUsersUsernamePostsGet(username, cursor)
List feed posts authored by an Instagram user
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramUsersUsernamePostsGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernamePostsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramUsersUsernameReelsGet(username, cursor)
List reels authored by an Instagram user
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramUsersUsernameReelsGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameReelsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramUsersUsernameStoriesGet(username)
List active Instagram stories for a user
Returns the user's currently-live story tray (empty when the user has no active stories).
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramUsersUsernameStoriesGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameStoriesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
InstagramExploreGet200Response instagramUsersUsernameTaggedPostsGet(username, cursor)
List posts an Instagram user is tagged in
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.InstagramApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
InstagramApi apiInstance = new InstagramApi(defaultClient);
String username = "username_example"; // String |
String cursor = "cursor_example"; // String |
try {
InstagramExploreGet200Response result = apiInstance.instagramUsersUsernameTaggedPostsGet(username, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstagramApi#instagramUsersUsernameTaggedPostsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | ||
| cursor | String | [optional] |
InstagramExploreGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |