# solari fetch instagram posts

> Instagram アカウントの投稿・リール・タグ付けされた投稿をその場で収集します。

- **CLI**: `solari fetch instagram posts`
- **MCP ツール**: `solari_fetch_instagram_posts`
- **アクセス権**: `solari:read`
- **対象プラン**: 無料トライアル · Plus · Pro · Enterprise
- **クレジット**: 1

Instagram アカウントのタブを 1 つその場で収集し、同じ呼び出しで投稿をタブの順番どおりに再生数・いいね・コメント付きで返します。type でタブを選びます: posts（プロフィールグリッド）、reels（リール）、tagged_posts（他のアカウントがこのアカウントをタグ付けした投稿）。

**どんなときに使うか** — アカウントの最新投稿や現在のリール再生数が必要なとき、または catalog account posts の結果に抜けがある・古いと感じるとき。

**返される内容** — 収集した投稿（catalog account posts と同じ item 形式）と、収集の結果。

## パラメータ

- `username` (string, 必須, ≤ 64 chars) — Instagram のユーザー名。
- `type` (enum, 任意, 既定値 "posts") — posts（プロフィールグリッド）、reels（リールタブ）、tagged_posts（他のアカウントがこのアカウントをタグ付けした投稿）。 値: `posts`, `reels`, `tagged_posts`.
- `pages` (integer, 任意, 既定値 1, 1–3) — 収集するタブのページ数。1 ページはおよそ 12 件です。
- `cursor` (string, 任意, ≤ 8192 chars) — 前回の呼び出しの collection.next_cursor。渡すと、その次の（より古い）ページから続けて収集します。

## レスポンス

### `Response`

- `found` (boolean) — Instagram にそのハンドルのアカウントがない場合は false。このとき items は空です。
- `account_id` (uuid) — 対象のアカウント。
- `username` (string) — 特定したハンドル。
- `type` (string) — 収集したタブ。
- `collection` (object) — 収集の結果。
- `total` (integer) — items に入っている投稿の数。
- `items` (object[]) — 収集した投稿（タブの順番どおり）。
- `note` (string) — 伝えることがあるときだけ返ります: 非公開アカウント、タブを取得できない、保存中の投稿がある、さらにページがある。
- `next` (string) — タブにまだ続きがあるときだけ: cursor=next_cursor を付けた同じ呼び出しで続きを収集します。

### `collection`

- `type / pages` (string / integer) — 読んだタブとページ数。
- `fetched_count` (integer) — Instagram が返した投稿の数。
- `stored_count` (integer) — この呼び出しでカタログに保存・更新した投稿の数。
- `has_more` (boolean) — 読んだページより先にタブが続く場合は true。cursor=next_cursor で続きを収集します。
- `truncated` (boolean) — 要求したページをすべて読む前に収集が止まった場合は true。
- `pending_count` (integer) — まだ保存中の投稿の数。これらの item には当面 post_id, slug, url, posted_at だけが入ります。
- `skipped_reason` (string | null) — 何も収集しなかった理由。private は非公開アカウントという意味です。
- `unavailable_reason` (string | null) — Instagram がタブを返さなかった理由。

### `items[]`

- `post_id` (uuid) — SOLARI の投稿 ID。
- `slug` (string) — Instagram のショートコード。
- `url` (string) — 公開パーマリンク。
- `post_type` (string) — reel, video, photo, carousel のいずれか。
- `posted_at` (timestamp) — 公開日時（UTC）。
- `text` (string) — キャプション。
- `like_count / comment_count` (integer) — エンゲージメント。
- `play_count` (integer | null) — 再生数。Instagram が再生数を返さない場合は null で、写真の多くがこれにあたります。
- `media_count` (integer) — メディアの数。
- `is_paid_partnership` (boolean | null) — Instagram の「タイアップ投稿」ラベル。
- `medias` (object[]) — すべてのメディア（カルーセルの順番どおり）。
- `assets` (object[]) — メディアファイル（順番どおり）。それぞれに直接ダウンロードできる asset_url, media_type, video_duration があります。
- `thumbnail_url` (string) — サムネイル。
- `author_username / author_account_id` (string / uuid) — tagged_posts のときだけ: 投稿したアカウント。

## 例

```console
$ solari fetch instagram posts username=innisfreeofficial type=reels
```

_読みやすさのため、長い文字列と繰り返しの配列要素を省略しています。_

```json
{
  "found": true,
  "account_id": "018cabce-14cc-7544-8890-7811ec33ef74",
  "username": "innisfreeofficial",
  "type": "reels",
  "collection": {
    "type": "reels",
    "pages": 1,
    "fetched_count": 12,
    "stored_count": 12,
    "has_more": true,
    "truncated": false,
    "next_cursor": "eyJhIjoiMDE4Y2FiY2UiLCJ0IjoicmVlbHMiLCJjIjoiUUZEIn0",
    "pending_count": 0,
    "skipped_reason": null,
    "unavailable_reason": null
  },
  "total": 12,
  "items": [
    {
      "post_id": "01a06275-d974-7fda-98ee-dd3ee15b4dcf",
      "slug": "DcyMAmUh6FZ",
      "url": "https://www.instagram.com/p/DcyMAmUh6FZ/",
      "post_type": "reel",
      "posted_at": "2026-09-02T12:00:06+00:00",
      "text": "Deeply hydrated skin—NO OFF HOURS. 💚\nwherever the day takes MINGYU (@min9yu_k)—his hydration stays SUPERCHARGED ⚡️\n\nGreen Tea Ceramide Milk: Lightweight milky toner that won‘t clog your pores\nGreen Tea Ceramide Mist: Tou …",
      "like_count": 3224,
      "comment_count": 57,
      "play_count": 22467,
      "media_count": 1,
      "is_paid_partnership": false,
      "medias": [
        {
          "media_type": "video",
          "media_url": "https://smr-images-b.bzine.co/users/018cabce-14cc-7544-8890-7811ec33ef74/posts/01a06275-d974-7fda-98ee-dd3ee15b4dcf/medias/01a06275-db2b-77f7-a020-b4beb744771f.mp4",
          "thumbnail_url": "https://bzine.co/cdn-cgi/media/width=480,mode=frame,time=0ms/https://smr-images.bzine.co/users/018cabce-14cc-7544-8890-7811ec33ef74/posts/01a06275-d974-7fda-98ee-dd3ee15b4dcf/medias/01a06275-db2b-77f7-a020-b4beb744771f.m …",
          "video_duration": 23.868000030517578,
          "tags": []
        }
      ],
      "assets": [
        {
          "asset_url": "https://smr-images-b.bzine.co/users/018cabce-14cc-7544-8890-7811ec33ef74/posts/01a06275-d974-7fda-98ee-dd3ee15b4dcf/medias/01a06275-db2b-77f7-a020-b4beb744771f.mp4",
          "media_type": "video",
          "video_duration": 23.868000030517578
        }
      ],
      "thumbnail_url": "https://bzine.co/cdn-cgi/media/width=480,mode=frame,time=0ms/https://smr-images.bzine.co/users/018cabce-14cc-7544-8890-7811ec33ef74/posts/01a06275-d974-7fda-98ee-dd3ee15b4dcf/medias/01a06275-db2b-77f7-a020-b4beb744771f.m …"
    },
    "… 11 more"
  ],
  "note": "The tab has more posts: request up to 3 pages to collect further back.",
  "next": "solari fetch instagram posts username=innisfreeofficial type=reels pages=3 cursor=eyJhIjoiMDE4Y2FiY2UiLCJ0IjoicmVlbHMiLCJjIjoiUUZEIn0"
}
```

## MCP で呼び出す場合

```json
{
  "name": "solari_fetch_instagram_posts",
  "arguments": {
    "username": "innisfreeofficial",
    "type": "reels"
  }
}
```

## 注意点

- 再生数は type=reels で確認してください。プロフィールグリッドの写真は play_count が null になります。
- 最近の投稿をすべて見たいときや現在の再生数が必要なときは、catalog instagram account posts ではなくこちらを使います。保存済みのカタログには抜けがあったり、古かったりすることがあります。
- 1 回の呼び出しには通常 5〜45 秒かかります。収集した投稿はカタログにも保存されます。
- 非公開アカウントは items が空で、collection.skipped_reason=private になります。未知のハンドルはまず収集し、found=false なら Instagram にそのアカウントは存在しません。
- likes_hidden が true のときは like_count を使わないでください。投稿者がいいね数を非表示にしているため、null か、実際の値ではない可能性があります。

## 関連ツール

- [`solari_catalog_instagram_account_posts`](https://clip-pub.bzine.co/docs/tools/catalog-instagram-account-posts.md?lang=ja)
- [`solari_fetch_instagram_account`](https://clip-pub.bzine.co/docs/tools/fetch-instagram-account.md?lang=ja)
- [`solari_fetch_instagram_post`](https://clip-pub.bzine.co/docs/tools/fetch-instagram-post.md?lang=ja)
- [`solari_fetch_instagram_hashtag_posts`](https://clip-pub.bzine.co/docs/tools/fetch-instagram-hashtag-posts.md?lang=ja)
