Repository navigation
v2.1.0 — Native Instagram accounts and extraction
Native Instagram extraction and persistent account imports are now available. The Android app method is the default; the previous RapidAPI method remains available directly or as an optional fallback.
Changes
- Import Instagram accounts through
POST /v1/instagram/accounts/importsusing CSV or JSON. Imports select and check a proxy, perform password/TOTP login, verify the session, and save it in PostgreSQL for immediate use and restart recovery. - Generate and persist a Pixel or Samsung device identity per imported account. No phone, ADB, Python, or instagrapi is required at runtime.
- Keep each account on its assigned proxy route; multiple accounts can share one IP. Use static/sticky proxies to preserve the actual egress IP.
- Use the oldest healthy accounts first, balance requests across them, and promote reserves when an active account is marked dead. Metadata and download concurrency are controlled independently per account.
- Return richer Instagram metadata, including
method,resolved_url, likes, views, comments, dimensions, duration, covers, and music metadata. Unavailable values remain null. Instagram music downloads are not included:music.audiois null. - Record direct legacy and fallback attempts, including failures, in
scrap_instagram_attempts.legacy_used. - Stop remaining import rows after upstream rate limiting, preserve the saved account's user agent for CDN downloads, and allow pinned downloads to continue during account-death persistence failures.
Upgrade
Deploy this tt-scrap version before the updated tt-bot client, which requires method and resolved_url in Instagram extraction responses.
For an initial rollout with the old provider available as fallback:
INSTAGRAM_METHOD=app
INSTAGRAM_ACTIVE_ACCOUNTS=10
INSTAGRAM_ACCOUNT_CONCURRENCY=1
INSTAGRAM_ACCOUNT_DOWNLOAD_CONCURRENCY=1
INSTAGRAM_LEGACY_FALLBACK=trueKeep the existing RAPIDAPI_KEY when enabling fallback. Fallback is disabled by default; it applies to extraction failures, not subsequent download failures. Set INSTAGRAM_METHOD=legacy to use only the previous provider while retaining the updated response format.
Keep the existing database/schema, API key, and proxy configuration. Startup automatically creates the Instagram account and attempt tables and adds persisted device state; the database role needs create/alter permissions. Run only one tt-scrap instance per schema and stop the previous instance before starting its replacement.
Import accounts into the production database after deployment. CSV First Secret Question contains the authenticator TOTP secret; a leading apostrophe is removed from usernames. Session seed files are optional when using API imports. Accounts become available without restarting. Without usable accounts or configured legacy fallback, readiness returns 503; account administration remains accessible through a reachable service origin.
After import, check the account list, extract a fresh post, confirm method: "app", and download its returned asset. Readiness alone can succeed through fallback.
Account import guide · Instagram configuration and telemetry
Validation
- CI passed on release commit
3a02f62: tests with the race detector, vet, build, staticcheck, govulncheck, Docker, and Railpack checks. - Live verification on 2026-10-30 successfully imported the development account through the HTTP API in an isolated database schema and downloaded a Reel and a photo using a saved session. This does not verify every account or the production deployment.