Instagram User Profile API (V2)
GET
API health status
24h health
24h avg latency
Last checked
Healthy Available Limited Mostly unavailable No data
Healthy
Loading health status...
24h trend
30d trend
Retrieves an Instagram user profile by username. Use it to review a known account before creator research, brand monitoring, or related post analysis.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for the API service. |
username | query | string | Yes | - | The Instagram username whose profile details are to be retrieved. |
Code Samples
bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE'text
I want to use the "User Profile (V2)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE
API Endpoint: BASE_URL + /api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/instagram/user-profile-v2-en.json
Parameters:
- token (query): Access token for the API service. (Required)
- username (query): The Instagram username whose profile details are to be retrieved. (Required)
Return format: safely handle JSON or text according to the actual Content-Type.
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
- 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.
Please help me write a script in my preferred programming language to call this API and handle the response.python
import requests
BASE_URL = "https://api.justoneapi.com" # Provided by OpenAPI servers
url = BASE_URL + "/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
content_type = response.headers.get("content-type", "").lower()
if "json" in content_type:
try:
print(response.json())
except ValueError:
print(response.text)
elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
print(response.text)
else:
with open("response.bin", "wb") as output:
output.write(response.content)
print(f"Saved {len(response.content)} bytes to response.bin")js
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE";
const response = await fetch(url, {
method: "GET",
signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
const contentType = (response.headers.get("content-type") || "").toLowerCase();
const mediaType = contentType.split(";", 1)[0].trim();
const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
if (textual) {
const responseText = new TextDecoder().decode(responseBytes);
let data = responseText;
if (contentType.includes("json")) {
try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
}
console.log(data);
} else {
console.log(`Received ${responseBytes.byteLength} binary bytes`);
}
}java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws Exception {
final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
final String url = BASE_URL + "/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE";
HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create(url))
.timeout(Duration.ofSeconds(120))
.method("GET", HttpRequest.BodyPublishers.noBody());
HttpRequest request = builder.build();
HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
System.out.println(response.statusCode());
String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
String mediaType = contentType.split(";", 2)[0].trim();
if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
System.out.println(new String(response.body(), StandardCharsets.UTF_8));
} else {
Files.write(Path.of("response.bin"), response.body());
System.out.println("Saved " + response.body().length + " bytes to response.bin");
}
}
}go
package main
import (
"fmt"
"io"
"os"
"strings"
"net/http"
"time"
)
const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers
func main() {
client := &http.Client{Timeout: 120 * time.Second}
url := BASE_URL + "/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
bodyBytes, _ := io.ReadAll(resp.Body)
contentType := strings.ToLower(resp.Header.Get("Content-Type"))
mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
fmt.Println(string(bodyBytes))
} else {
os.WriteFile("response.bin", bodyBytes, 0600)
fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
}
}php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/instagram/get-user-detail/v2?token=YOUR_API_KEY&username=VALUE';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
echo $response;
} else {
file_put_contents('response.bin', $response);
echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}Response Fields
Key fields in a successful response (code = 0).
Lookup status and account5 fields
data
Instagram profile lookup data. Check status to see whether profile details are available.
| Field | Type | Description |
|---|---|---|
status | boolean | Profile lookup status inside data. A successful API response can contain false when profile details are unavailable. |
errorMessage | string | Message returned when the profile lookup cannot provide details. |
id | string | Instagram profile identifier, returned as text. |
username | string | Username of the Instagram profile. |
full_name | string | Display name shown on the Instagram profile. |
Biography, photos and links12 fields
data
| Field | Type | Description |
|---|---|---|
biography | string | Biography text shown on the profile. |
biography_with_entities | object | Biography text and associated entity metadata. |
biography_with_entities.raw_text | string | Raw text in the reported biography bundle. |
biography_with_entities.entities | array | Entities associated with the biography text. The array can be empty. |
bio_links | array | Links listed on the profile biography. |
bio_links[] | object | One listed biography link. |
bio_links[].title | string | Display label for the biography link. |
bio_links[].url | string | Destination URL listed for the biography link. |
bio_links[].link_type | string | Link type label reported by Instagram. |
external_url | string | External website link listed on the profile. |
profile_pic_url | string | Link to the main profile picture. |
profile_pic_url_hd | string | Link to the higher-resolution profile picture. |
Follower counts and account flags14 fields
data
| Field | Type | Description |
|---|---|---|
is_private | boolean | Whether the profile is marked as private. |
is_verified | boolean | Whether the profile is marked as verified. |
is_embeds_disabled | boolean | Whether the profile marks external embeds as disabled. |
edge_followed_by | object | Follower count data for the profile. |
edge_followed_by.count | integer | Number of followers reported for the profile. |
edge_follow | object | Following count data for the profile. |
edge_follow.count | integer | Number of accounts that the profile follows. |
highlight_reel_count | integer | Number of story highlights reported for the profile. |
pinned_channels_list_count | integer | Number of pinned channels reported for the profile. |
has_clips | boolean | Whether the profile reports having Reels content. |
has_guides | boolean | Whether the profile reports having guides. |
has_channel | boolean | Whether the profile reports having a channel. |
has_ar_effects | boolean | Whether the profile reports having AR effects. |
hide_like_and_view_counts | boolean | Whether the profile reports that like and view counts are hidden. |
Account category and business data6 fields
data
| Field | Type | Description |
|---|---|---|
is_business_account | boolean | Whether the profile is marked as a business account. |
is_professional_account | boolean | Whether the profile is marked as a professional account. |
category_name | string | null | Profile category label returned by Instagram, or null when unavailable. |
should_show_category | boolean | Whether the profile category is marked for display. |
business_contact_method | string | null | Label of the business contact method, returned as text or null. |
business_address_json | string | null | JSON-encoded business address data, returned as text or null. The encoded object can contain null components. |
Inline timeline bundles12 fields
data
| Field | Type | Description |
|---|---|---|
edge_owner_to_timeline_media | object | Optional inline timeline data. It can be empty for a profile with public posts. Media entries were present in older verified responses. |
edge_owner_to_timeline_media.count | integer | Count reported in this inline timeline bundle. An active profile can return zero here. |
edge_owner_to_timeline_media.page_info | object | Paging metadata inside the inline timeline bundle. |
edge_owner_to_timeline_media.page_info.has_next_page | boolean | Whether the inline bundle indicates another page. |
edge_owner_to_timeline_media.edges | array | Media entries included in the inline timeline, when returned. This array can be empty. |
edge_owner_to_timeline_media.edges[] | object | One entry in the inline timeline media bundle. |
edge_owner_to_timeline_media.edges[].node | object | An inline timeline media item. Its fields are present only when the response includes an item. |
edge_felix_video_timeline | object | Inline video timeline metadata, when returned. |
edge_felix_video_timeline.count | integer | Count reported for this inline video timeline. |
edge_felix_video_timeline.page_info | object | Paging metadata inside the inline video timeline. |
edge_felix_video_timeline.page_info.has_next_page | boolean | Whether the inline bundle indicates another page. |
edge_felix_video_timeline.edges | array | Video entries in the inline bundle. The array can be empty. |
Timeline media and thumbnails26 fields
data.edge_owner_to_timeline_media.edges[].node
| Field | Type | Description |
|---|---|---|
id | string | Instagram media ID, returned as text. |
shortcode | string | Shortcode for the Instagram media. |
taken_at_timestamp | integer | Publication time reported for the media as Unix epoch seconds. |
owner | object | Owner account reported for the media. |
owner.id | string | Instagram account identifier, returned as text. |
owner.username | string | Instagram account username. |
product_type | string | Product type label reported for the media. |
is_video | boolean | Whether the media item is marked as video. |
has_audio | boolean | Whether the media item is marked as having audio. |
video_url | string | Video link for the media item, when returned. |
display_url | string | Link to the display image for the media. |
dimensions | object | Dimensions reported for the media. |
dimensions.width | integer | Reported width of the media. |
dimensions.height | integer | Reported height of the media. |
thumbnail_src | string | Link to the reported media thumbnail. |
thumbnail_tall_src | string | Link to the tall thumbnail variant. |
thumbnail_resources | array | Available thumbnail resources and their reported sizes. |
thumbnail_resources[] | object | One thumbnail resource. |
thumbnail_resources[].src | string | URL of this thumbnail resource. |
thumbnail_resources[].config_width | integer | Width reported for the thumbnail variant. |
thumbnail_resources[].config_height | integer | Height reported for the thumbnail variant. |
tall_profile_grid_crop | object | null | Tall profile-grid crop coordinates, returned as an object or null. |
tall_profile_grid_crop.crop_top | number | Top crop coordinate reported for the profile grid. |
tall_profile_grid_crop.crop_bottom | number | Bottom crop coordinate reported for the profile grid. |
tall_profile_grid_crop.crop_left | number | Left crop coordinate reported for the profile grid. |
tall_profile_grid_crop.crop_right | number | Right crop coordinate reported for the profile grid. |
Timeline engagement, captions and music19 fields
data.edge_owner_to_timeline_media.edges[].node
| Field | Type | Description |
|---|---|---|
video_view_count | integer | Video view count reported for the media item. |
comments_disabled | boolean | Whether comments are marked as disabled for the media. |
like_and_view_counts_disabled | boolean | Whether like and view counts are marked as hidden for the media. |
edge_liked_by | object | Like count data reported for the media. |
edge_liked_by.count | integer | Reported number of likes. |
edge_media_preview_like | object | Like count data reported in the media preview. |
edge_media_preview_like.count | integer | Like count reported in the preview. |
edge_media_to_comment | object | Comment count data reported for the media. |
edge_media_to_comment.count | integer | Reported number of comments. |
edge_media_to_caption | object | Caption bundle reported for the media. |
edge_media_to_caption.edges | array | Caption entries included in the media response. |
edge_media_to_caption.edges[] | object | One caption entry. |
edge_media_to_caption.edges[].node | object | Caption record in this entry. |
edge_media_to_caption.edges[].node.text | string | Text of the media caption. |
clips_music_attribution_info | object | Music attribution shown with this video, when returned. |
clips_music_attribution_info.artist_name | string | Artist name reported in the music attribution. |
clips_music_attribution_info.song_name | string | Track name reported in the music attribution. |
clips_music_attribution_info.audio_id | string | Audio identifier reported in the music attribution. |
clips_music_attribution_info.uses_original_audio | boolean | Whether the video is marked as using original audio. |
Timeline tags and collaborators18 fields
data.edge_owner_to_timeline_media.edges[].node
| Field | Type | Description |
|---|---|---|
edge_media_to_tagged_user | object | Account tags reported for the media. |
edge_media_to_tagged_user.edges | array | Account-tag entries included with the media. |
edge_media_to_tagged_user.edges[] | object | One account-tag entry. |
edge_media_to_tagged_user.edges[].node | object | One media account tag and its placement information. |
edge_media_to_tagged_user.edges[].node.user | object | Public account referenced by the media tag. |
edge_media_to_tagged_user.edges[].node.user.id | string | Instagram account identifier, returned as text. |
edge_media_to_tagged_user.edges[].node.user.username | string | Instagram account username. |
edge_media_to_tagged_user.edges[].node.user.full_name | string | Display name reported for the tagged account. |
edge_media_to_tagged_user.edges[].node.user.is_verified | boolean | Whether the tagged account is marked as verified. |
edge_media_to_tagged_user.edges[].node.user.profile_pic_url | string | Profile image link reported for the tagged account. |
edge_media_to_tagged_user.edges[].node.x | number | Horizontal placement value reported for the tag. |
edge_media_to_tagged_user.edges[].node.y | number | Vertical placement value reported for the tag. |
coauthor_producers | array | Accounts listed as media collaborators. |
coauthor_producers[] | object | One account listed as a media collaborator. |
coauthor_producers[].id | string | Instagram account identifier, returned as text. |
coauthor_producers[].username | string | Instagram account username. |
coauthor_producers[].is_verified | boolean | Whether the collaborating account is marked as verified. |
coauthor_producers[].profile_pic_url | string | Profile image link reported for the collaborating account. |
Response Example
Loading the response example...