# Instagram accounts as posts channels Lane `lane/instagram`, begun 18 Nov 2026. Guide: OPERATING.md, "Instagram accounts". ## The ask An Instagram account becomes a posts channel, as an X account is: posts with their text, images, videos and reels, carousels, dates and links; and stories, which vanish in 24 h. Research reads and cites them like any post; video with speech should be transcribable. ## Rulings These are rulings, not reasons. A later ruling overturns an earlier one only when it says so. **Safety** - All Instagram traffic goes through the editor's Instagram queue (`platform:instagram`): one job at a time, ten minutes apart, only as the editor's own job. Never a burst, never a retry. - A login is required: logged out, the feed answers "Page Not Found" (one read, 18 Nov 2026). The cookie source is the channel's own `cookiesFromBrowser`, never the global browser. The operator will use an account made for the archive. Nothing logs in or refreshes a session unattended. - The first 429 ends the run and holds Instagram for 60 minutes. One 401/403 does the same; a second in a row with no clean read between raises the alert. A login, challenge or checkpoint page raises Instagram's alert, which refuses every Instagram job until a person's Recheck (no request). The recheck timer never asks. - After a refusal in the listing no media is asked for: everything Instagram stops, its CDN too. - A request line is read as it arrives: a refusal during the account lookup ends the run (gallery-dl swallows it). Posts with no request line read are a failure. - A logged-out 404 on the search or the feed is the login, never "account gone". An account is gone only when its own page answered 404. - yt-dlp is never started on an instagram.com URL (slice 1). A single reel's import is a later slice's. - Development and tests use invented fixtures and the fake gallery-dl. No test opens a socket. **The store** - A post's id is its numeric media pk; the shortcode is kept in `Post.instagram` and converts both ways. - A carousel is one post with several media; a reel is one video. A collaboration's author is the owner; the channel's account is among `coauthors`. - Media are fetched in the fetch job (their addresses expire): only from `.cdninstagram.com` / `.fbcdn.net`, no cookies, no referer, `Mozilla/5.0`. A sync: 40 files / 200 MB. A walk: 120 files / 600 MB, and it lists no more posts than that, leaving the posts whose media would not fit for the next run. A file: 100 MB. - `posts-media/` is not in the media tier. - Instagram posts are private unless `social.instagram.visibility` is `"public"`, by X's rule shape. A Wayback pages channel scoped to instagram.com follows it. Stories are never public. ## Slice 1, as built (fetcher, store, channel, ops) - Platform `instagram`: `common/lib/instagram/` (ids, the yt-dlp refusal), `Post.instagram`, the job gap, the visibility rule, the per-platform guard table (`common/jobs/networkGuard.ts PLATFORM_GUARDS`, `instagramGuard.ts`), the service alert. - Fetcher `instagram-gallery-dl` (`common/social/instagramGalleryDlFetcher.ts`, `instagramSignals.ts`, `instagramNormalize.ts`), media (`instagramMedia.ts`), the controller's part (`controller/fetchPosts.ts`). - gallery-dl runs with `--dump-json` and NOT `output.jsonl`: with it on, the exception that ended a run is printed nowhere and the run exits 0. A stopped run is stopped with SIGINT, which prints what it has. - Sync new: one page. A walk: 120 posts, then the cursor. A sync whose page is all new continues from the top down to its watermark, skipping what it archived. - The scheduler: every 12 h at the most often (4 h with an interval of its own); no slot for a channel with no cookie source or while Instagram is held; a restart never re-queues an Instagram job. - The channel form asks for the cookie source in the Source section. `capture-posts`, `retryOnBlock`, the older walk and the deleted-posts sweep refuse an Instagram channel by name. - Tests: `common/lib/instagram/*.test.ts`, `common/social/instagram*.test.ts`, `common/jobs/instagram*.test.ts`, `editor/e2e/instagram.spec.ts` with `editor/e2e/fixtures/bin/fake-gallery-dl-instagram.mjs`. **Review 2 (18 Nov), as fixed.** N1 a queue override ran an Instagram fetch beside the one on its queue: the action refuses any queue but `platform:instagram`, and the fetch refuses when its job is on another (the job context carries the queue). N2 a trimmed walk resumes from its own start (no page size assumed). N3 the walls are path segments, never a word in a handle. N4 no request line read is a failure whatever was printed. N5 the fetcher must match the URL's platform too. N6 a stopped run is not a clean read. N7 one predicate for "an Instagram channel" (`common/lib/instagram/channel.ts`). N8 the yt-dlp refusal is in the shared `jitter.mjs` (umtool's scripts too) and a metadata scan's batch file. **Review 1 (18 Nov), as fixed.** M1 a continuing sync dropped the gap (it stopped at its own posts); M2 a refusal during the lookup did not end the run; M3 the CLI's `posts fetch` ran past the guard, and a fetcher of another platform could. S1–S13: digits inside captions, no media after a refusal, the media half's deadline, host allowlist, User-Agent, write errors, a walk sized to its media, the second 401/403, private before the error row, the scheduler's skips, yt-dlp refused, Wayback captures and tombstones, the cookie source out of the log. ## Slice 2 (not built): stories, the cookie row, owed media - `fetch-stories` on the same queue, a per-channel switch with its own interval (off by default), and a timer armed below the idle gate. Stories need the login; a story deleted before the next read is missed. - A row on /cookies and a jar of its own with an age rule; nothing refreshes it unattended. - **The owed-media collector**: `capture-posts` for Instagram (media only, one request per post for fresh addresses). Slice 1 records `mediaOwed` and collects nothing. - An ops read of what an Instagram job would be told now (the alert, the hold), as `get x-session` is for X. ## Slice 3 (not built): viewer, export, transcription - PostBody: a kind badge, a carousel, a story's expiry. Published captures for a public Instagram channel. - `import-post` for one Instagram URL; a single reel's import (through the fetcher, never yt-dlp). - Highlights, by hand. - Transcription of a post's video: nothing transcribes `posts-media/` today, for any platform. - The deleted-posts sweep. ## Open - A logged-in probe (the fetcher's own argv, 3 posts) has not been run: the row shape, the page size, the cursor line and the CDN hosts are from gallery-dl 1.32.9's source. - A `--cookies-from-browser` spec that yields no session is not detected before the run: it costs three requests logged out, then raises the alert.