{
  "openapi": "3.1.0",
  "info": {
    "title": "Instagram API",
    "version": "1.0.0",
    "description": "An Instagram scraper API for public Instagram data: account profiles with their story highlights, an account’s posts, its reels with play counts, its active stories, one post or reel in full, the comments on a post and the replies to them, the reels Instagram lists as popular and the terms it is trending — as structured JSON, with cursor paging and a free URL parser."
  },
  "servers": [
    {
      "url": "https://api.fetchlayer.dev/instagram"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Every error, on every route. Branch on code and retryable rather than on the text; on a 5xx the text is generic. MCP tool errors carry the same fields in structuredContent, and as a JSON text block.",
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong, in words. For a 400, what to change."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status, repeated in the body."
          },
          "code": {
            "type": "string",
            "description": "The kind of error, stable: invalid_input, unauthorized, insufficient_credits, forbidden, not_found, expired, quota_exceeded, cancelled, time_limit, temporarily_unavailable, posts_unavailable, store_unreachable, upstream_error, internal_error, tool_error. A platform may add its own; more may be added. Treat a code you do not recognise by its retryable flag."
          },
          "retryable": {
            "type": "boolean",
            "description": "Whether asking again can succeed."
          },
          "requestId": {
            "type": "string",
            "description": "This request’s id, also sent as the X-Request-Id header. Quote it when reporting a problem."
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "With invalid_input when the request's parameters are refused before the request runs: the parameters that were missing. Always present on those errors, empty when nothing was missing."
          }
        },
        "required": [
          "error",
          "code",
          "retryable",
          "requestId"
        ]
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Send your FetchLayer key as Authorization: Bearer ss-your-key."
      }
    }
  },
  "paths": {
    "/user-profile": {
      "post": {
        "operationId": "user-profile",
        "tags": [
          "Accounts"
        ],
        "summary": "Get an Instagram account profile",
        "description": "One public Instagram account’s profile: name, bio and its links, avatar, verification, exact follower, following and post counts, whether a story is up, and the title and cover of every highlight. Use it to size up an account before reading its posts or stories. Pass a username or profile URL.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "A username with or without the @, or a profile URL. Give exactly one of username or userId: neither, or both, is a 400."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The account’s numeric id (profile.id), as a string of digits. Give this or username, not both. An id names the account even after it changes its username; an id that belongs to no account is a 404. Name the account with exactly one of username and userId; both or neither is a 400."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional extra fields. \"country\" fills profile.country, profile.dateJoined and profile.formerUsernameCount and adds about 1–2 seconds. \"native\" fills profile.native, the account’s full profile record under Instagram’s own field names; it adds about a second with username, and usually nothing with userId. Any other value is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "username": "@nasa",
                    "include": [
                      "country"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "restricted": {
                      "type": "boolean",
                      "description": "True for an account Instagram restricts — typically an age-restricted brand such as alcohol or cannabis — and false for every other. Such an account answers 200, not 404, with less detail. Its profile carries the name, avatar, follower, following and post counts, and the bio and bio links where available; verified, hasActiveStory and latestStoryAt are null."
                    },
                    "minimumAge": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The minimum age Instagram states for a restricted account, or null when it states none (and on every other account)."
                    },
                    "profile": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Instagram’s numeric account id."
                        },
                        "username": {
                          "type": "string",
                          "description": "The handle, without the @. Former usernames are not returned."
                        },
                        "url": {
                          "type": "string",
                          "description": "Canonical profile URL."
                        },
                        "fullName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The display name."
                        },
                        "biography": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The bio text."
                        },
                        "profilePicUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Avatar image. Pass it to GET /media to re-fetch it after Instagram’s signed link expires."
                        },
                        "verified": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Whether Instagram shows the verification badge. Null for a restricted account."
                        },
                        "privateAccount": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Whether the account is private. A private account still returns this profile; its posts are withheld."
                        },
                        "memorialized": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Whether the account is memorialised."
                        },
                        "pronouns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The pronouns on the profile, where set."
                        },
                        "badges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "Badges Instagram shows on the profile."
                        },
                        "hasReels": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Whether the account publishes reels — i.e. whether user-reels will return anything."
                        },
                        "textAppUsername": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The linked Threads handle, or null."
                        },
                        "hasActiveStory": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "true when the account has a story up now, false when it has none. Null when Instagram does not say, which is the case for private and restricted accounts."
                        },
                        "latestStoryAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ISO 8601 timestamp of the account’s latest story, or null in the same cases as hasActiveStory."
                        },
                        "country": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Where the account is based, as Instagram states it (e.g. \"United States\"). Null unless include lists \"country\", and the note says so; also null when the account does not show it, or when it is temporarily unavailable, and the note says which. A retry usually fills a temporarily unavailable one."
                        },
                        "dateJoined": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The month the account joined Instagram, as YYYY-MM (e.g. \"2013-08\"). Null unless include lists \"country\", and the note says so."
                        },
                        "formerUsernameCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "How many usernames the account has had before this one, from the same About-this-account panel as country and dateJoined. Only with include [\"country\"]: 0 when the panel was read and shows no former usernames, a count when it shows some, null when country was not requested or the panel was temporarily unavailable. Only the count is returned, not the names. Markdown output renders it as \"Former usernames: N\"."
                        },
                        "aboutUnavailableReason": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Only with include [\"country\"]: null when the About section was read and country and dateJoined answered; otherwise {code, retryable} saying why country is empty, matching the note. temporarily-unavailable (retryable true): the About section could not be read this time, so country, dateJoined and formerUsernameCount are null; retry. time-limit (retryable true): it did not arrive within timeoutMs, with the same nulls; retry or allow more time. not-shown (retryable false): Instagram shows no country for this account; dateJoined and formerUsernameCount are still filled. not-shared (retryable false): the account does not share where it is based; dateJoined and formerUsernameCount are still filled. Absent when country is not requested. Markdown output is unchanged; the notes say the same in words."
                        },
                        "native": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Only with include [\"native\"]: the account’s full profile record as Instagram publishes it, field for field under Instagram’s own field names — account_type (1 personal, 2 business, 3 creator), category, public_email, public_phone_number, the address fields, hd_profile_pic_url_info, bio_links with link_id, fbid_v2 and more, around 240 fields. Every id is an exact string; an empty string means the account has not published that detail. Null when not available this time (the note says so, and nativeUnavailableReason says why); absent without the include."
                        },
                        "nativeUnavailableReason": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it). Naming the account by userId makes the record faster to get.",
                          "properties": {
                            "retryAfterMs": {
                              "type": "integer",
                              "description": "Present when the record is expected to be ready soon: retry after this many ms (at least 1000). Absent otherwise. Only with code \"temporarily-unavailable\"."
                            }
                          }
                        },
                        "stats": {
                          "type": "object",
                          "properties": {
                            "followerCount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Followers, as Instagram publishes it."
                            },
                            "followingCount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Accounts this one follows."
                            },
                            "postCount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "The exact number of posts, private accounts included. Never rounded: null on the rare request where only a rounded figure is available, with the rounded figure in notes; a retry usually returns the exact one. It adds about a second to the call, and up to about five for an account with more than 10,000 posts."
                            }
                          },
                          "additionalProperties": true
                        },
                        "bioLinks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "title, url, linkType and pinned. Unwrapped to their real destinations rather than Instagram’s tracking links."
                        },
                        "highlights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "id, title and coverUrl for every story highlight on the profile. The contents of a highlight are not public."
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [],
                      "pagesFetched": 1,
                      "restricted": false,
                      "minimumAge": null,
                      "profile": {
                        "id": "528817151",
                        "username": "nasa",
                        "url": "https://www.instagram.com/nasa/",
                        "fullName": "NASA",
                        "biography": "Making the seemingly impossible, possible. ✨",
                        "profilePicUrl": "https://scontent-fra5-1.cdninstagram.com/v/t51.2885-19/...",
                        "verified": true,
                        "privateAccount": false,
                        "memorialized": false,
                        "pronouns": [],
                        "badges": [],
                        "hasReels": true,
                        "textAppUsername": "nasa",
                        "hasActiveStory": true,
                        "latestStoryAt": "2026-10-12T21:47:37.000Z",
                        "country": "United States",
                        "dateJoined": "2013-08",
                        "formerUsernameCount": 0,
                        "aboutUnavailableReason": null,
                        "stats": {
                          "followerCount": 104352683,
                          "followingCount": 91,
                          "postCount": 4963
                        },
                        "bioLinks": [
                          {
                            "title": "NASA.gov Homepage",
                            "url": "https://www.nasa.gov",
                            "linkType": "external",
                            "pinned": false
                          },
                          {
                            "title": "NASA Internships",
                            "url": "http://intern.nasa.gov",
                            "linkType": "external",
                            "pinned": false
                          }
                        ],
                        "highlights": [
                          {
                            "id": "18195781759377100",
                            "title": "Roman",
                            "coverUrl": "https://scontent-fra5-1.cdninstagram.com/v/t51.71878-15/..."
                          },
                          {
                            "id": "18123023338592759",
                            "title": "Wallpapers",
                            "coverUrl": "https://scontent-fra5-1.cdninstagram.com/v/t51.71878-15/..."
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/user-posts": {
      "post": {
        "operationId": "user-posts",
        "tags": [
          "Accounts"
        ],
        "summary": "List an account’s posts",
        "description": "The posts a public Instagram account has published, newest first, each with its date, like, comment and play counts, caption and media. Pass a username or profile URL, or the account’s numeric userId. Paged: 12 posts per page, 1 credit per page fetched.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "A username with or without the @, or a profile URL. Give exactly one of username or userId: neither, or both, is a 400."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The account’s numeric id (profile.id), as a string of digits. Give this or username, not both. An id names the account even after it changes its username; an id that belongs to no account is a 404. Name the account with exactly one of username and userId; both or neither is a 400."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional extra counts: any of \"reposts\", \"shares\" and \"saves\". \"reposts\" fills repostCount on every kind of post; \"shares\" and \"saves\" fill shareCount and saveCount on reels and videos (photos and carousels have none). It fills them on every post of the page and adds a few seconds per page, usually 2 to 8. A count you asked for is never silently empty: when it is not available for some posts, the note names them — \"The repost, share and save counts asked for are not available for these posts in this response, so they are empty: <short codes>. Asking again, or post-detail with include, returns them.\" The price is unchanged: 1 credit per page fetched. Without include the three are null and the note says so. \"native\" adds each post’s native record, the account’s own record (account) and the page’s paging fields (nativePageInfo), on every page, about a second more per 24 posts, at the same price. \"taggedUsers\" (with \"native\") adds the tagged accounts to reels that have them, in taggedUsers and native.usertags: about 1 to 2 seconds more on a page with tagged reels. A reel whose tags could not be read in time names \"taggedUsers\" in its missingFields. Any other value is a 400; \"country\" belongs to user-profile."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Maximum items returned, up to 240. Use -1 for the maximum. Without it, every item on the pages fetched comes back, 12 a page (pages: 2 alone returns 24). A limit takes as many pages as it needs: a limit of 60 takes five pages and costs five credits.",
                    "example": "every item on the pages fetched, 12 a page"
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of results to return in one request, up to 20. Use -1 for the maximum. Instagram serves 12 items per page and each page fetched is 1 credit, so a call costs the pages it fetches — set by pages, or by how many pages a limit needs — not the number of items returned. The response reports them as pagesFetched. A page takes about 2–4 seconds without include.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor. Send it back to the same route, with the same account, that produced it; a cursor from another route or another account, or a malformed one, is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "username": "@nasa",
                    "limit": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "restricted": {
                      "type": "boolean",
                      "description": "True for an account Instagram restricts — typically an age-restricted brand such as alcohol or cannabis — and false for every other. Such an account answers 200, not 404, with less detail. It returns its basic profile and up to 12 recent posts with like and comment counts and dates; it cannot be paged further, and play counts are not available for it."
                    },
                    "minimumAge": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The minimum age Instagram states for a restricted account, or null when it states none (and on every other account)."
                    },
                    "profile": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": true,
                      "description": "For a restricted account, its basic profile in the user-profile shape. Null for every other account."
                    },
                    "username": {
                      "type": "string",
                      "description": "The account the posts belong to."
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact media id, as a string: it is a 64-bit number, larger than a JSON number can carry exactly, so keep it as a string. post-detail and post-comments accept it as post."
                          },
                          "shortcode": {
                            "type": "string",
                            "description": "The code in the post URL. post-detail and post-comments both accept it."
                          },
                          "url": {
                            "type": "string",
                            "description": "Canonical link to the post or reel."
                          },
                          "kind": {
                            "type": "string",
                            "description": "image, video or carousel."
                          },
                          "productType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What Instagram calls the surface — \"feed\" for a grid post, \"clips\" for a reel — or null."
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The author’s own written post body, or null. This is a caption, not a transcript: Instagram publishes no transcript of spoken audio."
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 timestamp, or null: always null on reels-feed, and null on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "likeCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Likes, or null: always null on reels-feed, null on a listing record whose fieldsFrom is \"listing\", and absent when countsHidden is true."
                          },
                          "commentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The comment count Instagram shows. Includes Facebook comments when the split is available (instagramCommentCount/facebookCommentCount set); otherwise the Instagram-only figure, with both split fields null. Since 2026-11-05, commentCount includes comments on the Facebook cross-post where available; instagramCommentCount is the Instagram-only figure. Null in the same cases as likeCount, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "instagramCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on Instagram, replies included. Always present; null when Instagram does not report the split, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "facebookCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on the post’s Facebook copy: 0 on a post not shared to Facebook. Always present; null when Instagram does not report it, and commentCount is then the comments made on Instagram only."
                          },
                          "commentCountUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Always present alongside instagramCommentCount and facebookCommentCount: null when commentCount is the total Instagram shows (the split itself can still be null), otherwise {code, retryable} saying why it is not, matching the note. total-unavailable (retryable true): the total could not be read this time, so commentCount is the comments made on Instagram as Instagram publishes them, which can be lower; asking again usually returns it. time-limit (retryable true): the total was not read in the time available, so commentCount is as for total-unavailable; asking again, or allowing more timeoutMs, usually returns it. not-provided (retryable false, and not an error): this response carries only Instagram’s own count for the post, so commentCount is the comments made on Instagram as Instagram publishes them, or empty; asking again returns the same. Request the post on post-detail for the full total where it is available. total-unavailable and time-limit occur on post-detail only."
                          },
                          "playCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Instagram plays on a video or reel: the view count Instagram shows on it, the same figure on listings and on post-detail (plays on Facebook are not included). Null for photos and carousels, whose views Instagram does not make public, and for posts from a restricted account. On post-detail it can occasionally be null for a video; the note says so, and a retry usually returns it."
                          },
                          "videoDuration": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Length of a video or reel in seconds, with decimals. Null for a photo or carousel (each carousel frame carries its own carousel[].videoDuration), on reels-feed, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "shareCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was shared, as Instagram counts it under a reel. Filled when include lists \"shares\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels. Also null — not 0 — when the account hides it, and the note says so."
                          },
                          "repostCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was reposted to other accounts’ profiles. Filled when include lists \"reposts\" (post-detail, user-posts, user-reels); every kind of post."
                          },
                          "saveCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was saved. Filled when include lists \"saves\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels."
                          },
                          "countsHidden": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True when the account has turned like and view counts off. The counts are then absent rather than zero."
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel width, or null where the record does not carry it."
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel height, or null where the record does not carry it."
                          },
                          "altText": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s own auto-generated image description (\"Photo by NASA on August 19, 2026. May be an image of text.\"), or null. Machine-written alt text, not a caption and not a transcript."
                          },
                          "thumbnailUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview frame, or null."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "downloadUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Pass it to GET /media to stream the bytes. Instagram’s own links are signed and expire; this one keeps working."
                                }
                              }
                            },
                            "description": "Ordered and de-duplicated renditions, each with kind, url, width, height and downloadUrl."
                          },
                          "carousel": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "One entry per frame of a carousel, each with its own renditions and, for a video frame, its own videoDuration. Empty for a single image or video."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl. Fields Instagram does not publish on a listing are null."
                          },
                          "coauthors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts credited as co-authors of a collab post."
                          },
                          "taggedUsers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts tagged in the image."
                          },
                          "location": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The place the post was tagged at, or null."
                          },
                          "hashtags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Without the #."
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Usernames without the @."
                          },
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Instagram’s own subject labels for the post (\"jwst\", \"star birth\"), where it publishes them."
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether the video carries audio, or null."
                          },
                          "fieldsFrom": {
                            "type": "string",
                            "description": "Which shape this record has, so a null count is never mistaken for a zero. \"detail\" is a full post, from post-detail. \"listing_full\" is a listing record with its posting date and counts, which is what user-posts and user-reels return. \"listing\" is a record without them: every reel on reels-feed, and on user-posts or user-reels only a post that is named in the note by short code, with the fields it lacks. Asking again with include returns them, and so does post-detail."
                          },
                          "audio": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The sound on a video or reel, where Instagram publishes it with the post; null otherwise. Ids are exact strings.",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Instagram’s label for the sound, e.g. original_sounds or licensed_music."
                              },
                              "originalSoundTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The title of an original sound, e.g. Original audio."
                              },
                              "artistUsername": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The account an original sound is credited to."
                              },
                              "durationMs": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Length of the sound in milliseconds."
                              },
                              "audioAssetId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The sound’s own id."
                              },
                              "canonicalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The id Instagram groups uses of the same sound under."
                              },
                              "songTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the song’s title. Null for an original sound, or a song Instagram no longer makes available."
                              },
                              "songArtist": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the artist as Instagram shows it."
                              },
                              "isExplicit": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Licensed music: whether Instagram marks the song explicit. Null when there are no song details."
                              },
                              "audioClusterId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the id Instagram groups every use of the song under."
                              }
                            }
                          },
                          "fullId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s full id for the post, <id>_<author id>. Null when the author’s id is not known."
                          },
                          "videoDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The first video’s downloadUrl, for GET /media, valid as long as its own link. Null for a photo, or when this response has no video link for the post."
                          },
                          "thumbnailDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "thumbnailUrl as a downloadUrl for GET /media, valid as long as thumbnailUrl is."
                          },
                          "brandedContent": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The paid-partnership label, and how far the accounts a post names are known in this response. Each status is found (present), not-published (Instagram shows none) or not-looked-up (not known in this response — never a statement that there is none). Sponsor accounts are not returned.",
                            "properties": {
                              "isPaidPartnership": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Instagram’s paid-partnership label. Null when not known in this response."
                              },
                              "paidPartnershipStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for isPaidPartnership."
                              },
                              "coauthorsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for coauthors."
                              },
                              "taggedUsersStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for taggedUsers."
                              },
                              "captionTagsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for hashtags and mentions, which come from the caption and carry no account ids."
                              }
                            }
                          },
                          "missingFields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The fields this post still lacks in this response, empty when it has them all: any of createdAt, caption, likeCount, commentCount, playCount, videoDuration, width, height and videoUrl (no video link in assets), and on user-posts and user-reels taggedUsers when include asked for it and the tags could not be read in time. A field the post really has none of — no caption, a count the account turned off — is not listed. More values may be added."
                          },
                          "native": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: the post’s full record as Instagram publishes it, field for field under Instagram’s own field names, with every id an exact string. A post that came as a short record is completed too. Null when not available this time (nativeUnavailableReason says why); absent without the include."
                          },
                          "nativeUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it), or capacity (full records are temporarily unavailable for this request; retry shortly). All are retryable, and the rest of the response is unaffected."
                          }
                        }
                      },
                      "description": "The posts, newest first, pinned posts first on page one. Each normally carries its date, like and comment counts, and for a video its play count, length and video links; with include every post does. A post still missing one of them is named in the note by short code, with the fields it lacks; asking again with include returns them, and so does post-detail. Empty for a private account, with the note \"This account is private, so its posts and reels are not public.\""
                    },
                    "account": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Only with include [\"native\"], on every page: the account the posts belong to. Absent without the include.",
                      "properties": {
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The account’s numeric id, as an exact string."
                        },
                        "username": {
                          "type": "string",
                          "description": "The account’s username."
                        },
                        "native": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "The account’s full profile record under Instagram’s own field names, as user-profile returns it in profile.native. Null when not available this time (the note says so, and nativeUnavailableReason says why)."
                        },
                        "nativeUnavailableReason": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Null when native is present, otherwise {code, retryable}: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it), or capacity (full records are temporarily unavailable for this request; retry shortly)."
                        }
                      }
                    },
                    "nativePageInfo": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": true,
                      "description": "Only with include [\"native\"], on every page: the paging fields Instagram sent with the page this answer ends on, under Instagram’s own field names (whether more follow, how many came), for reference only — continue with nextCursor. Null when they could not be read, with nativePageInfoUnavailableReason saying why; absent without the include."
                    },
                    "nativePageInfoUnavailableReason": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": true,
                      "description": "Only with include [\"native\"]: null when nativePageInfo is present, otherwise {code, retryable} saying why nativePageInfo is null. temporarily-unavailable: the page’s own paging fields could not be read for this response. On a private account, or an account with no posts, Instagram publishes no such fields, so nativePageInfo stays null when you ask again; on other accounts it is transient, and asking for the same cursor again usually returns it. time-limit: the time limit you sent (timeoutMs) ran out before they were read; allow more time. capacity: they could not be read for this request right now; retry shortly. Restricted (age-limited) accounts never have them."
                    },
                    "status": {
                      "type": "string",
                      "description": "What the answer amounts to. ok: what was asked for (a continuation past the last page is ok with no posts). partial: something is missing; partialReasons says what. empty: the account has nothing in this list. private: the account is private. restricted: Instagram restricts the account. More values may be added; treat one you do not recognise as partial."
                    },
                    "partialReasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Why the answer is partial; empty otherwise. time_limit: timeoutMs ran out; continue with nextCursor. stopped_early: a later page was not returned; continue with nextCursor. fields_missing: some posts lack a field, named in each post’s missingFields. counts_unavailable: some counts asked for with include are empty. More values may be added."
                    },
                    "complete": {
                      "type": "boolean",
                      "description": "True when every post returned has every field you can rely on; otherwise each post’s missingFields names what is missing."
                    },
                    "stopReason": {
                      "type": "string",
                      "description": "Why the list stopped where it did. exhausted: nothing after it (hasMore false). page_limit: the limit or pages asked for were reached. time_limit: timeoutMs ran out. upstream_stopped: a later page was not returned. Continue with nextCursor for every value but exhausted. More values may be added."
                    },
                    "postCount": {
                      "type": "number",
                      "description": "How many items are in this response."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more results exist beyond what was returned."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque value to pass back as cursor, to the same route (and the same account on an account listing), to continue. null when there is nothing further."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "repostCount, shareCount and saveCount are empty unless \"reposts\", \"shares\" or \"saves\" is listed in include.",
                        "More results are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 1,
                      "posts": [
                        {
                          "id": "3967213292204992434",
                          "shortcode": "DcOX3hWFiey",
                          "url": "https://www.instagram.com/p/DcOX3hWFiey/",
                          "kind": "image",
                          "productType": "feed",
                          "caption": "With your powers combined…\n\nThis colorful picture of the cosmos is the product of teamwork between our @NASAHubble, @NASAWebb, and @NASAChandraXray telescopes. …",
                          "createdAt": "2026-08-19T14:11:47.000Z",
                          "likeCount": 573281,
                          "commentCount": 4334,
                          "playCount": null,
                          "videoDuration": null,
                          "shareCount": null,
                          "repostCount": null,
                          "saveCount": null,
                          "countsHidden": false,
                          "width": 1280,
                          "height": 1129,
                          "altText": null,
                          "thumbnailUrl": "https://scontent-muc2-1.cdninstagram.com/v/t51.82787-15/...",
                          "assets": [
                            {
                              "kind": "image",
                              "url": "https://scontent-muc2-1.cdninstagram.com/v/t51.82787-15/...",
                              "width": 1080,
                              "height": 953,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            }
                          ],
                          "carousel": [],
                          "author": {
                            "id": "528817151",
                            "username": "nasa",
                            "fullName": "NASA",
                            "profilePicUrl": "https://scontent-muc2-1.cdninstagram.com/v/t51.2885-19/...",
                            "verified": true,
                            "privateAccount": false,
                            "profileUrl": "https://www.instagram.com/nasa/"
                          },
                          "coauthors": [],
                          "taggedUsers": [],
                          "location": null,
                          "hashtags": [
                            "nasa",
                            "universe",
                            "nebula"
                          ],
                          "mentions": [
                            "nasahubble",
                            "nasawebb",
                            "nasachandraxray"
                          ],
                          "topics": [],
                          "hasAudio": null,
                          "fieldsFrom": "listing_full"
                        }
                      ],
                      "postCount": 12,
                      "hasMore": true,
                      "nextCursor": "528817151:4006570159456294956_582986390",
                      "restricted": false,
                      "minimumAge": null,
                      "profile": null,
                      "username": "nasa"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/user-reels": {
      "post": {
        "operationId": "user-reels",
        "tags": [
          "Accounts"
        ],
        "summary": "List an account’s reels",
        "description": "The reels a public Instagram account has published, newest first, each with its play, like and comment counts — the cheapest way to see what an account’s videos reach without a detail call per reel. Pass a username or profile URL. Paged: 12 reels per page, 1 credit per page fetched.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "A username with or without the @, or a profile URL. Give exactly one of username or userId: neither, or both, is a 400."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The account’s numeric id (profile.id), as a string of digits. Give this or username, not both. An id names the account even after it changes its username; an id that belongs to no account is a 404. Name the account with exactly one of username and userId; both or neither is a 400."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional extra counts: any of \"reposts\", \"shares\" and \"saves\". \"reposts\" fills repostCount on every kind of post; \"shares\" and \"saves\" fill shareCount and saveCount on reels and videos (photos and carousels have none). It fills them on every post of the page and adds a few seconds per page, usually 2 to 8. A count you asked for is never silently empty: when it is not available for some posts, the note names them — \"The repost, share and save counts asked for are not available for these posts in this response, so they are empty: <short codes>. Asking again, or post-detail with include, returns them.\" The price is unchanged: 1 credit per page fetched. Without include the three are null and the note says so. \"native\" adds each reel’s native record (below), about a second more per 24 reels, at the same price. \"taggedUsers\" (with \"native\") adds the tagged accounts to reels that have them, in taggedUsers and native.usertags: about 1 to 2 seconds more on a page with tagged reels. A reel whose tags could not be read in time names \"taggedUsers\" in its missingFields. Any other value is a 400; \"country\" belongs to user-profile."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Maximum items returned, up to 240. Use -1 for the maximum. Without it, every item on the pages fetched comes back, 12 a page (pages: 2 alone returns 24). A limit takes as many pages as it needs: a limit of 60 takes five pages and costs five credits.",
                    "example": "every item on the pages fetched, 12 a page"
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of results to return in one request, up to 20. Use -1 for the maximum. Instagram serves 12 items per page and each page fetched is 1 credit, so a call costs the pages it fetches — set by pages, or by how many pages a limit needs — not the number of items returned. The response reports them as pagesFetched.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor. Send it back to the same route, with the same account, that produced it; a cursor from another route or another account, or a malformed one, is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "username": "@nasa",
                    "limit": 12,
                    "include": [
                      "reposts",
                      "shares",
                      "saves"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "restricted": {
                      "type": "boolean",
                      "description": "True for an account Instagram restricts — typically an age-restricted brand such as alcohol or cannabis — and false for every other. Such an account answers 200, not 404, with less detail. It returns the account’s video posts."
                    },
                    "minimumAge": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The minimum age Instagram states for a restricted account, or null when it states none (and on every other account)."
                    },
                    "username": {
                      "type": "string",
                      "description": "The account the reels belong to."
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact media id, as a string: it is a 64-bit number, larger than a JSON number can carry exactly, so keep it as a string. post-detail and post-comments accept it as post."
                          },
                          "shortcode": {
                            "type": "string",
                            "description": "The code in the post URL. post-detail and post-comments both accept it."
                          },
                          "url": {
                            "type": "string",
                            "description": "Canonical link to the post or reel."
                          },
                          "kind": {
                            "type": "string",
                            "description": "image, video or carousel."
                          },
                          "productType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What Instagram calls the surface — \"feed\" for a grid post, \"clips\" for a reel — or null."
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The author’s own written post body, or null. This is a caption, not a transcript: Instagram publishes no transcript of spoken audio."
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 timestamp, or null: always null on reels-feed, and null on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "likeCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Likes, or null: always null on reels-feed, null on a listing record whose fieldsFrom is \"listing\", and absent when countsHidden is true."
                          },
                          "commentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The comment count Instagram shows. Includes Facebook comments when the split is available (instagramCommentCount/facebookCommentCount set); otherwise the Instagram-only figure, with both split fields null. Since 2026-11-05, commentCount includes comments on the Facebook cross-post where available; instagramCommentCount is the Instagram-only figure. Null in the same cases as likeCount, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "instagramCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on Instagram, replies included. Always present; null when Instagram does not report the split, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "facebookCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on the post’s Facebook copy: 0 on a post not shared to Facebook. Always present; null when Instagram does not report it, and commentCount is then the comments made on Instagram only."
                          },
                          "commentCountUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Always present alongside instagramCommentCount and facebookCommentCount: null when commentCount is the total Instagram shows (the split itself can still be null), otherwise {code, retryable} saying why it is not, matching the note. total-unavailable (retryable true): the total could not be read this time, so commentCount is the comments made on Instagram as Instagram publishes them, which can be lower; asking again usually returns it. time-limit (retryable true): the total was not read in the time available, so commentCount is as for total-unavailable; asking again, or allowing more timeoutMs, usually returns it. not-provided (retryable false, and not an error): this response carries only Instagram’s own count for the post, so commentCount is the comments made on Instagram as Instagram publishes them, or empty; asking again returns the same. Request the post on post-detail for the full total where it is available. total-unavailable and time-limit occur on post-detail only."
                          },
                          "playCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Instagram plays on a video or reel: the view count Instagram shows on it, the same figure on listings and on post-detail (plays on Facebook are not included). Null for photos and carousels, whose views Instagram does not make public, and for posts from a restricted account. On post-detail it can occasionally be null for a video; the note says so, and a retry usually returns it."
                          },
                          "videoDuration": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Length of a video or reel in seconds, with decimals. Null for a photo or carousel (each carousel frame carries its own carousel[].videoDuration), on reels-feed, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "shareCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was shared, as Instagram counts it under a reel. Filled when include lists \"shares\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels. Also null — not 0 — when the account hides it, and the note says so."
                          },
                          "repostCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was reposted to other accounts’ profiles. Filled when include lists \"reposts\" (post-detail, user-posts, user-reels); every kind of post."
                          },
                          "saveCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was saved. Filled when include lists \"saves\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels."
                          },
                          "countsHidden": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True when the account has turned like and view counts off. The counts are then absent rather than zero."
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel width, or null where the record does not carry it."
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel height, or null where the record does not carry it."
                          },
                          "altText": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s own auto-generated image description (\"Photo by NASA on August 19, 2026. May be an image of text.\"), or null. Machine-written alt text, not a caption and not a transcript."
                          },
                          "thumbnailUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview frame, or null."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "downloadUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Pass it to GET /media to stream the bytes. Instagram’s own links are signed and expire; this one keeps working."
                                }
                              }
                            },
                            "description": "Ordered and de-duplicated renditions, each with kind, url, width, height and downloadUrl."
                          },
                          "carousel": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "One entry per frame of a carousel, each with its own renditions and, for a video frame, its own videoDuration. Empty for a single image or video."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl. Fields Instagram does not publish on a listing are null."
                          },
                          "coauthors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts credited as co-authors of a collab post."
                          },
                          "taggedUsers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts tagged in the image."
                          },
                          "location": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The place the post was tagged at, or null."
                          },
                          "hashtags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Without the #."
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Usernames without the @."
                          },
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Instagram’s own subject labels for the post (\"jwst\", \"star birth\"), where it publishes them."
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether the video carries audio, or null."
                          },
                          "fieldsFrom": {
                            "type": "string",
                            "description": "Which shape this record has, so a null count is never mistaken for a zero. \"detail\" is a full post, from post-detail. \"listing_full\" is a listing record with its posting date and counts, which is what user-posts and user-reels return. \"listing\" is a record without them: every reel on reels-feed, and on user-posts or user-reels only a post that is named in the note by short code, with the fields it lacks. Asking again with include returns them, and so does post-detail."
                          },
                          "audio": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The sound on a video or reel, where Instagram publishes it with the post; null otherwise. Ids are exact strings.",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Instagram’s label for the sound, e.g. original_sounds or licensed_music."
                              },
                              "originalSoundTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The title of an original sound, e.g. Original audio."
                              },
                              "artistUsername": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The account an original sound is credited to."
                              },
                              "durationMs": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Length of the sound in milliseconds."
                              },
                              "audioAssetId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The sound’s own id."
                              },
                              "canonicalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The id Instagram groups uses of the same sound under."
                              },
                              "songTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the song’s title. Null for an original sound, or a song Instagram no longer makes available."
                              },
                              "songArtist": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the artist as Instagram shows it."
                              },
                              "isExplicit": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Licensed music: whether Instagram marks the song explicit. Null when there are no song details."
                              },
                              "audioClusterId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the id Instagram groups every use of the song under."
                              }
                            }
                          },
                          "fullId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s full id for the post, <id>_<author id>. Null when the author’s id is not known."
                          },
                          "videoDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The first video’s downloadUrl, for GET /media, valid as long as its own link. Null for a photo, or when this response has no video link for the post."
                          },
                          "thumbnailDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "thumbnailUrl as a downloadUrl for GET /media, valid as long as thumbnailUrl is."
                          },
                          "brandedContent": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The paid-partnership label, and how far the accounts a post names are known in this response. Each status is found (present), not-published (Instagram shows none) or not-looked-up (not known in this response — never a statement that there is none). Sponsor accounts are not returned.",
                            "properties": {
                              "isPaidPartnership": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Instagram’s paid-partnership label. Null when not known in this response."
                              },
                              "paidPartnershipStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for isPaidPartnership."
                              },
                              "coauthorsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for coauthors."
                              },
                              "taggedUsersStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for taggedUsers."
                              },
                              "captionTagsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for hashtags and mentions, which come from the caption and carry no account ids."
                              }
                            }
                          },
                          "missingFields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The fields this post still lacks in this response, empty when it has them all: any of createdAt, caption, likeCount, commentCount, playCount, videoDuration, width, height and videoUrl (no video link in assets), and on user-posts and user-reels taggedUsers when include asked for it and the tags could not be read in time. A field the post really has none of — no caption, a count the account turned off — is not listed. More values may be added."
                          },
                          "isPinned": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True for a reel the account has pinned to the top of its reels, false otherwise, null when Instagram does not say. Pinned reels come first on page one and are never repeated on a later page."
                          },
                          "native": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: the reel’s full record as Instagram publishes it, field for field under Instagram’s own field names, with every id an exact string — among others the full id, code, posting time, original size, length, every rendition, the Instagram-only, total and Facebook play counts, like, comment, share, save and repost counts, co-authors, the paid-partnership label and the sound. Null when not available this time (nativeUnavailableReason says why); absent without the include."
                          },
                          "nativeUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it), or capacity (full records are temporarily unavailable for this request; retry shortly). All are retryable, and the rest of the response is unaffected."
                          }
                        }
                      },
                      "description": "The reels, newest first — each with playCount, likeCount and commentCount filled in. Each normally also carries its date, videoDuration, caption and video links (fieldsFrom \"listing_full\"), and with include every reel does. A reel still missing one of them is named in the note by short code, with the fields it lacks; asking again with include returns them, and so does post-detail. Empty for a private account, with the note \"This account is private, so its posts and reels are not public.\" When timeoutMs runs short, only the leading reels that are complete come back — possibly none, as an empty list that is still a 200 — with status partial, partialReasons [time_limit], stopReason time_limit and a nextCursor at the first reel not yet complete, so the next call returns it complete and nothing is skipped or repeated. The one exception: a reel deleted between calls can make one reel repeat or be passed over."
                    },
                    "status": {
                      "type": "string",
                      "description": "What the answer amounts to. ok: what was asked for (a continuation past the last page is ok with no posts). partial: something is missing; partialReasons says what. empty: the account has nothing in this list. private: the account is private. restricted: Instagram restricts the account. More values may be added; treat one you do not recognise as partial."
                    },
                    "partialReasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Why the answer is partial; empty otherwise. time_limit: timeoutMs ran out; continue with nextCursor. stopped_early: a later page was not returned; continue with nextCursor. fields_missing: some posts lack a field, named in each post’s missingFields. counts_unavailable: some counts asked for with include are empty. More values may be added."
                    },
                    "complete": {
                      "type": "boolean",
                      "description": "True when every page asked for was read and every reel returned is complete (its missingFields is empty)."
                    },
                    "stopReason": {
                      "type": "string",
                      "description": "Why the list stopped where it did. exhausted: nothing after it (hasMore false). page_limit: the limit or pages asked for were reached. time_limit: timeoutMs ran out. upstream_stopped: a later page was not returned. Continue with nextCursor for every value but exhausted. More values may be added."
                    },
                    "postCount": {
                      "type": "number",
                      "description": "How many items are in this response."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more results exist beyond what was returned."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque value to pass back as cursor, to the same route (and the same account on an account listing), to continue. null when there is nothing further. It can start part-way through a page, at a named reel; treat it as opaque."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "More results are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 1,
                      "posts": [
                        {
                          "id": "3986188199829823669",
                          "shortcode": "DdRyQxKteC1",
                          "url": "https://www.instagram.com/reel/DdRyQxKteC1/",
                          "kind": "video",
                          "productType": "clips",
                          "caption": "Sunrise, sunset, sunrise again. Astronauts aboard the @ISS see 16 of each every day. 🌅",
                          "createdAt": "2026-09-15T15:02:11.000Z",
                          "likeCount": 135117,
                          "commentCount": 1667,
                          "playCount": 6142932,
                          "videoDuration": 31.4,
                          "shareCount": 10242,
                          "repostCount": 6685,
                          "saveCount": 7889,
                          "countsHidden": false,
                          "width": 1080,
                          "height": 1920,
                          "altText": null,
                          "thumbnailUrl": "https://scontent-ham3-1.cdninstagram.com/v/t51.82787-15/...",
                          "assets": [
                            {
                              "kind": "video",
                              "url": "https://scontent-ham3-1.cdninstagram.com/o1/v/t2/f2/m86/...",
                              "width": 720,
                              "height": 1280,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            }
                          ],
                          "carousel": [],
                          "author": {
                            "id": "528817151",
                            "username": "nasa",
                            "fullName": "NASA",
                            "profilePicUrl": "https://scontent-ham3-1.cdninstagram.com/v/t51.2885-19/...",
                            "verified": true,
                            "privateAccount": false,
                            "profileUrl": "https://www.instagram.com/nasa/"
                          },
                          "coauthors": [],
                          "taggedUsers": [],
                          "location": null,
                          "hashtags": [],
                          "mentions": [
                            "iss"
                          ],
                          "topics": [],
                          "hasAudio": true,
                          "fieldsFrom": "listing_full"
                        }
                      ],
                      "postCount": 12,
                      "hasMore": true,
                      "nextCursor": "AQHT6ML6wCLtibE4BLFfMtyM6RwkyO",
                      "restricted": false,
                      "minimumAge": null,
                      "username": "nasa"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/user-stories": {
      "post": {
        "operationId": "user-stories",
        "tags": [
          "Accounts"
        ],
        "summary": "Read an account’s active stories",
        "description": "The stories a public Instagram account has up right now, oldest first: every frame with its media, posting and expiry time, attached links and re-shared posts, plus the account’s profile. Use it to catch stories before they expire. Pass a username or profile URL.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "A username with or without the @, or a profile URL. Give exactly one of username or userId: neither, or both, is a 400."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The account’s numeric id (profile.id), as a string of digits. Give this or username, not both. An id names the account even after it changes its username; an id that belongs to no account is a 404. Name the account with exactly one of username and userId; both or neither is a 400."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional: [\"native\"] fills profile.native, the account’s full profile record under Instagram’s own field names (see user-profile). It adds about a second with username, and usually nothing with userId. Any other value is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs. A call usually takes 2–5 seconds, under a second when there is no active story, and occasionally up to about 30. Under heavy load it can answer 503; retry after a short wait."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "username": "@nasa"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "restricted": {
                      "type": "boolean",
                      "description": "True for an account Instagram restricts — typically an age-restricted brand such as alcohol or cannabis — and false for every other. Such an account answers 200, not 404, with less detail. Its stories come back the same way as any other account’s."
                    },
                    "minimumAge": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The minimum age Instagram states for a restricted account, or null when it states none (and on every other account)."
                    },
                    "username": {
                      "type": "string",
                      "description": "The account the stories belong to."
                    },
                    "profile": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The account’s profile in the user-profile shape, including the exact stats.postCount (the same rule as user-profile).",
                      "properties": {
                        "native": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Only with include [\"native\"]: the account’s full profile record as Instagram publishes it, field for field under Instagram’s own field names — account_type (1 personal, 2 business, 3 creator), category, public_email, public_phone_number, the address fields, hd_profile_pic_url_info, bio_links with link_id, fbid_v2 and more, around 240 fields. Every id is an exact string; an empty string means the account has not published that detail. Null when not available this time (the note says so, and nativeUnavailableReason says why); absent without the include."
                        },
                        "nativeUnavailableReason": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it). Naming the account by userId makes the record faster to get."
                        }
                      }
                    },
                    "latestStoryAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the account last posted a story (ISO 8601), or null when it has none. With a complete list it equals the newest frame’s takenAt."
                    },
                    "stories": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact id for the frame, as a string (a 64-bit number; keep it as a string). A link built from it is exact: https://www.instagram.com/stories/<username>/<id>/."
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Link to the frame on Instagram."
                          },
                          "kind": {
                            "type": "string",
                            "description": "image or video."
                          },
                          "takenAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When the frame was posted (ISO 8601)."
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When Instagram will take the frame down (ISO 8601), normally 24 hours after takenAt."
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel width."
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel height."
                          },
                          "durationSeconds": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "A video frame’s length in seconds; null for an image."
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether a video frame has sound; null for an image."
                          },
                          "thumbnailUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview image, or null."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Every rendition — video first, then images, largest first — each with kind, url, width, height and a downloadUrl that keeps working after Instagram’s own link expires."
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Links the account attached to the frame, each with its url, unwrapped to the real destination."
                          },
                          "sharedPosts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Posts the account re-shared into the frame, each with its shortcode and url — pass either to post-detail."
                          }
                        }
                      },
                      "description": "The active frames, oldest first, normally current to the second. Empty when the account has no active story; null for a private account. Each comes with a note, and both are ordinary answers that cost 1 credit, not errors. On rare occasions the very newest frame is not in the list yet: the note says the most recent story may not be included, and a later call picks it up."
                    },
                    "storyCount": {
                      "type": "number",
                      "description": "How many frames are in this response."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [],
                      "pagesFetched": 1,
                      "restricted": false,
                      "minimumAge": null,
                      "username": "nasa",
                      "profile": {
                        "id": "528817151",
                        "username": "nasa",
                        "url": "https://www.instagram.com/nasa/",
                        "fullName": "NASA",
                        "verified": true,
                        "privateAccount": false,
                        "hasActiveStory": true,
                        "latestStoryAt": "2026-10-12T21:47:37.000Z",
                        "country": null,
                        "dateJoined": null,
                        "stats": {
                          "followerCount": 104352683,
                          "followingCount": 91,
                          "postCount": null
                        }
                      },
                      "latestStoryAt": "2026-10-12T21:47:37.000Z",
                      "stories": [
                        {
                          "id": "4006121587703428119",
                          "url": "https://www.instagram.com/stories/nasa/4006121587703428119/",
                          "kind": "video",
                          "takenAt": "2026-10-12T21:47:37.000Z",
                          "expiresAt": "2026-10-13T21:47:37.000Z",
                          "width": 720,
                          "height": 1280,
                          "durationSeconds": 14.8,
                          "hasAudio": true,
                          "thumbnailUrl": "https://scontent-fra5-1.cdninstagram.com/v/t51.82787-15/...",
                          "assets": [
                            {
                              "kind": "video",
                              "url": "https://scontent-fra5-1.cdninstagram.com/o1/v/t2/f2/m86/...",
                              "width": 720,
                              "height": 1280,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            },
                            {
                              "kind": "image",
                              "url": "https://scontent-fra5-1.cdninstagram.com/v/t51.82787-15/...",
                              "width": 720,
                              "height": 1280,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            }
                          ],
                          "links": [
                            {
                              "url": "https://www.nasa.gov/ways-to-watch"
                            }
                          ],
                          "sharedPosts": []
                        }
                      ],
                      "storyCount": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/post-detail": {
      "post": {
        "operationId": "post-detail",
        "tags": [
          "Posts & reels"
        ],
        "summary": "Get one post or reel in full",
        "description": "One Instagram post or reel in full: caption, date, like, comment and play counts, every carousel frame and rendition, tagged accounts and places, and a preview of its comments. Pass its URL, short code or id; add include for repost, share and save counts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post": {
                    "type": "string",
                    "description": "A post or reel URL — /p/<code>/, /reel/<code>/, /reels/<code>/, /tv/<code>/, or Instagram’s own /<username>/p/<code>/ and /<username>/reel/<code>/ forms — the short code from that URL, or the post’s numeric id (the id any response returns, with or without its _<owner id> suffix)."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional extra counts: any of \"reposts\", \"shares\" and \"saves\". \"reposts\" fills repostCount on every kind of post; \"shares\" and \"saves\" fill shareCount and saveCount on reels and videos (photos and carousels have none). It adds about 1 to 2 seconds. On the rare request where a count is temporarily unavailable it is null with a note asking you to retry. The price is unchanged: 1 credit per page fetched. Without include the three are null and the note says so. Any other value is a 400; \"country\" belongs to user-profile."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs. A video or reel takes about a second longer than a photo, around four at the slow end."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "post"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "post": "https://www.instagram.com/p/DcOX3hWFiey/",
                    "include": [
                      "reposts",
                      "shares",
                      "saves"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "post": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The post or reel, in the shape below.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Instagram’s exact media id, as a string: it is a 64-bit number, larger than a JSON number can carry exactly, so keep it as a string. post-detail and post-comments accept it as post."
                        },
                        "shortcode": {
                          "type": "string",
                          "description": "The code in the post URL. post-detail and post-comments both accept it."
                        },
                        "url": {
                          "type": "string",
                          "description": "Canonical link to the post or reel."
                        },
                        "kind": {
                          "type": "string",
                          "description": "image, video or carousel."
                        },
                        "productType": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What Instagram calls the surface — \"feed\" for a grid post, \"clips\" for a reel — or null."
                        },
                        "caption": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The author’s own written post body, or null. This is a caption, not a transcript: Instagram publishes no transcript of spoken audio."
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ISO 8601 timestamp, or null: always null on reels-feed, and null on a listing record whose fieldsFrom is \"listing\"."
                        },
                        "likeCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Likes, or null: always null on reels-feed, null on a listing record whose fieldsFrom is \"listing\", and absent when countsHidden is true."
                        },
                        "commentCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "The comment count Instagram shows. Includes Facebook comments when the split is available (instagramCommentCount/facebookCommentCount set); otherwise the Instagram-only figure, with both split fields null. Since 2026-11-05, commentCount includes comments on the Facebook cross-post where available; instagramCommentCount is the Instagram-only figure. Null in the same cases as likeCount, and on a listing record whose fieldsFrom is \"listing\"."
                        },
                        "instagramCommentCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Comments made on Instagram, replies included. Always present; null when Instagram does not report the split, and on a listing record whose fieldsFrom is \"listing\"."
                        },
                        "facebookCommentCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Comments made on the post’s Facebook copy: 0 on a post not shared to Facebook. Always present; null when Instagram does not report it, and commentCount is then the comments made on Instagram only."
                        },
                        "commentCountUnavailableReason": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "Always present alongside instagramCommentCount and facebookCommentCount: null when commentCount is the total Instagram shows (the split itself can still be null), otherwise {code, retryable} saying why it is not, matching the note. total-unavailable (retryable true): the total could not be read this time, so commentCount is the comments made on Instagram as Instagram publishes them, which can be lower; asking again usually returns it. time-limit (retryable true): the total was not read in the time available, so commentCount is as for total-unavailable; asking again, or allowing more timeoutMs, usually returns it. not-provided (retryable false, and not an error): this response carries only Instagram’s own count for the post, so commentCount is the comments made on Instagram as Instagram publishes them, or empty; asking again returns the same. Request the post on post-detail for the full total where it is available. total-unavailable and time-limit occur on post-detail only."
                        },
                        "playCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Instagram plays on a video or reel: the view count Instagram shows on it, the same figure on listings and on post-detail (plays on Facebook are not included). Null for photos and carousels, whose views Instagram does not make public, and for posts from a restricted account. On post-detail it can occasionally be null for a video; the note says so, and a retry usually returns it."
                        },
                        "videoDuration": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Length of a video or reel in seconds, with decimals. Null for a photo or carousel (each carousel frame carries its own carousel[].videoDuration), on reels-feed, and on a listing record whose fieldsFrom is \"listing\"."
                        },
                        "shareCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "How many times the post was shared, as Instagram counts it under a reel. Filled when include lists \"shares\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels. Also null — not 0 — when the account hides it, and the note says so."
                        },
                        "repostCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "How many times the post was reposted to other accounts’ profiles. Filled when include lists \"reposts\" (post-detail, user-posts, user-reels); every kind of post."
                        },
                        "saveCount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "How many times the post was saved. Filled when include lists \"saves\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels."
                        },
                        "countsHidden": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "True when the account has turned like and view counts off. The counts are then absent rather than zero."
                        },
                        "width": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Pixel width, or null where the record does not carry it."
                        },
                        "height": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Pixel height, or null where the record does not carry it."
                        },
                        "altText": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Instagram’s own auto-generated image description (\"Photo by NASA on August 19, 2026. May be an image of text.\"), or null. Machine-written alt text, not a caption and not a transcript."
                        },
                        "thumbnailUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview frame, or null."
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "properties": {
                              "downloadUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Pass it to GET /media to stream the bytes. Instagram’s own links are signed and expire; this one keeps working."
                              }
                            }
                          },
                          "description": "Ordered and de-duplicated renditions, each with kind, url, width, height and downloadUrl."
                        },
                        "carousel": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "One entry per frame of a carousel, each with its own renditions and, for a video frame, its own videoDuration. Empty for a single image or video."
                        },
                        "author": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl. Fields Instagram does not publish on a listing are null."
                        },
                        "coauthors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "Accounts credited as co-authors of a collab post."
                        },
                        "taggedUsers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "description": "Accounts tagged in the image."
                        },
                        "location": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "The place the post was tagged at, or null."
                        },
                        "hashtags": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Without the #."
                        },
                        "mentions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Usernames without the @."
                        },
                        "topics": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Instagram’s own subject labels for the post (\"jwst\", \"star birth\"), where it publishes them."
                        },
                        "hasAudio": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "Whether the video carries audio, or null."
                        },
                        "fieldsFrom": {
                          "type": "string",
                          "description": "Which shape this record has, so a null count is never mistaken for a zero. \"detail\" is a full post, from post-detail. \"listing_full\" is a listing record with its posting date and counts, which is what user-posts and user-reels return. \"listing\" is a record without them: every reel on reels-feed, and on user-posts or user-reels only a post that is named in the note by short code, with the fields it lacks. Asking again with include returns them, and so does post-detail."
                        },
                        "audio": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true,
                          "description": "The sound on a video or reel, where Instagram publishes it with the post; null otherwise. Ids are exact strings.",
                          "properties": {
                            "type": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Instagram’s label for the sound, e.g. original_sounds or licensed_music."
                            },
                            "originalSoundTitle": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The title of an original sound, e.g. Original audio."
                            },
                            "artistUsername": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The account an original sound is credited to."
                            },
                            "durationMs": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Length of the sound in milliseconds."
                            },
                            "audioAssetId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The sound’s own id."
                            },
                            "canonicalId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The id Instagram groups uses of the same sound under."
                            },
                            "songTitle": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Licensed music: the song’s title. Null for an original sound, or a song Instagram no longer makes available."
                            },
                            "songArtist": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Licensed music: the artist as Instagram shows it."
                            },
                            "isExplicit": {
                              "type": [
                                "boolean",
                                "null"
                              ],
                              "description": "Licensed music: whether Instagram marks the song explicit. Null when there are no song details."
                            },
                            "audioClusterId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Licensed music: the id Instagram groups every use of the song under."
                            }
                          }
                        },
                        "fullId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Instagram’s full id for the post, <id>_<author id>. Null when the author’s id is not known."
                        },
                        "videoDownloadUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The first video’s downloadUrl, for GET /media, valid as long as its own link. Null for a photo, or when this response has no video link for the post."
                        },
                        "thumbnailDownloadUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "thumbnailUrl as a downloadUrl for GET /media, valid as long as thumbnailUrl is."
                        },
                        "brandedContent": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The paid-partnership label, and how far the accounts a post names are known in this response. Each status is found (present), not-published (Instagram shows none) or not-looked-up (not known in this response — never a statement that there is none). Sponsor accounts are not returned.",
                          "properties": {
                            "isPaidPartnership": {
                              "type": [
                                "boolean",
                                "null"
                              ],
                              "description": "Instagram’s paid-partnership label. Null when not known in this response."
                            },
                            "paidPartnershipStatus": {
                              "type": "string",
                              "description": "found, not-published or not-looked-up, for isPaidPartnership."
                            },
                            "coauthorsStatus": {
                              "type": "string",
                              "description": "found, not-published or not-looked-up, for coauthors."
                            },
                            "taggedUsersStatus": {
                              "type": "string",
                              "description": "found, not-published or not-looked-up, for taggedUsers."
                            },
                            "captionTagsStatus": {
                              "type": "string",
                              "description": "found, not-published or not-looked-up, for hashtags and mentions, which come from the caption and carry no account ids."
                            }
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      },
                      "description": "A preview: the first comments on the post, about a dozen, without reply counts — replyCount is null on each. The note says how many; post-comments returns them all with their reply counts."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "Instagram does not publish view counts for photos and carousels publicly, so playCount is empty.",
                        "Instagram does not show share or save counts for photos and carousels, so shareCount and saveCount are empty.",
                        "This response includes the first 12 comments, without reply counts; use post-comments to read them all with their reply counts."
                      ],
                      "pagesFetched": 1,
                      "post": {
                        "id": "3967213292204992434",
                        "shortcode": "DcOX3hWFiey",
                        "url": "https://www.instagram.com/p/DcOX3hWFiey/",
                        "kind": "image",
                        "productType": "feed",
                        "caption": "With your powers combined…\n\nThis colorful picture of the cosmos is the product of teamwork between our @NASAHubble, @NASAWebb, and @NASAChandraXray telescopes. …",
                        "createdAt": "2026-08-19T14:11:47.000Z",
                        "likeCount": 573281,
                        "commentCount": 4349,
                        "playCount": null,
                        "videoDuration": null,
                        "shareCount": null,
                        "repostCount": 14650,
                        "saveCount": null,
                        "countsHidden": false,
                        "width": 1280,
                        "height": 1129,
                        "altText": "Photo by NASA on August 19, 2026. May be an image of text.",
                        "thumbnailUrl": "https://scontent-dus1-1.cdninstagram.com/v/t51.82787-15/...",
                        "assets": [
                          {
                            "kind": "image",
                            "url": "https://scontent-dus1-1.cdninstagram.com/v/t51.82787-15/...",
                            "width": 1280,
                            "height": 1129,
                            "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                          }
                        ],
                        "carousel": [],
                        "author": {
                          "id": "528817151",
                          "username": "nasa",
                          "fullName": "NASA",
                          "profilePicUrl": "https://scontent-dus1-1.cdninstagram.com/v/t51.2885-19/...",
                          "verified": true,
                          "privateAccount": false,
                          "profileUrl": "https://www.instagram.com/nasa/"
                        },
                        "coauthors": [],
                        "taggedUsers": [],
                        "location": null,
                        "hashtags": [
                          "nasa",
                          "universe",
                          "nebula"
                        ],
                        "mentions": [
                          "nasahubble",
                          "nasawebb",
                          "nasachandraxray"
                        ],
                        "topics": [
                          "carina nebula",
                          "jwst",
                          "star birth",
                          "cosmic clouds",
                          "astronomy photography",
                          "interstellar dust"
                        ],
                        "hasAudio": null,
                        "fieldsFrom": "detail"
                      },
                      "comments": [
                        {
                          "id": "18041736590218845",
                          "text": "The colours in this one are unreal 🔭",
                          "createdAt": "2026-09-16T17:16:25.000Z",
                          "likeCount": 2,
                          "replyCount": null,
                          "author": {
                            "id": "61873402291",
                            "username": "example.stargazer",
                            "fullName": null,
                            "profilePicUrl": "https://scontent-dus1-1.cdninstagram.com/v/t51.82787-19/...",
                            "verified": false,
                            "privateAccount": null,
                            "profileUrl": "https://www.instagram.com/example.stargazer/"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/post-comments": {
      "post": {
        "operationId": "post-comments",
        "tags": [
          "Posts & reels"
        ],
        "summary": "Read a post’s comments",
        "description": "The public comments on an Instagram post or reel, newest first, each with its text, author, time, likes and reply count. Pass the post’s URL, short code or id. Paged: 10–16 comments per page, 1 credit per page fetched. A post that reports comments but shows none returns an empty list with a note, unbilled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post": {
                    "type": "string",
                    "description": "A post or reel URL, in any of the forms post-detail accepts, the short code from that URL, or the post’s numeric id."
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of comments to return in one request, up to 10. Use -1 for the maximum. A page is 10–16 comments, each page is 1 credit, and the response reports how many were fetched as pagesFetched. The first page takes about 2–3.5 seconds and each further page about 2–4, so pages: 10 is about 30 seconds.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor. Send it back to post-comments with the same post that produced it; a cursor from another route or another post, or a malformed one, is a 400."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Maximum comments returned, up to 300. Use -1 for the maximum. It caps the comments across the pages fetched; it does not fetch further pages.",
                    "example": "every comment on the pages fetched"
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional: [\"native\"] adds each comment’s native, Instagram’s own record for it, field for field under Instagram’s own names (about 30 fields, its author among them), with ids as exact strings; or null with nativeUnavailableReason. It costs no extra time; each comment grows by about 2.5KB. Any other value is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "post"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "post": "DcOX3hWFiey",
                    "pages": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "shortcode": {
                      "type": "string",
                      "description": "The post the comments belong to."
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact comment id, as a string. Pass it to comment-replies as commentId to read the comment’s replies; a note says when a page holds comments with replies."
                          },
                          "text": {
                            "type": "string",
                            "description": "The comment body, or null for a GIF, photo or sticker comment — kind says which and mediaUrl links it."
                          },
                          "kind": {
                            "type": "string",
                            "description": "\"text\", \"gif\", \"image\" (a photo or a sticker) or \"unknown\". \"unknown\" — no text and no mediaUrl — appears only on a first page where the photos of photo comments are not available; the note says so."
                          },
                          "mediaUrl": {
                            "type": "string",
                            "description": "The GIF or photo the comment carries, or null."
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "ISO 8601 timestamp."
                          },
                          "likeCount": {
                            "type": "number",
                            "description": "Likes on the comment."
                          },
                          "replyCount": {
                            "type": "number",
                            "description": "How many replies the comment has, on every page. On a first page some can be empty, with the note \"On this first page, some reply counts and the photos of photo comments are not available in this response, so they are empty. Asking again fills them; nextCursor continues the list.\" comment-replies returns the replies, given this comment’s id."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl."
                          },
                          "native": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: Instagram’s own record for the comment or reply, field for field under Instagram’s own names (text, created_at_utc, comment_like_count, child_comment_count, status, is_covered, user, ...), with ids as exact strings. Fields about the requester’s own relation to the comment (whether it liked or reported it, may edit it or reply privately) are left out. Null when not available (nativeUnavailableReason says why). Absent without the include."
                          },
                          "nativeUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null. temporarily-unavailable (retryable true): asking again usually returns it. Absent without the include."
                          }
                        }
                      },
                      "description": "The comments, newest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it back as cursor to continue from here. Null when there is nothing further, and hasMore agrees. A response can hold fewer comments than asked; it then carries nextCursor and the note \"This list stops early: the rest is not available in this response. Continue with nextCursor.\""
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "How many comments are in this response."
                    },
                    "totalCount": {
                      "type": "number",
                      "description": "Instagram’s total for the post, replies included, and on a post shared to Facebook the comments made there: the same combined total as commentCount on post-detail. When the total is not available it is the comments made on Instagram as Instagram publishes them, and notes says so."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more comments are available. False when nextCursor is null."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "More comments are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 2,
                      "shortcode": "DcOX3hWFiey",
                      "comments": [
                        {
                          "id": "18041736590218845",
                          "text": "The colours in this one are unreal 🔭",
                          "kind": "text",
                          "mediaUrl": null,
                          "createdAt": "2026-09-16T17:16:25.000Z",
                          "likeCount": 2,
                          "replyCount": 3,
                          "author": {
                            "id": "61873402291",
                            "username": "example.stargazer",
                            "fullName": null,
                            "profilePicUrl": "https://scontent-dus1-1.cdninstagram.com/v/t51.82787-19/...",
                            "verified": false,
                            "privateAccount": null,
                            "profileUrl": "https://www.instagram.com/example.stargazer/"
                          }
                        }
                      ],
                      "commentCount": 26,
                      "totalCount": 4349,
                      "nextCursor": "c1.WyI0MDA3MDAwNzg1ODc4NjgyNDgxIiwie1wiaXNfc2VydmVyX2N1cnNvcl9pbnZlcnNlXCI6dHJ1ZSxcInNlcnZlcl9jdXJzb3JcIjpcIkFRSFRobTQybUlCaHZzN0dGd2JyVFNLNC14QUZPc1V2eHdLLXBuT2xxcHZUQlZsaEtWS2wxV0pIa0xhazh5SlhjMFZLV1lZQzVfME9lQXl5ancxWHdEbnp3Z1wifSIsbnVsbCw0ODNd",
                      "hasMore": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/comment-replies": {
      "post": {
        "operationId": "comment-replies",
        "tags": [
          "Posts & reels"
        ],
        "summary": "Read the replies to a comment",
        "description": "The replies to one comment on an Instagram post or reel, oldest first, in the same shape as comments. Pass the post and the comment’s id, as post-comments returns it. Paged: about 8 replies per page, 1 credit per page fetched.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post": {
                    "type": "string",
                    "description": "The post or reel the comment is on: a URL in any of the forms post-detail accepts, the short code, or the post’s numeric id."
                  },
                  "commentId": {
                    "type": "string",
                    "description": "The comment’s id, as post-comments returns it in comments[].id. A string of digits. A comment that is not on that post, or does not exist, is a 404."
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of replies to return in one request, up to 10. Use -1 for the maximum. A page is about 8 replies, each page is 1 credit, and the response reports how many were fetched as pagesFetched. A page takes about 2 seconds, and a request for several pages can take up to about 20 seconds between pages, so following nextCursor one page at a time is the quickest way to read a long thread.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor. Send it back to comment-replies with the same post and commentId that produced it; a cursor from another route, post or comment, or a malformed one, is a 400."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Maximum replies returned, up to 300. Use -1 for the maximum. It caps the replies across the pages fetched; it does not fetch further pages.",
                    "example": "every reply on the pages fetched"
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional: [\"native\"] adds each reply’s native, Instagram’s own record for it, field for field under Instagram’s own names (about 30 fields, its author among them), with ids as exact strings; or null with nativeUnavailableReason. It costs no extra time; each reply grows by about 2.5KB. Any other value is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "post",
                  "commentId"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "post": "DcOX3hWFiey",
                    "commentId": "18041736590218845"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "shortcode": {
                      "type": "string",
                      "description": "The post the comment is on."
                    },
                    "commentId": {
                      "type": "string",
                      "description": "The comment the replies belong to."
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact reply id, as a string."
                          },
                          "text": {
                            "type": "string",
                            "description": "The reply body, or null for a GIF or photo reply — kind says which and mediaUrl links it."
                          },
                          "kind": {
                            "type": "string",
                            "description": "\"text\", \"gif\", \"image\" or \"unknown\"."
                          },
                          "mediaUrl": {
                            "type": "string",
                            "description": "The GIF or photo the reply carries, or null."
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "ISO 8601 timestamp."
                          },
                          "likeCount": {
                            "type": "number",
                            "description": "Likes on the reply."
                          },
                          "replyCount": {
                            "type": "number",
                            "description": "Always null on a reply."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl."
                          },
                          "native": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: Instagram’s own record for the comment or reply, field for field under Instagram’s own names (text, created_at_utc, comment_like_count, child_comment_count, status, is_covered, user, ...), with ids as exact strings. Fields about the requester’s own relation to the comment (whether it liked or reported it, may edit it or reply privately) are left out. Null when not available (nativeUnavailableReason says why). Absent without the include."
                          },
                          "nativeUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null. temporarily-unavailable (retryable true): asking again usually returns it. Absent without the include."
                          }
                        }
                      },
                      "description": "The replies, oldest first. Empty when the comment has none, with a note saying so; that is still one page and 1 credit."
                    },
                    "replyCount": {
                      "type": "number",
                      "description": "How many replies are in this response."
                    },
                    "totalCount": {
                      "type": "number",
                      "description": "Instagram’s own count of replies to the comment. When Instagram lists fewer replies than it counts, the last page says so with numbers, e.g. \"Instagram lists 5 of the 6 replies it counts for this comment.\""
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more replies are available. False when nextCursor is null."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass it back as cursor, with the same post and commentId, to continue; paging never returns a reply twice across requests. Null at the end, and a finished list that matches the count ends with the note \"There are no further replies to read.\" A response can hold fewer replies than asked; it then carries nextCursor and the note \"This list stops early: the rest is not available in this response. Continue with nextCursor.\""
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "More replies are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 1,
                      "shortcode": "DcOX3hWFiey",
                      "commentId": "18041736590218845",
                      "replies": [
                        {
                          "id": "17892230514162087",
                          "text": "Same here, that blue is unreal",
                          "kind": "text",
                          "mediaUrl": null,
                          "createdAt": "2026-09-16T18:02:41.000Z",
                          "likeCount": 1,
                          "replyCount": null,
                          "author": {
                            "id": "62240918735",
                            "username": "example.nightsky",
                            "fullName": null,
                            "profilePicUrl": "https://scontent-dus1-1.cdninstagram.com/v/t51.82787-19/...",
                            "verified": false,
                            "privateAccount": null,
                            "profileUrl": "https://www.instagram.com/example.nightsky/"
                          }
                        }
                      ],
                      "replyCount": 8,
                      "totalCount": 23,
                      "hasMore": true,
                      "nextCursor": "r1.WyIxODA0MTczNjU5MDIxODg0NSIsIlFWRlNiR..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/reels-feed": {
      "post": {
        "operationId": "reels-feed",
        "tags": [
          "Discovery"
        ],
        "summary": "Browse popular reels",
        "description": "Reels Instagram currently lists as popular, from many accounts, each with its play count, caption, author and video. No account or keyword needed, and which reels come back varies between calls. Paged: 12 reels per page, 1 credit per page fetched.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "description": "Maximum items returned, up to 240. Use -1 for the maximum. Without it, every item on the pages fetched comes back, 12 a page (pages: 2 alone returns 24). A limit takes as many pages as it needs: a limit of 60 takes five pages and costs five credits.",
                    "example": "every item on the pages fetched, 12 a page"
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of results to return in one request, up to 20. Use -1 for the maximum. Instagram serves 12 items per page and each page fetched is 1 credit, so a call costs the pages it fetches — set by pages, or by how many pages a limit needs — not the number of items returned. The response reports them as pagesFetched.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor. Send it back to reels-feed, which produced it; a cursor from another route, or a malformed one, is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "limit": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact media id, as a string: it is a 64-bit number, larger than a JSON number can carry exactly, so keep it as a string. post-detail and post-comments accept it as post."
                          },
                          "shortcode": {
                            "type": "string",
                            "description": "The code in the post URL. post-detail and post-comments both accept it."
                          },
                          "url": {
                            "type": "string",
                            "description": "Canonical link to the post or reel."
                          },
                          "kind": {
                            "type": "string",
                            "description": "image, video or carousel."
                          },
                          "productType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What Instagram calls the surface — \"feed\" for a grid post, \"clips\" for a reel — or null."
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The author’s own written post body, or null. This is a caption, not a transcript: Instagram publishes no transcript of spoken audio."
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 timestamp, or null: always null on reels-feed, and null on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "likeCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Likes, or null: always null on reels-feed, null on a listing record whose fieldsFrom is \"listing\", and absent when countsHidden is true."
                          },
                          "commentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The comment count Instagram shows. Includes Facebook comments when the split is available (instagramCommentCount/facebookCommentCount set); otherwise the Instagram-only figure, with both split fields null. Since 2026-11-05, commentCount includes comments on the Facebook cross-post where available; instagramCommentCount is the Instagram-only figure. Null in the same cases as likeCount, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "instagramCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on Instagram, replies included. Always present; null when Instagram does not report the split, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "facebookCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on the post’s Facebook copy: 0 on a post not shared to Facebook. Always present; null when Instagram does not report it, and commentCount is then the comments made on Instagram only."
                          },
                          "commentCountUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Always present alongside instagramCommentCount and facebookCommentCount: null when commentCount is the total Instagram shows (the split itself can still be null), otherwise {code, retryable} saying why it is not, matching the note. total-unavailable (retryable true): the total could not be read this time, so commentCount is the comments made on Instagram as Instagram publishes them, which can be lower; asking again usually returns it. time-limit (retryable true): the total was not read in the time available, so commentCount is as for total-unavailable; asking again, or allowing more timeoutMs, usually returns it. not-provided (retryable false, and not an error): this response carries only Instagram’s own count for the post, so commentCount is the comments made on Instagram as Instagram publishes them, or empty; asking again returns the same. Request the post on post-detail for the full total where it is available. total-unavailable and time-limit occur on post-detail only."
                          },
                          "playCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Instagram plays on a video or reel: the view count Instagram shows on it, the same figure on listings and on post-detail (plays on Facebook are not included). Null for photos and carousels, whose views Instagram does not make public, and for posts from a restricted account. On post-detail it can occasionally be null for a video; the note says so, and a retry usually returns it."
                          },
                          "videoDuration": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Length of a video or reel in seconds, with decimals. Null for a photo or carousel (each carousel frame carries its own carousel[].videoDuration), on reels-feed, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "shareCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was shared, as Instagram counts it under a reel. Filled when include lists \"shares\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels. Also null — not 0 — when the account hides it, and the note says so."
                          },
                          "repostCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was reposted to other accounts’ profiles. Filled when include lists \"reposts\" (post-detail, user-posts, user-reels); every kind of post."
                          },
                          "saveCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was saved. Filled when include lists \"saves\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels."
                          },
                          "countsHidden": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True when the account has turned like and view counts off. The counts are then absent rather than zero."
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel width, or null where the record does not carry it."
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel height, or null where the record does not carry it."
                          },
                          "altText": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s own auto-generated image description (\"Photo by NASA on August 19, 2026. May be an image of text.\"), or null. Machine-written alt text, not a caption and not a transcript."
                          },
                          "thumbnailUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview frame, or null."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "downloadUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Pass it to GET /media to stream the bytes. Instagram’s own links are signed and expire; this one keeps working."
                                }
                              }
                            },
                            "description": "Ordered and de-duplicated renditions, each with kind, url, width, height and downloadUrl."
                          },
                          "carousel": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "One entry per frame of a carousel, each with its own renditions and, for a video frame, its own videoDuration. Empty for a single image or video."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl. Fields Instagram does not publish on a listing are null."
                          },
                          "coauthors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts credited as co-authors of a collab post."
                          },
                          "taggedUsers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts tagged in the image."
                          },
                          "location": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The place the post was tagged at, or null."
                          },
                          "hashtags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Without the #."
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Usernames without the @."
                          },
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Instagram’s own subject labels for the post (\"jwst\", \"star birth\"), where it publishes them."
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether the video carries audio, or null."
                          },
                          "fieldsFrom": {
                            "type": "string",
                            "description": "Which shape this record has, so a null count is never mistaken for a zero. \"detail\" is a full post, from post-detail. \"listing_full\" is a listing record with its posting date and counts, which is what user-posts and user-reels return. \"listing\" is a record without them: every reel on reels-feed, and on user-posts or user-reels only a post that is named in the note by short code, with the fields it lacks. Asking again with include returns them, and so does post-detail."
                          },
                          "audio": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The sound on a video or reel, where Instagram publishes it with the post; null otherwise. Ids are exact strings.",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Instagram’s label for the sound, e.g. original_sounds or licensed_music."
                              },
                              "originalSoundTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The title of an original sound, e.g. Original audio."
                              },
                              "artistUsername": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The account an original sound is credited to."
                              },
                              "durationMs": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Length of the sound in milliseconds."
                              },
                              "audioAssetId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The sound’s own id."
                              },
                              "canonicalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The id Instagram groups uses of the same sound under."
                              },
                              "songTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the song’s title. Null for an original sound, or a song Instagram no longer makes available."
                              },
                              "songArtist": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the artist as Instagram shows it."
                              },
                              "isExplicit": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Licensed music: whether Instagram marks the song explicit. Null when there are no song details."
                              },
                              "audioClusterId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the id Instagram groups every use of the song under."
                              }
                            }
                          },
                          "fullId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s full id for the post, <id>_<author id>. Null when the author’s id is not known."
                          },
                          "videoDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The first video’s downloadUrl, for GET /media, valid as long as its own link. Null for a photo, or when this response has no video link for the post."
                          },
                          "thumbnailDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "thumbnailUrl as a downloadUrl for GET /media, valid as long as thumbnailUrl is."
                          },
                          "brandedContent": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The paid-partnership label, and how far the accounts a post names are known in this response. Each status is found (present), not-published (Instagram shows none) or not-looked-up (not known in this response — never a statement that there is none). Sponsor accounts are not returned.",
                            "properties": {
                              "isPaidPartnership": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Instagram’s paid-partnership label. Null when not known in this response."
                              },
                              "paidPartnershipStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for isPaidPartnership."
                              },
                              "coauthorsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for coauthors."
                              },
                              "taggedUsersStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for taggedUsers."
                              },
                              "captionTagsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for hashtags and mentions, which come from the caption and carry no account ids."
                              }
                            }
                          }
                        }
                      },
                      "description": "Reels Instagram currently lists as popular, each with playCount, caption, author and video links. Not a personalised or real-time feed. likeCount, commentCount and createdAt are null — post-detail returns a reel’s counts and date, user-reels a given account’s reels — and so are repostCount, shareCount and saveCount, as this route takes no include. If Instagram is listing no popular reels at that moment, the route answers 503; retry later."
                    },
                    "postCount": {
                      "type": "number",
                      "description": "How many items are in this response."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more results exist beyond what was returned."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque value to pass back as cursor, to the same route (and the same account on an account listing), to continue. null when there is nothing further."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "Reels here are those Instagram currently lists as popular, from many accounts. They carry play counts, captions and media but no like counts, comment counts or posting dates; read a single post for those.",
                        "More results are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 1,
                      "posts": [
                        {
                          "id": "3809847048594935553",
                          "shortcode": "DTfS7SMEk8B",
                          "url": "https://www.instagram.com/reel/DTfS7SMEk8B/",
                          "kind": "video",
                          "productType": null,
                          "caption": "Four seasons in one valley. Which month would you pick? 🏔️\n\n#travel #switzerland #nature",
                          "createdAt": null,
                          "likeCount": null,
                          "commentCount": null,
                          "playCount": 30214234,
                          "videoDuration": null,
                          "shareCount": null,
                          "repostCount": null,
                          "saveCount": null,
                          "countsHidden": null,
                          "width": null,
                          "height": null,
                          "altText": null,
                          "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51.71878-15/...",
                          "assets": [
                            {
                              "kind": "video",
                              "url": "https://scontent.cdninstagram.com/o1/v/t2/f2/m86/...",
                              "width": null,
                              "height": null,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            }
                          ],
                          "carousel": [],
                          "author": {
                            "id": "787132",
                            "username": "natgeo",
                            "fullName": null,
                            "profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/...",
                            "verified": true,
                            "privateAccount": null,
                            "profileUrl": "https://www.instagram.com/natgeo/"
                          },
                          "coauthors": [],
                          "taggedUsers": [],
                          "location": null,
                          "hashtags": [
                            "travel",
                            "switzerland",
                            "nature"
                          ],
                          "mentions": [],
                          "topics": [],
                          "hasAudio": null,
                          "fieldsFrom": "listing"
                        }
                      ],
                      "postCount": 12,
                      "hasMore": true,
                      "nextCursor": "QVFEZ..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/reels-search": {
      "post": {
        "operationId": "reels-search",
        "tags": [
          "Discovery"
        ],
        "summary": "Search reels by keyword",
        "description": "Reels for a keyword or phrase, from many accounts: the reels Instagram lists as popular for it, in its ranked order rather than by date. Instagram lists about 100 reels for a keyword (96 for \"sourdough\", 84 for \"skateboarding\" when measured), after which hasMore is false. Same reel fields as user-reels, with play, like and comment counts. Paged: 12 reels per page, 1 credit per page fetched; the extra reads include asks for are not billed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "keyword": {
                    "type": "string",
                    "description": "A word or phrase, 1 to 100 characters, as typed in Instagram’s search, for example \"sourdough\" or \"street food\". Case and extra spaces do not matter; the response’s keyword says what was searched."
                  },
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Any of \"reposts\", \"shares\" and \"saves\" to also return repostCount, shareCount and saveCount (shares and saves exist for reels and videos only), or \"native\" for each reel’s full record under Instagram’s own field names (large; about a second per 24 reels). Same price."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Maximum items returned, up to 240. Use -1 for the maximum. Without it, every item on the pages fetched comes back, 12 a page (pages: 2 alone returns 24). A limit takes as many pages as it needs: a limit of 60 takes five pages and costs five credits.",
                    "example": "every item on the pages fetched, 12 a page"
                  },
                  "pages": {
                    "type": "integer",
                    "description": "Pages of results to return in one request, up to 20. Use -1 for the maximum. Instagram serves 12 items per page and each page fetched is 1 credit, so a call costs the pages it fetches — set by pages, or by how many pages a limit needs — not the number of items returned. The response reports them as pagesFetched.",
                    "example": "1"
                  },
                  "cursor": {
                    "type": "string",
                    "description": "Continue from a previous response’s nextCursor, with the same keyword. A cursor from another keyword or another route, or a malformed one, is a 400."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "keyword"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "keyword": "sourdough",
                    "limit": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "keyword": {
                      "type": "string",
                      "description": "The keyword as searched: trimmed, in lower case, with runs of spaces made one."
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Instagram’s exact media id, as a string: it is a 64-bit number, larger than a JSON number can carry exactly, so keep it as a string. post-detail and post-comments accept it as post."
                          },
                          "shortcode": {
                            "type": "string",
                            "description": "The code in the post URL. post-detail and post-comments both accept it."
                          },
                          "url": {
                            "type": "string",
                            "description": "Canonical link to the post or reel."
                          },
                          "kind": {
                            "type": "string",
                            "description": "image, video or carousel."
                          },
                          "productType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What Instagram calls the surface — \"feed\" for a grid post, \"clips\" for a reel — or null."
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The author’s own written post body, or null. This is a caption, not a transcript: Instagram publishes no transcript of spoken audio."
                          },
                          "createdAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 8601 timestamp, or null: always null on reels-feed, and null on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "likeCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Likes, or null: always null on reels-feed, null on a listing record whose fieldsFrom is \"listing\", and absent when countsHidden is true."
                          },
                          "commentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The comment count Instagram shows. Includes Facebook comments when the split is available (instagramCommentCount/facebookCommentCount set); otherwise the Instagram-only figure, with both split fields null. Since 2026-11-05, commentCount includes comments on the Facebook cross-post where available; instagramCommentCount is the Instagram-only figure. Null in the same cases as likeCount, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "instagramCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on Instagram, replies included. Always present; null when Instagram does not report the split, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "facebookCommentCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Comments made on the post’s Facebook copy: 0 on a post not shared to Facebook. Always present; null when Instagram does not report it, and commentCount is then the comments made on Instagram only."
                          },
                          "commentCountUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Always present alongside instagramCommentCount and facebookCommentCount: null when commentCount is the total Instagram shows (the split itself can still be null), otherwise {code, retryable} saying why it is not, matching the note. total-unavailable (retryable true): the total could not be read this time, so commentCount is the comments made on Instagram as Instagram publishes them, which can be lower; asking again usually returns it. time-limit (retryable true): the total was not read in the time available, so commentCount is as for total-unavailable; asking again, or allowing more timeoutMs, usually returns it. not-provided (retryable false, and not an error): this response carries only Instagram’s own count for the post, so commentCount is the comments made on Instagram as Instagram publishes them, or empty; asking again returns the same. Request the post on post-detail for the full total where it is available. total-unavailable and time-limit occur on post-detail only."
                          },
                          "playCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Instagram plays on a video or reel: the view count Instagram shows on it, the same figure on listings and on post-detail (plays on Facebook are not included). Null for photos and carousels, whose views Instagram does not make public, and for posts from a restricted account. On post-detail it can occasionally be null for a video; the note says so, and a retry usually returns it."
                          },
                          "videoDuration": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Length of a video or reel in seconds, with decimals. Null for a photo or carousel (each carousel frame carries its own carousel[].videoDuration), on reels-feed, and on a listing record whose fieldsFrom is \"listing\"."
                          },
                          "shareCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was shared, as Instagram counts it under a reel. Filled when include lists \"shares\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels. Also null — not 0 — when the account hides it, and the note says so."
                          },
                          "repostCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was reposted to other accounts’ profiles. Filled when include lists \"reposts\" (post-detail, user-posts, user-reels); every kind of post."
                          },
                          "saveCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "How many times the post was saved. Filled when include lists \"saves\" (post-detail, user-posts, user-reels); reels and videos only, null on photos and carousels."
                          },
                          "countsHidden": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True when the account has turned like and view counts off. The counts are then absent rather than zero."
                          },
                          "width": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel width, or null where the record does not carry it."
                          },
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Pixel height, or null where the record does not carry it."
                          },
                          "altText": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s own auto-generated image description (\"Photo by NASA on August 19, 2026. May be an image of text.\"), or null. Machine-written alt text, not a caption and not a transcript."
                          },
                          "thumbnailUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview frame, or null."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "downloadUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Pass it to GET /media to stream the bytes. Instagram’s own links are signed and expire; this one keeps working."
                                }
                              }
                            },
                            "description": "Ordered and de-duplicated renditions, each with kind, url, width, height and downloadUrl."
                          },
                          "carousel": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "One entry per frame of a carousel, each with its own renditions and, for a video frame, its own videoDuration. Empty for a single image or video."
                          },
                          "author": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "id, username, fullName, profilePicUrl, verified, privateAccount and profileUrl. Fields Instagram does not publish on a listing are null."
                          },
                          "coauthors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts credited as co-authors of a collab post."
                          },
                          "taggedUsers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "description": "Accounts tagged in the image."
                          },
                          "location": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The place the post was tagged at, or null."
                          },
                          "hashtags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Without the #."
                          },
                          "mentions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Usernames without the @."
                          },
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Instagram’s own subject labels for the post (\"jwst\", \"star birth\"), where it publishes them."
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether the video carries audio, or null."
                          },
                          "fieldsFrom": {
                            "type": "string",
                            "description": "Which shape this record has, so a null count is never mistaken for a zero. \"detail\" is a full post, from post-detail. \"listing_full\" is a listing record with its posting date and counts, which is what user-posts and user-reels return. \"listing\" is a record without them: every reel on reels-feed, and on user-posts or user-reels only a post that is named in the note by short code, with the fields it lacks. Asking again with include returns them, and so does post-detail."
                          },
                          "audio": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "The sound on a video or reel, where Instagram publishes it with the post; null otherwise. Ids are exact strings.",
                            "properties": {
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Instagram’s label for the sound, e.g. original_sounds or licensed_music."
                              },
                              "originalSoundTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The title of an original sound, e.g. Original audio."
                              },
                              "artistUsername": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The account an original sound is credited to."
                              },
                              "durationMs": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Length of the sound in milliseconds."
                              },
                              "audioAssetId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The sound’s own id."
                              },
                              "canonicalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The id Instagram groups uses of the same sound under."
                              },
                              "songTitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the song’s title. Null for an original sound, or a song Instagram no longer makes available."
                              },
                              "songArtist": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the artist as Instagram shows it."
                              },
                              "isExplicit": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Licensed music: whether Instagram marks the song explicit. Null when there are no song details."
                              },
                              "audioClusterId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Licensed music: the id Instagram groups every use of the song under."
                              }
                            }
                          },
                          "fullId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Instagram’s full id for the post, <id>_<author id>. Null when the author’s id is not known."
                          },
                          "videoDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The first video’s downloadUrl, for GET /media, valid as long as its own link. Null for a photo, or when this response has no video link for the post."
                          },
                          "thumbnailDownloadUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "thumbnailUrl as a downloadUrl for GET /media, valid as long as thumbnailUrl is."
                          },
                          "brandedContent": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The paid-partnership label, and how far the accounts a post names are known in this response. Each status is found (present), not-published (Instagram shows none) or not-looked-up (not known in this response — never a statement that there is none). Sponsor accounts are not returned.",
                            "properties": {
                              "isPaidPartnership": {
                                "type": [
                                  "boolean",
                                  "null"
                                ],
                                "description": "Instagram’s paid-partnership label. Null when not known in this response."
                              },
                              "paidPartnershipStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for isPaidPartnership."
                              },
                              "coauthorsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for coauthors."
                              },
                              "taggedUsersStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for taggedUsers."
                              },
                              "captionTagsStatus": {
                                "type": "string",
                                "description": "found, not-published or not-looked-up, for hashtags and mentions, which come from the caption and carry no account ids."
                              }
                            }
                          },
                          "missingFields": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The fields this post still lacks in this response, empty when it has them all: any of createdAt, caption, likeCount, commentCount, playCount, videoDuration, width, height and videoUrl (no video link in assets), and on user-posts and user-reels taggedUsers when include asked for it and the tags could not be read in time. A field the post really has none of — no caption, a count the account turned off — is not listed. More values may be added."
                          },
                          "isPinned": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "True for a reel the account has pinned to the top of its reels, false otherwise, null when Instagram does not say. Pinned reels come first on page one and are never repeated on a later page."
                          },
                          "native": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: the reel’s full record as Instagram publishes it, field for field under Instagram’s own field names, with every id an exact string — among others the full id, code, posting time, original size, length, every rendition, the Instagram-only, total and Facebook play counts, like, comment, share, save and repost counts, co-authors, the paid-partnership label and the sound. Null when not available this time (nativeUnavailableReason says why); absent without the include."
                          },
                          "nativeUnavailableReason": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": true,
                            "description": "Only with include [\"native\"]: null when native is present, otherwise {code, retryable} saying why it is null: time-limit (timeoutMs left too little time; allow more), temporarily-unavailable (asking again usually returns it), or capacity (full records are temporarily unavailable for this request; retry shortly). All are retryable, and the rest of the response is unaffected."
                          }
                        }
                      },
                      "description": "The reels Instagram lists for the keyword, in its ranked order (not by date), each with playCount, likeCount and commentCount filled in. A keyword with no reels is an empty list with status \"empty\" and a note."
                    },
                    "status": {
                      "type": "string",
                      "description": "What the answer amounts to. ok: what was asked for (a continuation past the last page is ok with no posts). partial: something is missing; partialReasons says what. empty: the account has nothing in this list. private: the account is private. restricted: Instagram restricts the account. More values may be added; treat one you do not recognise as partial."
                    },
                    "partialReasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Why the answer is partial; empty otherwise. time_limit: timeoutMs ran out; continue with nextCursor. stopped_early: a later page was not returned; continue with nextCursor. fields_missing: some posts lack a field, named in each post’s missingFields. counts_unavailable: some counts asked for with include are empty. More values may be added."
                    },
                    "complete": {
                      "type": "boolean",
                      "description": "True when every page asked for was read and every reel returned is complete (its missingFields is empty)."
                    },
                    "stopReason": {
                      "type": "string",
                      "description": "Why the list stopped where it did. exhausted: nothing after it (hasMore false). page_limit: the limit or pages asked for were reached. time_limit: timeoutMs ran out. upstream_stopped: a later page was not returned. Continue with nextCursor for every value but exhausted. More values may be added."
                    },
                    "postCount": {
                      "type": "number",
                      "description": "How many items are in this response."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more results exist beyond what was returned."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque value to pass back as cursor, to the same route (and the same account on an account listing), to continue. null when there is nothing further. It can start part-way through a page, at a named reel; treat it as opaque."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "keyword": "sourdough",
                      "transport": "instagram",
                      "notes": [
                        "Reels here are those Instagram currently lists as popular, from many accounts. They carry play counts, captions and media but no like counts, comment counts or posting dates; read a single post for those.",
                        "More results are available. Continue with nextCursor."
                      ],
                      "pagesFetched": 1,
                      "posts": [
                        {
                          "id": "3809847048594935553",
                          "shortcode": "DTfS7SMEk8B",
                          "url": "https://www.instagram.com/reel/DTfS7SMEk8B/",
                          "kind": "video",
                          "productType": null,
                          "caption": "Four seasons in one valley. Which month would you pick? 🏔️\n\n#travel #switzerland #nature",
                          "createdAt": null,
                          "likeCount": null,
                          "commentCount": null,
                          "playCount": 30214234,
                          "videoDuration": null,
                          "shareCount": null,
                          "repostCount": null,
                          "saveCount": null,
                          "countsHidden": null,
                          "width": null,
                          "height": null,
                          "altText": null,
                          "thumbnailUrl": "https://scontent.cdninstagram.com/v/t51.71878-15/...",
                          "assets": [
                            {
                              "kind": "video",
                              "url": "https://scontent.cdninstagram.com/o1/v/t2/f2/m86/...",
                              "width": null,
                              "height": null,
                              "downloadUrl": "https://api.fetchlayer.dev/instagram/media?url=..."
                            }
                          ],
                          "carousel": [],
                          "author": {
                            "id": "787132",
                            "username": "natgeo",
                            "fullName": null,
                            "profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/...",
                            "verified": true,
                            "privateAccount": null,
                            "profileUrl": "https://www.instagram.com/natgeo/"
                          },
                          "coauthors": [],
                          "taggedUsers": [],
                          "location": null,
                          "hashtags": [
                            "travel",
                            "switzerland",
                            "nature"
                          ],
                          "mentions": [],
                          "topics": [],
                          "hasAudio": null,
                          "fieldsFrom": "listing"
                        }
                      ],
                      "postCount": 12,
                      "hasMore": true,
                      "nextCursor": "QVFEZ..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/trending-searches": {
      "post": {
        "operationId": "trending-searches",
        "tags": [
          "Discovery"
        ],
        "summary": "List what Instagram is trending",
        "description": "The search terms Instagram itself is promoting, grouped into its own sections, each with Instagram’s count of posts under it. Use it to see what Instagram is putting in front of everyone; it is not keyword search, which Instagram does not make public.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "description": "Maximum terms returned, up to 100. Use -1 for the maximum. When Instagram publishes more terms than were returned, the note says how many.",
                    "example": "48"
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false
              },
              "examples": {
                "default": {
                  "value": {
                    "limit": 48
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "searches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "keyword": {
                            "type": "string",
                            "description": "The term Instagram is promoting."
                          },
                          "mediaCount": {
                            "type": "number",
                            "description": "Posts Instagram counts under the term. Instagram’s own figure, and rounded by it; null when Instagram shows no count for the term."
                          },
                          "section": {
                            "type": "string",
                            "description": "The section Instagram published it under. There are currently seven — \"Trending now\", \"Pop culture moments\", \"Find what you’re into\", \"Get inspired\", \"Learn something new\", \"Shop the trends\" and \"What’s happening now\" — but the set changes over time, and the note names the sections in each response."
                          }
                        }
                      },
                      "description": "The trending terms, in Instagram’s own order."
                    },
                    "searchCount": {
                      "type": "number",
                      "description": "How many terms are in this response."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [
                        "Grouped into the 7 sections Instagram publishes: \"Trending now\", \"Pop culture moments\", \"Find what you're into\", \"Get inspired\", \"Learn something new\", \"Shop the trends\", \"What's happening now\".",
                        "Counts are Instagram’s own figure for posts under each term, and are rounded by it.",
                        "Instagram published 84 terms; raise limit to get the rest."
                      ],
                      "pagesFetched": 1,
                      "searches": [
                        {
                          "keyword": "kash patel",
                          "mediaCount": 142014,
                          "section": "Trending now"
                        },
                        {
                          "keyword": "nlcs",
                          "mediaCount": 470996,
                          "section": "Trending now"
                        },
                        {
                          "keyword": "halloween costume ideas",
                          "mediaCount": 901431,
                          "section": "Get inspired"
                        },
                        {
                          "keyword": "cute animals",
                          "mediaCount": null,
                          "section": "Find what you're into"
                        }
                      ],
                      "searchCount": 48
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/resolve-url": {
      "post": {
        "operationId": "resolve-url",
        "tags": [
          "Utilities"
        ],
        "summary": "Parse an Instagram URL (free)",
        "description": "Turns any Instagram link into the fields the other routes take: what it points to — a post, reel, account, story, hashtag or place — and the short code, id or username it carries. Use it before choosing a route. Free: it costs no credit.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Any Instagram link: a post, a reel, an account, a hashtag or a place. A link to something Instagram does not make public, such as a hashtag page or a place, is still identified, with a note saying it is not available — the cheapest way to find that out."
                  },
                  "format": {
                    "type": "string",
                    "description": "json or markdown, in any case; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON.",
                    "example": "json"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "description": "Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds), so you can set it to your own client’s timeout. Left out, the request runs as long as it needs."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "url"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "url": "https://www.instagram.com/p/DcOX3hWFiey/"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transport": {
                      "type": "string",
                      "description": "The data source: always the platform id, \"instagram\"."
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array."
                    },
                    "pagesFetched": {
                      "type": "number",
                      "description": "Pages of results fetched, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed."
                    },
                    "kind": {
                      "type": "string",
                      "description": "One of post, reel, profile, hashtag, location, story, explore or unknown. A highlight link (/stories/highlights/<id>/) is story, with no username. A share link (/share/…) does not say which post it points to, so it is unknown, with a note to open it and pass the link it lands on; a sound or audio page is unknown too."
                    },
                    "canonicalUrl": {
                      "type": "string",
                      "description": "The link in its canonical form, or null."
                    },
                    "username": {
                      "type": "string",
                      "description": "The account handle, when the link carries one. A post link that includes the account (/<username>/p/<code>/) returns both username and shortcode."
                    },
                    "shortcode": {
                      "type": "string",
                      "description": "The post or reel short code, when the link points at one."
                    },
                    "postId": {
                      "type": "string",
                      "description": "The numeric media id, when it can be decoded from the short code."
                    },
                    "hashtagName": {
                      "type": "string",
                      "description": "The tag, when the link points at a hashtag. Posts under a hashtag are not available — the note says so."
                    },
                    "locationId": {
                      "type": "string",
                      "description": "The place id, when the link points at a location. Posts at a place are not available either."
                    }
                  },
                  "additionalProperties": true
                },
                "examples": {
                  "default": {
                    "value": {
                      "transport": "instagram",
                      "notes": [],
                      "pagesFetched": 0,
                      "kind": "post",
                      "canonicalUrl": "https://www.instagram.com/p/DcOX3hWFiey/",
                      "username": null,
                      "shortcode": "DcOX3hWFiey",
                      "postId": "3967213292204992434",
                      "hashtagName": null,
                      "locationId": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/media": {
      "get": {
        "operationId": "media",
        "tags": [
          "Utilities"
        ],
        "summary": "Stream an image or video asset",
        "description": "Re-fetches one asset and streams it back, with Range requests supported. Instagram’s own asset URLs are signed and expire, so every asset in a response carries a downloadUrl pointing here instead. Only Instagram’s own CDN hosts can be fetched; anything else is a 400 saying so. Billing: 1 credit.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "The asset URL, taken from an asset’s downloadUrl or from a profilePicUrl or coverUrl. Must be an Instagram CDN host.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input: the request needs fixing; error names the field.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized: the API key is missing or not valid.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credits: no credits, trial or monthly allowance left.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "forbidden: this key or account is not allowed this request.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "quota_exceeded: a request-rate limit was reached.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "temporarily_unavailable, time_limit or (on a store route) store_unreachable: ask again (with time_limit, allow more time). Retryable.",
            "headers": {
              "X-Request-Id": {
                "description": "The request id, equal to requestId in the body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  }
}