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

# One page of the connected Instagram account's posts

> Lists the connected account's posts (newest first) with captions, permalinks, counters and album items, for picking posts into content blocks. Media URLs are short-lived signed links. Page with `next_page` = the previous `paging.cursors.after`. Read-only; one Instagram Graph call per request.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /instagram/{merchant_id}/media
openapi: 3.1.0
info:
  title: Search & Merchandising API
  version: 1.0.0
  description: >-
    REST API behind Depict: Search & Merchandising, the native Shopify app:
    onboarding, collections, boost & bury, dashboards, A/B testing and
    multi-store management. Endpoints are served under the /api/lite prefix and
    are authenticated with the Shopify session token that App Bridge issues to
    the embedded app.
servers:
  - url: /api/lite
security:
  - ShopifySessionToken: []
paths:
  /instagram/{merchant_id}/media:
    get:
      summary: One page of the connected Instagram account's posts
      description: >-
        Lists the connected account's posts (newest first) with captions,
        permalinks, counters and album items, for picking posts into content
        blocks. Media URLs are short-lived signed links. Page with `next_page` =
        the previous `paging.cursors.after`. Read-only; one Instagram Graph call
        per request.
      operationId: instagramMedia
      parameters:
        - schema:
            type: string
            description: Lite merchant id, e.g. `shopify-<shop id>`.
          required: true
          description: Lite merchant id, e.g. `shopify-<shop id>`.
          name: merchant_id
          in: path
        - schema:
            type: string
            description: '`paging.cursors.after` from the previous page.'
          required: false
          description: '`paging.cursors.after` from the previous page.'
          name: next_page
          in: query
      responses:
        '200':
          description: One page of posts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Media'
        '400':
          description: >-
            No Instagram account is connected, Instagram refused the stored
            login, or the stored login can no longer be read: reconnect
            Instagram.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '401':
          description: Not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: Merchant not found for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    Media:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MediaItem'
        paging:
          type:
            - object
            - 'null'
          properties:
            cursors:
              type: object
              properties:
                before:
                  type: string
                after:
                  type: string
                  description: Pass as `next_page` to read the next page.
              required:
                - before
                - after
          required:
            - cursors
      required:
        - data
        - paging
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    MediaItem:
      type: object
      properties:
        media_url:
          type:
            - string
            - 'null'
          description: Short-lived signed CDN URL; re-fetch rather than store.
        media_type:
          type: string
          enum:
            - IMAGE
            - VIDEO
            - CAROUSEL_ALBUM
        id:
          type: string
        caption:
          type:
            - string
            - 'null'
        permalink:
          type: string
        like_count:
          type:
            - number
            - 'null'
        username:
          type: string
        comments_count:
          type:
            - number
            - 'null'
        children:
          type:
            - object
            - 'null'
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/ChildMediaItem'
          required:
            - data
          description: The album's items, for a CAROUSEL_ALBUM.
      required:
        - media_url
        - media_type
        - id
        - caption
        - permalink
        - like_count
        - username
        - comments_count
        - children
    ChildMediaItem:
      type: object
      properties:
        media_url:
          type: string
        media_type:
          type: string
          enum:
            - IMAGE
            - VIDEO
        thumbnail_url:
          type:
            - string
            - 'null'
        id:
          type: string
      required:
        - media_url
        - media_type
        - thumbnail_url
        - id
  securitySchemes:
    ShopifySessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Shopify App Bridge session token of the embedded Depict: Search &
        Merchandising app. The shop in the token determines the merchant;
        merchant_id parameters must belong to that shop.

````