Skip to main content

What it does

Returns a paginated list of posts from an Instagram user’s profile feed. Maximum 12 posts per page. Includes photos, videos, carousels, and engagement counts.

Tool details

FieldValue
Tool nameinstagram.get_user_posts
PlatformInstagram
REST endpointGET /v1/instagram/users/{username}/posts
Result typeCollection tool

Parameters

ParameterSourceTypeRequiredDescription
usernamepathstringYesInstagram username (with or without @ symbol)
countqueryintegerNoNumber of posts to fetch (maximum: 12) Default: 12.
cursorquerystringNoPagination cursor
projection_presetsharedstringNoOptional. Defaults to minimal. Allowed values: full, minimal, identity, engagement, content.
data_fieldssharedstring[]NoOptional. Adds top-level keys from data on top of the selected projection_preset.
item_fieldssharedstring[]NoOptional. Adds keys from data.orderedItems[] on top of the selected projection_preset.

Example

{
  "name": "instagram.get_user_posts",
  "arguments": {
    "username": "khaby.lame",
    "count": 12,
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "nextCursor",
      "cursor",
      "itemCount"
    ],
    "item_fields": [
      "totalItems",
      "entityId",
      "name",
      "published",
      "content"
    ]
  }
}

Available data fields

[
  "@context",
  "type",
  "partOf",
  "totalItems",
  "cursor",
  "nextCursor",
  "next",
  "itemCount",
  "orderedItems"
]

Available item fields

[
  "type",
  "id",
  "url",
  "entityId",
  "content",
  "published",
  "likeCount",
  "commentCount",
  "attributedTo",
  "location",
  "tag",
  "language",
  "isEdited",
  "isSponsored",
  "viewCount",
  "duration",
  "contentFormat",
  "attachment",
  "image",
  "audio",
  "name",
  "totalItems",
  "items"
]

Response notes

Successful calls return a JSON object with a top-level data field and, when available, metadata.creditsUsed and metadata.creditsRemaining. See response format, pagination, and credits.