Instagram User Profile API (V1)
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/v1?token=YOUR_API_KEY&username=VALUE'text
I want to use the "User Profile (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/instagram/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE
API Endpoint: BASE_URL + /api/instagram/get-user-detail/v1?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-v1-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/v1?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/v1?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/v1?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/v1?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/v1?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 status2 fields
data
Instagram profile lookup result. A successful API response can contain a failure status inside this object.
| Field | Type | Description |
|---|---|---|
status | string | boolean | Profile lookup status. An available profile is returned with the text «ok», while false can accompany an error message without a profile. |
errorMessage | string | Error message from the profile lookup when supplied. |
Profile and links15 fields
data.data.user
Instagram profile returned for the requested username.
| Field | Type | Description |
|---|---|---|
id | string | Instagram account ID as a string. |
username | string | Instagram username shown on the profile. |
full_name | string | Display name returned for the profile. |
biography | string | Profile biography text. It can be empty. |
biography_with_entities | object | Biography text and associated entity data. |
biography_with_entities.raw_text | string | Raw biography text returned with the biography entity data. |
biography_with_entities.entities | array | Entities returned with the biography text. The array can be empty. |
bio_links | array | Public links shown in the profile biography. |
bio_links[] | object | One public link shown in the profile biography. |
bio_links[].title | string | Display title for the biography link when provided. |
bio_links[].url | string | Destination URL for the biography link. |
bio_links[].link_type | string | Reported biography link type. |
external_url | string | External website link reported for the profile. |
profile_pic_url | string | Profile avatar URL. |
profile_pic_url_hd | string | URL of the high-resolution profile avatar. |
Account status and counts15 fields
data.data.user
| Field | Type | Description |
|---|---|---|
is_private | boolean | Whether the profile is marked as private. |
is_verified | boolean | Whether the profile is marked as verified. |
is_business_account | boolean | Whether the account is marked as a business account. |
is_professional_account | boolean | Whether the account is marked as a professional account. |
category_name | string | null | Category name associated with the profile, when available. |
should_show_category | boolean | Whether the profile indicates that the account category is displayed. |
has_clips | boolean | Whether the profile indicates that short videos are available. |
has_channel | boolean | Whether the profile indicates that it has a channel. |
has_guides | boolean | Whether the profile indicates that it has guides. |
show_text_post_app_badge | boolean | Whether the profile indicates that the text-post app badge is shown. |
highlight_reel_count | integer | Number of story highlights reported for the profile. |
edge_follow | object | Following-count information for the profile. |
edge_follow.count | integer | Following count reported for the profile. |
edge_followed_by | object | Follower-count information for the profile. |
edge_followed_by.count | integer | Follower count reported for the profile. |
Profile timeline49 fields
data.data.user.edge_owner_to_timeline_media
Reported profile timeline. The entry list may be empty.
| Field | Type | Description |
|---|---|---|
count | integer | Media count reported in the profile timeline. |
edges | array | Media entries returned with this timeline. |
edges[] | object | One returned timeline entry. |
edges[].node | object | Public media information included in this entry. |
edges[].node.id | string | Instagram media ID as a string. |
edges[].node.shortcode | string | Public short code associated with the media. |
edges[].node.is_video | boolean | Whether the media entry is marked as a video. |
edges[].node.taken_at_timestamp | integer | Reported publication time as a Unix timestamp in seconds. |
edges[].node.display_url | string | URL of the image displayed for this media entry. |
edges[].node.thumbnail_src | string | URL of the media thumbnail. |
edges[].node.thumbnail_tall_src | string | URL of the portrait thumbnail when supplied. |
edges[].node.thumbnail_resources | array | Thumbnail variants reported for the media entry. |
edges[].node.thumbnail_resources[] | object | One reported thumbnail variant. |
edges[].node.thumbnail_resources[].src | string | URL of this thumbnail image. |
edges[].node.thumbnail_resources[].config_width | integer | Reported thumbnail width in pixels. |
edges[].node.thumbnail_resources[].config_height | integer | Reported thumbnail height in pixels. |
edges[].node.dimensions | object | Reported media display dimensions. |
edges[].node.dimensions.width | integer | Media display width in pixels. |
edges[].node.dimensions.height | integer | Media display height in pixels. |
edges[].node.owner | object | Public account identity attached to the media. |
edges[].node.owner.id | string | Media owner's Instagram account ID as a string. |
edges[].node.owner.username | string | Instagram username of the media owner. |
edges[].node.edge_media_to_caption | object | Caption information returned with the media. |
edges[].node.edge_media_to_caption.edges | array | Caption entries included with the media. |
edges[].node.edge_media_to_caption.edges[] | object | One caption entry. |
edges[].node.edge_media_to_caption.edges[].node | object | Caption data for the entry. |
edges[].node.edge_media_to_caption.edges[].node.text | string | Caption text displayed with the media. |
edges[].node.edge_liked_by | object | Like-count information returned with the media entry. |
edges[].node.edge_liked_by.count | integer | Like count reported for the media entry. |
edges[].node.edge_media_preview_like | object | Like information included with the media preview. |
edges[].node.edge_media_preview_like.count | integer | Like count reported for the media preview. |
edges[].node.edge_media_to_comment | object | Comment-count information returned with the media entry. |
edges[].node.edge_media_to_comment.count | integer | Comment count reported for the media entry. |
edges[].node.comments_disabled | boolean | Whether the media entry is marked as having comments disabled. |
edges[].node.like_and_view_counts_disabled | boolean | Whether the media entry indicates that like and view counts are hidden. |
edges[].node.edge_sidecar_to_children | object | Child media information for a carousel entry. |
edges[].node.edge_sidecar_to_children.edges | array | Child media entries included in the carousel. |
edges[].node.edge_sidecar_to_children.edges[] | object | One carousel child entry. |
edges[].node.edge_sidecar_to_children.edges[].node | object | Public media information for this carousel child. |
edges[].node.edge_sidecar_to_children.edges[].node.id | string | Instagram media ID of the carousel child. |
edges[].node.edge_sidecar_to_children.edges[].node.shortcode | string | Public short code of the carousel child. |
edges[].node.edge_sidecar_to_children.edges[].node.is_video | boolean | Whether the carousel child is marked as a video. |
edges[].node.edge_sidecar_to_children.edges[].node.display_url | string | Image URL displayed for the carousel child. |
edges[].node.edge_sidecar_to_children.edges[].node.dimensions | object | Display dimensions reported for the carousel child. |
edges[].node.edge_sidecar_to_children.edges[].node.dimensions.width | integer | Display width of the carousel child in pixels. |
edges[].node.edge_sidecar_to_children.edges[].node.dimensions.height | integer | Display height of the carousel child in pixels. |
page_info | object | Pagination information reported for the returned timeline entries. |
page_info.end_cursor | string | null | End cursor reported for the returned timeline entries, when supplied. |
page_info.has_next_page | boolean | Whether the timeline result reports another page. |
Video timeline44 fields
data.data.user.edge_felix_video_timeline
Reported profile video timeline. The entry list can be empty while a count is present.
| Field | Type | Description |
|---|---|---|
count | integer | Video count reported in the profile video timeline. |
edges | array | Media entries returned with this timeline. |
edges[] | object | One returned timeline entry. |
edges[].node | object | Public media information included in this entry. |
edges[].node.id | string | Instagram media ID as a string. |
edges[].node.shortcode | string | Public short code associated with the media. |
edges[].node.is_video | boolean | Whether the media entry is marked as a video. |
edges[].node.taken_at_timestamp | integer | Reported publication time as a Unix timestamp in seconds. |
edges[].node.display_url | string | URL of the image displayed for this media entry. |
edges[].node.thumbnail_src | string | URL of the media thumbnail. |
edges[].node.thumbnail_tall_src | string | URL of the portrait thumbnail when supplied. |
edges[].node.thumbnail_resources | array | Thumbnail variants reported for the media entry. |
edges[].node.thumbnail_resources[] | object | One reported thumbnail variant. |
edges[].node.thumbnail_resources[].src | string | URL of this thumbnail image. |
edges[].node.thumbnail_resources[].config_width | integer | Reported thumbnail width in pixels. |
edges[].node.thumbnail_resources[].config_height | integer | Reported thumbnail height in pixels. |
edges[].node.dimensions | object | Reported media display dimensions. |
edges[].node.dimensions.width | integer | Media display width in pixels. |
edges[].node.dimensions.height | integer | Media display height in pixels. |
edges[].node.owner | object | Public account identity attached to the media. |
edges[].node.owner.id | string | Media owner's Instagram account ID as a string. |
edges[].node.owner.username | string | Instagram username of the media owner. |
edges[].node.edge_media_to_caption | object | Caption information returned with the media. |
edges[].node.edge_media_to_caption.edges | array | Caption entries included with the media. |
edges[].node.edge_media_to_caption.edges[] | object | One caption entry. |
edges[].node.edge_media_to_caption.edges[].node | object | Caption data for the entry. |
edges[].node.edge_media_to_caption.edges[].node.text | string | Caption text displayed with the media. |
edges[].node.edge_liked_by | object | Like-count information returned with the media entry. |
edges[].node.edge_liked_by.count | integer | Like count reported for the media entry. |
edges[].node.edge_media_preview_like | object | Like information included with the media preview. |
edges[].node.edge_media_preview_like.count | integer | Like count reported for the media preview. |
edges[].node.edge_media_to_comment | object | Comment-count information returned with the media entry. |
edges[].node.edge_media_to_comment.count | integer | Comment count reported for the media entry. |
edges[].node.comments_disabled | boolean | Whether the media entry is marked as having comments disabled. |
edges[].node.like_and_view_counts_disabled | boolean | Whether the media entry indicates that like and view counts are hidden. |
edges[].node.title | string | null | Title shown for the video when provided. |
edges[].node.video_url | string | URL of the video when provided. |
edges[].node.video_view_count | integer | View count reported for the video. |
edges[].node.video_duration | number | Video duration value reported with the media. |
edges[].node.has_audio | boolean | Whether the media is marked as having audio. |
edges[].node.is_published | boolean | Whether the video is marked as published. |
page_info | object | Pagination information reported for the returned timeline entries. |
page_info.end_cursor | string | null | End cursor reported for the returned timeline entries, when supplied. |
page_info.has_next_page | boolean | Whether the timeline result reports another page. |
Related accounts9 fields
data.data.user.edge_related_profiles
Related profiles included with the result when available.
| Field | Type | Description |
|---|---|---|
edges | array | Related-profile entries returned by the profile response. |
edges[] | object | One related-profile entry. |
edges[].node | object | Public profile information for the related account. |
edges[].node.id | string | ID of the related account, as a string. |
edges[].node.username | string | Username of the related account. |
edges[].node.full_name | string | Display name of the related account. |
edges[].node.is_private | boolean | Whether the related profile is marked as private. |
edges[].node.is_verified | boolean | Whether the related profile is marked as verified. |
edges[].node.profile_pic_url | string | Profile avatar URL of the related account. |
Response Example
Loading the response example...