# Instagram

> Access Instagram user profiles, posts, and engagement data with comprehensive media and interaction analytics.

Source: https://cotera.co/docs/reference/tools/individual-tools/instagram

---

**Authentication Type:** API Key\
**Description:** Access Instagram user profiles, posts, and engagement data with comprehensive media and interaction analytics.

***

## Authentication

To authenticate, you'll need a RapidAPI key for the [Instagram Scraper Stable API](https://rapidapi.com/thetechguy32744/api/instagram-scraper-stable-api/pricing).

**Note:** The free plan includes 20 requests per month.

***

## Profile Data

Retrieve Instagram user profile information including follower counts and verification status.

### Get User Profile

Get detailed Instagram user profile including follower count, following count, media count, and profile information.

**Operation Type:** Query (Read)

**Parameters:**

* **username** `string` (required): Instagram username to retrieve profile for (without @ symbol)

**Returns:**

* **followerCount** `number` (nullable): Number of followers
* **followingCount** `number` (nullable): Number of accounts following
* **mediaCount** `number` (nullable): Number of media posts
* **pk** `string`: Instagram user primary key ID
* **fullName** `string` (nullable): Full display name
* **username** `string`: Instagram username/handle
* **isVerified** `boolean` (nullable): Whether account is verified
* **profilePicUrl** `string` (nullable): Profile picture URL
* **hdProfilePicUrlInfo** `object` (nullable): HD profile picture information
  * **url** `string`: HD profile picture URL
* **isUnpublished** `boolean` (nullable): Whether account is unpublished
* **isPrivate** `boolean` (nullable): Whether account is private
* **friendshipStatus** `object` (nullable): Friendship status information
  * **following** `boolean` (nullable): Whether currently following
  * **blocking** `boolean` (nullable): Whether blocking user
  * **isFeedFavorite** `boolean` (nullable): Whether user is feed favorite
  * **outgoingRequest** `boolean` (nullable): Whether has outgoing follow request
  * **followedBy** `boolean` (nullable): Whether followed by user
  * **incomingRequest** `boolean` (nullable): Whether has incoming follow request
  * **isRestricted** `boolean` (nullable): Whether user is restricted
  * **isBestie** `boolean` (nullable): Whether user is bestie
* **textPostAppBadgeLabel** `string` (nullable): Text post app badge label
* **showTextPostAppBadge** `boolean` (nullable): Whether to show text post app badge
* **textPostNewPostCount** `number` (nullable): New text post count
* **liveBroadcastVisibility** `string` (nullable): Live broadcast visibility
* **liveBroadcastId** `string` (nullable): Live broadcast ID
* **fbidV2** `string` (nullable): Facebook ID v2
* **id** `string`: Instagram user ID

**Example Usage:**

```json
{
  "username": "instagram"
}
```

***

## Posts Data

Retrieve Instagram posts and detailed post information.

### Get User Posts

Retrieve recent posts from an Instagram user including media URLs and engagement metrics.

**Operation Type:** Query (Read)

**Parameters:**

* **username** `string` (required): Instagram username to retrieve posts for

**Returns:**

* **userPosts** `array of objects`: Array of user posts
  * **node** `object`: Post node data
    * **code** `string`: Post shortcode
    * **id** `string` (nullable): Post ID
    * **caption** `string` (nullable): Post caption text
    * **takenAt** `number` (nullable): Post timestamp
    * **likeCount** `number` (nullable): Number of likes
    * **commentCount** `number` (nullable): Number of comments
    * **mediaType** `number` (nullable): Media type (1=photo, 2=video, 8=carousel)
    * **imageVersions2** `object` (nullable): Image versions
      * **candidates** `array of objects`: Image candidates with different sizes
        * **url** `string`: Image URL
        * **width** `number` (nullable): Image width
        * **height** `number` (nullable): Image height

**Example Usage:**

```json
{
  "username": "instagram"
}
```

### Get Post Details

Get detailed information about a specific Instagram post including comments, media, and engagement data.

**Operation Type:** Query (Read)

**Parameters:**

* **postUrl** `string` (required): Instagram post URL to retrieve detailed information for

**Returns:**

* **id** `string`: Post ID
* **thumbnailSrc** `string` (nullable): Post thumbnail URL
* **dimensions** `object` (nullable): Post dimensions
  * **height** `number`: Post height
  * **width** `number`: Post width
* **displayUrl** `string` (nullable): Post display URL
* **mediaPreview** `string` (nullable): Media preview URL
* **caption** `string` (nullable): Post caption
* **shortcode** `string`: Post shortcode
* **takenAtTimestamp** `number` (nullable): Post timestamp
* **likeCount** `number` (nullable): Number of likes
* **commentCount** `number` (nullable): Number of comments
* **comments** `array of objects` (nullable): Post comments
  * **id** `string`: Comment ID
  * **text** `string`: Comment text
  * **createdAt** `number`: Comment timestamp
  * **owner** `object`: Comment owner information
    * **id** `string`: Comment owner ID
    * **username** `string`: Comment owner username
    * **profilePicUrl** `string` (nullable): Comment owner profile pic
  * **likeCount** `number` (nullable): Comment like count

**Example Usage:**

```json
{
  "postUrl": "https://www.instagram.com/p/ABC123/"
}
```

### Get Post Comments

Get detailed comments for a specific Instagram post including user information and engagement metrics.

**Operation Type:** Query (Read)

**Parameters:**

* **postUrl** `string` (required): Instagram post URL to retrieve comments for

**Returns:**

* **comments** `array of objects`: Post comments
  * **id** `string`: Comment ID
  * **text** `string`: Comment text
  * **createdAt** `number`: Comment timestamp
  * **owner** `object`: Comment owner information
    * **id** `string`: Comment owner ID
    * **username** `string`: Comment owner username
    * **profilePicUrl** `string` (nullable): Comment owner profile pic
    * **isVerified** `boolean`: Whether comment owner is verified
  * **likeCount** `number`: Comment like count
* **totalCount** `number`: Total number of comments

**Example Usage:**

```json
{
  "postUrl": "https://www.instagram.com/p/ABC123/"
}
```

***

## Common Use Cases

**Profile Analytics:**

* Track follower growth and engagement metrics
* Analyze profile completeness and verification status
* Monitor account privacy settings and relationship status

**Content Performance:**

* Analyze post engagement rates and media performance
* Track content types that perform best (photos, videos, carousels)
* Monitor posting frequency and optimal timing

**Community Engagement:**

* Analyze comment sentiment and user interactions
* Track comment engagement and response rates
* Monitor brand mentions and user-generated content

