{"id":51641066,"url":"https://github.com/tamnd/instagram-cli","last_synced_at":"2026-07-13T19:03:17.047Z","repository":{"id":368200875,"uuid":"1269139142","full_name":"tamnd/instagram-cli","owner":"tamnd","description":"Read public Instagram profiles, posts, and links as JSON records, no API key needed","archived":false,"fork":false,"pushed_at":"2026-06-29T13:12:47.000Z","size":90,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"read-the-two-planes","last_synced_at":"2026-06-29T14:24:12.943Z","etag":null,"topics":["cli","golang","instagram","json","scraper","social-media","web-scraping"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamnd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-14T10:56:48.000Z","updated_at":"2026-06-29T13:13:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tamnd/instagram-cli","commit_stats":null,"previous_names":["tamnd/instagram-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tamnd/instagram-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Finstagram-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Finstagram-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Finstagram-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Finstagram-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamnd","download_url":"https://codeload.github.com/tamnd/instagram-cli/tar.gz/refs/heads/read-the-two-planes","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Finstagram-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35432827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","golang","instagram","json","scraper","social-media","web-scraping"],"created_at":"2026-07-13T19:03:09.757Z","updated_at":"2026-07-13T19:03:17.018Z","avatar_url":"https://github.com/tamnd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ig\n\nA command line for Instagram. `ig` reads public Instagram data and prints clean,\npipeable records. One pure-Go binary, no API key, no login, no cookie.\n\nIt reads two public surfaces. A post or reel page is read from the Open Graph\ntags it ships to a crawler, so `ig post` and `ig reel` answer from anywhere. A\nprofile and its recent posts come from the `web_profile_info` endpoint the web\nclient calls, which answers from a residential connection and is walled from a\ndatacenter IP. Every request is paced, retried on transient failures, and sent\nwith an honest User-Agent.\n\nThe same package is also a [resource-URI driver](#use-it-as-a-resource-uri-driver),\nso a host program like [ant](https://github.com/tamnd/ant) can address Instagram\nas `instagram://` URIs.\n\n`ig` is an independent tool. It is not affiliated with, authorized, or endorsed\nby Instagram or Meta.\n\n## Install\n\n```bash\ngo install github.com/tamnd/instagram-cli/cmd/ig@latest\n```\n\nOr grab a prebuilt binary from the [releases](https://github.com/tamnd/instagram-cli/releases),\nor run the container image:\n\n```bash\ndocker run --rm ghcr.io/tamnd/ig:latest --help\n```\n\n## Usage\n\n```bash\nig profile instagram                     # one profile record\nig posts instagram -n 12                  # the recent posts on a profile\nig post DZf6PYtGyay                        # one post by shortcode\nig post https://www.instagram.com/p/DZf6PYtGyay/   # or by URL\nig reel https://www.instagram.com/reel/DZdQzr7vDa0/\nig raw instagram                           # the profile's upstream JSON\n```\n\nRecords come out as table, JSON, JSONL, CSV, TSV, url, or raw:\n\n```bash\nig profile nasa -o json\nig posts instagram -o csv --fields shortcode,type,like_count,comment_count\nig posts instagram -o url                  # just the links\nig profile nasa --template '{{.username}} {{.follower_count}}'\n```\n\nEvery record carries its own `url`, and a `source` field that says where it came\nfrom: `api` for the exact counts on the profile plane, `ssr` for the rounded\ncounts Instagram prints on a post page.\n\n### Global flags\n\n```\n-o, --output      table|json|jsonl|csv|tsv|url|raw   (auto: table on a TTY, jsonl when piped)\n    --fields      comma-separated columns to include\n    --template    Go text/template applied per record\n-n, --limit       max records (0 = command default)\n    --user-agent  override the User-Agent\n    --timeout     per-request timeout\n    --retries     retry attempts on 429/5xx\n```\n\n## Two planes, two reliabilities\n\nInstagram serves the same public data through two channels that fail\ndifferently.\n\nThe **SSR plane** reads the Open Graph tags a logged-out post or reel page ships\nto a crawler: the author, the caption, the display image, the date, and the like\nand comment counts (rounded, the way the page prints them). `ig post` and\n`ig reel` ride it and answer from anywhere, including a datacenter IP.\n\nThe **API plane** calls `/api/v1/users/web_profile_info` with the web app id the\nbrowser sends. It returns the full profile and the recent posts as exact JSON.\nFrom a residential session it answers; from a datacenter IP it is walled.\n`ig profile`, `ig posts`, and `ig raw` ride this plane. When the firewall gates a\ncall, `ig` exits 4 with a clear message instead of pretending it found nothing.\n\n## Exit codes\n\n```\n0  success, at least one record\n1  error\n2  usage error\n3  no data (a valid empty result)\n4  walled (the surface needs a residential session)\n6  not found (the username or shortcode does not exist)\n```\n\n## Serve it\n\nThe same operations are available over HTTP and as an MCP tool set for agents,\nwith no extra code:\n\n```bash\nig serve --addr :7777    # GET /v1/profile/\u003cusername\u003e returns NDJSON\nig mcp                   # speak MCP over stdio\n```\n\n## Use it as a resource-URI driver\n\n`ig` registers an `instagram` domain the way a program registers a database\ndriver with `database/sql`. A host enables it with one blank import:\n\n```go\nimport _ \"github.com/tamnd/instagram-cli/instagram\"\n```\n\nThen [ant](https://github.com/tamnd/ant) (or any program that links the package)\ndereferences `instagram://` URIs:\n\n```bash\nant get instagram://profile/instagram        # the profile record\nant get instagram://post/DZf6PYtGyay          # one post\nant cat instagram://profile/instagram         # just the biography text\nant url instagram://post/DZf6PYtGyay          # the live https URL\n```\n\n## Development\n\n```\ncmd/ig/        thin main: hands cli.NewApp to kit.Run\ncli/           assembles the kit App from the instagram domain\ninstagram/     the library: HTTP client, the two parsers, records, and the driver\npkg/igcode/    the shortcode \u003c-\u003e media id codec\ndocs/          tago documentation site\n```\n\n```bash\nmake build      # ./bin/ig\nmake test       # go test ./...\nmake vet        # go vet ./...\n```\n\n## Releasing\n\nPush a version tag and GitHub Actions runs GoReleaser, which builds the archives,\nLinux packages, the multi-arch GHCR image, checksums, SBOMs, and a cosign\nsignature:\n\n```bash\ngit tag v0.1.0\ngit push --tags\n```\n\nThe image tag carries no `v` prefix (`ghcr.io/tamnd/ig:0.1.0`). The Homebrew and\nScoop steps self-disable until their tokens exist, so the first release works\nwith no extra secrets.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Finstagram-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamnd%2Finstagram-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Finstagram-cli/lists"}