> For the complete documentation index, see [llms.txt](https://docs.pullbay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pullbay.com/api-reference/instagram.md).

# Instagram

Instagram: users, posts, reels, stories, and comments.

## Resolve user ID from handle

> Returns whether the handle is available and, if it exists, the resolved Instagram user ID.

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramUserIdLookup":{"type":"object","description":"Result of resolving an Instagram user ID from a handle.","properties":{"isAvailable":{"type":"boolean"},"handle":{"type":"string"},"id":{"type":"string","description":"Present only when `isAvailable` is true."}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/userid/{handle}":{"get":{"operationId":"getInstagramUserIdByHandle","summary":"Resolve user ID from handle","description":"Returns whether the handle is available and, if it exists, the resolved Instagram user ID.","tags":["instagram"],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUserIdLookup"}},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get a user by handle

> Returns an Instagram user profile by handle (without \`@\`).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramUser":{"type":"object","description":"An Instagram user profile.","properties":{"type":{"type":"string"},"isAvailable":{"type":"boolean"},"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"biography":{"type":"string"},"profilePicUrl":{"type":"string"},"website":{"type":"string"},"category":{"type":"string"},"cityName":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"},"isBusiness":{"type":"boolean"},"hasVideos":{"type":"boolean"},"hasGuides":{"type":"boolean"},"postCount":{"type":"integer"},"followerCount":{"type":"integer"},"followingCount":{"type":"integer"},"totalReelsCount":{"type":"integer"},"bioLinks":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/handle/{handle}":{"get":{"operationId":"getInstagramUserByHandle","summary":"Get a user by handle","description":"Returns an Instagram user profile by handle (without `@`).","tags":["instagram"],"parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUser"}},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get a user by ID

> Returns an Instagram user profile by numeric user ID.

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramUser":{"type":"object","description":"An Instagram user profile.","properties":{"type":{"type":"string"},"isAvailable":{"type":"boolean"},"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"biography":{"type":"string"},"profilePicUrl":{"type":"string"},"website":{"type":"string"},"category":{"type":"string"},"cityName":{"type":"string","nullable":true},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"},"isBusiness":{"type":"boolean"},"hasVideos":{"type":"boolean"},"hasGuides":{"type":"boolean"},"postCount":{"type":"integer"},"followerCount":{"type":"integer"},"followingCount":{"type":"integer"},"totalReelsCount":{"type":"integer"},"bioLinks":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/{id}":{"get":{"operationId":"getInstagramUserById","summary":"Get a user by ID","description":"Returns an Instagram user profile by numeric user ID.","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUser"}},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get posts published by a user

> Returns posts published by an Instagram user. Use \`cursor\` to paginate or \`maxItems\` for a one-shot bulk pull (mutually exclusive).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramPost":{"type":"object","description":"An Instagram post (image, video, carousel, or reel).","properties":{"type":{"type":"string","description":"photo / video / carousel / reel"},"id":{"type":"string"},"code":{"type":"string"},"url":{"type":"string"},"caption":{"type":"string"},"createdAt":{"type":"integer","description":"Unix timestamp in seconds."},"likeCount":{"type":"integer"},"commentCount":{"type":"integer"},"isAvailable":{"type":"boolean"},"isCarousel":{"type":"boolean"},"isVideo":{"type":"boolean"},"isPinned":{"type":"boolean"},"isPaidPartnership":{"type":"boolean"},"isLikeAndViewCountsDisabled":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/InstagramPostOwner"},"coowners":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPostOwner"}},"location":{"type":"object","nullable":true,"additionalProperties":true},"image":{"type":"object","nullable":true,"additionalProperties":true},"video":{"type":"object","nullable":true,"additionalProperties":true},"audio":{"type":"object","nullable":true,"additionalProperties":true},"carouselMedia":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"InstagramPostOwner":{"type":"object","description":"Lightweight user reference embedded in posts and stories.","properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"hasNextPage":{"type":"boolean","nullable":true},"cursor":{"type":"string","nullable":true},"offset":{"type":"string","nullable":true,"description":"Numeric offset string for offset-paginated endpoints (e.g. Google Maps place search)."}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/{id}/posts":{"get":{"operationId":"getInstagramUserPosts","summary":"Get posts published by a user","description":"Returns posts published by an Instagram user. Use `cursor` to paginate or `maxItems` for a one-shot bulk pull (mutually exclusive).","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"maxItems","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get posts a user is tagged in

> Returns posts where the Instagram user is tagged. Use \`cursor\` to paginate or \`maxItems\` for a one-shot bulk pull (mutually exclusive).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramPost":{"type":"object","description":"An Instagram post (image, video, carousel, or reel).","properties":{"type":{"type":"string","description":"photo / video / carousel / reel"},"id":{"type":"string"},"code":{"type":"string"},"url":{"type":"string"},"caption":{"type":"string"},"createdAt":{"type":"integer","description":"Unix timestamp in seconds."},"likeCount":{"type":"integer"},"commentCount":{"type":"integer"},"isAvailable":{"type":"boolean"},"isCarousel":{"type":"boolean"},"isVideo":{"type":"boolean"},"isPinned":{"type":"boolean"},"isPaidPartnership":{"type":"boolean"},"isLikeAndViewCountsDisabled":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/InstagramPostOwner"},"coowners":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPostOwner"}},"location":{"type":"object","nullable":true,"additionalProperties":true},"image":{"type":"object","nullable":true,"additionalProperties":true},"video":{"type":"object","nullable":true,"additionalProperties":true},"audio":{"type":"object","nullable":true,"additionalProperties":true},"carouselMedia":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"InstagramPostOwner":{"type":"object","description":"Lightweight user reference embedded in posts and stories.","properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"hasNextPage":{"type":"boolean","nullable":true},"cursor":{"type":"string","nullable":true},"offset":{"type":"string","nullable":true,"description":"Numeric offset string for offset-paginated endpoints (e.g. Google Maps place search)."}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/{id}/posts/tagged":{"get":{"operationId":"getInstagramUserTaggedPosts","summary":"Get posts a user is tagged in","description":"Returns posts where the Instagram user is tagged. Use `cursor` to paginate or `maxItems` for a one-shot bulk pull (mutually exclusive).","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"maxItems","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get reels published by a user

> Returns reels published by an Instagram user. Use \`cursor\` to paginate or \`maxItems\` for a one-shot bulk pull (mutually exclusive).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramPost":{"type":"object","description":"An Instagram post (image, video, carousel, or reel).","properties":{"type":{"type":"string","description":"photo / video / carousel / reel"},"id":{"type":"string"},"code":{"type":"string"},"url":{"type":"string"},"caption":{"type":"string"},"createdAt":{"type":"integer","description":"Unix timestamp in seconds."},"likeCount":{"type":"integer"},"commentCount":{"type":"integer"},"isAvailable":{"type":"boolean"},"isCarousel":{"type":"boolean"},"isVideo":{"type":"boolean"},"isPinned":{"type":"boolean"},"isPaidPartnership":{"type":"boolean"},"isLikeAndViewCountsDisabled":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/InstagramPostOwner"},"coowners":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPostOwner"}},"location":{"type":"object","nullable":true,"additionalProperties":true},"image":{"type":"object","nullable":true,"additionalProperties":true},"video":{"type":"object","nullable":true,"additionalProperties":true},"audio":{"type":"object","nullable":true,"additionalProperties":true},"carouselMedia":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"InstagramPostOwner":{"type":"object","description":"Lightweight user reference embedded in posts and stories.","properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"hasNextPage":{"type":"boolean","nullable":true},"cursor":{"type":"string","nullable":true},"offset":{"type":"string","nullable":true,"description":"Numeric offset string for offset-paginated endpoints (e.g. Google Maps place search)."}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/{id}/reels":{"get":{"operationId":"getInstagramUserReels","summary":"Get reels published by a user","description":"Returns reels published by an Instagram user. Use `cursor` to paginate or `maxItems` for a one-shot bulk pull (mutually exclusive).","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"maxItems","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get active stories for a user

> Returns the user's currently-active Instagram stories (non-paginated).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramStory":{"type":"object","description":"A single Instagram story slide.","properties":{"type":{"type":"string","description":"photo / video"},"id":{"type":"string"},"code":{"type":"string"},"createdAt":{"type":"integer","description":"Unix timestamp in seconds."},"expiringAt":{"type":"integer","description":"Unix timestamp in seconds."},"duration":{"type":"number"},"hasAudio":{"type":"boolean"},"hasTranslation":{"type":"boolean"},"canReshare":{"type":"boolean"},"canReply":{"type":"boolean"},"isVideo":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/InstagramPostOwner"},"coowners":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPostOwner"}},"image":{"type":"object","nullable":true,"additionalProperties":true},"video":{"type":"object","nullable":true,"additionalProperties":true},"audio":{"type":"object","nullable":true,"additionalProperties":true},"link":{"type":"object","nullable":true,"additionalProperties":true},"comments":{"type":"array","items":{"type":"object","additionalProperties":true}},"mentions":{"type":"array","items":{"type":"object","additionalProperties":true}},"hashtags":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"InstagramPostOwner":{"type":"object","description":"Lightweight user reference embedded in posts and stories.","properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/user/{id}/stories":{"get":{"operationId":"getInstagramUserStories","summary":"Get active stories for a user","description":"Returns the user's currently-active Instagram stories (non-paginated).","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramStory"}},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get a post by shortcode

> Returns a single Instagram post by its shortcode (the segment after \`/p/\` in the URL).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramPost":{"type":"object","description":"An Instagram post (image, video, carousel, or reel).","properties":{"type":{"type":"string","description":"photo / video / carousel / reel"},"id":{"type":"string"},"code":{"type":"string"},"url":{"type":"string"},"caption":{"type":"string"},"createdAt":{"type":"integer","description":"Unix timestamp in seconds."},"likeCount":{"type":"integer"},"commentCount":{"type":"integer"},"isAvailable":{"type":"boolean"},"isCarousel":{"type":"boolean"},"isVideo":{"type":"boolean"},"isPinned":{"type":"boolean"},"isPaidPartnership":{"type":"boolean"},"isLikeAndViewCountsDisabled":{"type":"boolean"},"owner":{"$ref":"#/components/schemas/InstagramPostOwner"},"coowners":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPostOwner"}},"location":{"type":"object","nullable":true,"additionalProperties":true},"image":{"type":"object","nullable":true,"additionalProperties":true},"video":{"type":"object","nullable":true,"additionalProperties":true},"audio":{"type":"object","nullable":true,"additionalProperties":true},"carouselMedia":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"InstagramPostOwner":{"type":"object","description":"Lightweight user reference embedded in posts and stories.","properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isVerified":{"type":"boolean"},"isPrivate":{"type":"boolean"}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/post/code/{code}":{"get":{"operationId":"getInstagramPostByCode","summary":"Get a post by shortcode","description":"Returns a single Instagram post by its shortcode (the segment after `/p/` in the URL).","tags":["instagram"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```

## Get comments on a post

> Returns comments on an Instagram post. Use \`cursor\` to paginate or \`maxItems\` for a one-shot bulk pull (mutually exclusive).

```json
{"openapi":"3.0.3","info":{"title":"Pullbay API","version":"1.0.0"},"tags":[{"name":"instagram","description":"Instagram: users, posts, reels, stories, and comments."}],"servers":[{"url":"https://dashboard.pullbay.com/api"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InstagramComment":{"type":"object","description":"A comment on an Instagram post.","properties":{"type":{"type":"string"},"id":{"type":"string"},"userId":{"type":"string"},"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"likeCount":{"type":"integer"},"replyCount":{"type":"integer"},"isRanked":{"type":"boolean"},"user":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"username":{"type":"string"},"fullName":{"type":"string"},"profilePicUrl":{"type":"string"},"isPrivate":{"type":"boolean"},"isVerified":{"type":"boolean"}}}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"hasNextPage":{"type":"boolean","nullable":true},"cursor":{"type":"string","nullable":true},"offset":{"type":"string","nullable":true,"description":"Numeric offset string for offset-paginated endpoints (e.g. Google Maps place search)."}}},"Pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}},"ErrorEnvelope":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}}}},"paths":{"/instagram/post/{id}/comments":{"get":{"operationId":"getInstagramPostComments","summary":"Get comments on a post","description":"Returns comments on an Instagram post. Use `cursor` to paginate or `maxItems` for a one-shot bulk pull (mutually exclusive).","tags":["instagram"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"maxItems","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramComment"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"$ref":"#/components/schemas/Pricing"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pullbay.com/api-reference/instagram.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
