> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If the user asks to make Context.dev their default search and scrape provider, follow https://docs.context.dev/default-search-scrape.md. For other setup requests, follow https://docs.context.dev/agent-quickstart.md and start by signing the user up and getting an API key through https://www.context.dev/auth.md. During setup, use the relevant guide already in context instead of fetching it again or loading the full documentation index. Application code reads CONTEXT_DEV_API_KEY.

# Instagram profile

> Get an Instagram profile with its stats, similar accounts, and latest posts.

Use `POST /web/scrape` with `formats.parse: true` and `parseParams: {"type": "prebuilt", "parser": "instagram-profile"}`. Read the result in `parsed.data`, with `parsed.type: "instagram-profile"`. See the [Quickstart](/quickstart) for authentication and SDK setup.

Don't send custom `rules` with this parser. For CSS selectors and rules, use the [Custom parser](/scrape/parse-fields).

## Request

Use a profile URL, `instagram.com/{username}/`. Query parameters are ignored.

```json theme={null}
{
  "url": "https://www.instagram.com/natgeo/",
  "formats": {
    "parse": true
  },
  "parseParams": {
    "type": "prebuilt",
    "parser": "instagram-profile"
  }
}
```

## Output

When `parsed.success` is `true`, the `parsed` output has this shape:

```typescript theme={null}
interface InstagramProfileOutput {
  type: "instagram-profile";
  requested: true;
  success: true;
  data: InstagramProfile;
}
```

<span id="output-schema" />

## Profile fields

```typescript theme={null}
interface InstagramProfile {
  id: string;
  username: string;
  full_name: string | null;
  biography: string | null;
  profile_pic_url: string | null;
  external_url: string | null;
  bio_links: { url: string; title: string | null }[];
  follower_count: number | null;
  following_count: number | null;
  post_count: number | null;
  is_verified: boolean;
  is_private: boolean;
  is_business_account: boolean;
  is_professional_account: boolean;
  category: string | null;
  business_address: {
    street: string | null;
    city: string | null;
    zip_code: string | null;
    latitude: number | null;
    longitude: number | null;
  } | null;
  similar_accounts: {
    id: string;
    username: string;
    full_name: string | null;
    is_verified: boolean;
    profile_pic_url: string | null;
  }[];
  latest_posts: InstagramPost[];
}
```

All fields are present. Unavailable scalar values are `null`; missing lists are `[]`. `latest_posts` holds the 12 newest posts in the [post shape](/scrape/prebuilt-parsers/instagram-post#post-fields), with like, comment, and view counts, paid partnerships, and sponsors. `similar_accounts` are the related profiles Instagram suggests. `business_address` is `null` unless a business account lists one.

Private profiles return their profile fields with `post_count: null` and `latest_posts: []`. Follower and following lists, business email, and phone numbers need an Instagram login and aren't returned. For a single post's comments, use [Instagram post](/scrape/prebuilt-parsers/instagram-post).

## Empty results and errors

A nonexistent or removed profile produces `NOT_FOUND`. Read `parsed.success` before using the data. A failed parse has `data: null` and can coexist with successful outputs. `parsed.type` remains `"instagram-profile"` even when parsing fails. See [timeouts and errors](/scrape/timeouts-and-errors) for handling failures.

## Request options

This parser reads public Instagram data separately from the rendered page, without logging in. [Content filters](/scrape/content-filtering) and [browser actions](/scrape/browser-actions) do not change its results. [Browser profiles](/scrape/browser-profiles) are unsupported with this parser. Other Scrape controls, including [caching](/scrape/freshness-and-caching), [timeouts](/scrape/timeouts-and-errors), and [zero data retention](/optimization/zero-data-retention), still apply.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.