> 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.\
> \
> \*\*Cost: 50 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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."}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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.\n\n**Cost: 50 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUserIdLookup"}},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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 \`@\`).\
> \
> \*\*Cost: 100 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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}}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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 `@`).\n\n**Cost: 100 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUser"}},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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.\
> \
> \*\*Cost: 100 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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}}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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.\n\n**Cost: 100 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramUser"}},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 50 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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)."}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 50 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 150 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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)."}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 150 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 50 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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)."}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 50 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 50 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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"}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 50 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramStory"}},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 50 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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"}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 50 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramPost"}},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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).\
> \
> \*\*Cost: 75 credits/request + 1 credit/item\*\*

```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://api.pullbay.com"}],"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)."}}},"ErrorEnvelope":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"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).\n\n**Cost: 75 credits/request + 1 credit/item**","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":{"requestId":{"type":"string","format":"uuid"},"status":{"type":"integer"},"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramComment"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"pricing":{"type":"object","properties":{"creditsCharged":{"type":"number"}}}}}}}},"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"}}}}}}}}}
```
