Bulk-unlike Instagram posts using a local Typer CLI managed by uv.
- uv
- Python 3.10 or newer (uv can install it)
- An Instagram data export in JSON format
- Your Instagram
sessionidbrowser cookie
git clone git@github.com:ereli/InstaMassUnliker.git
cd InstaMassUnliker
uv sync
uv run insta-unliker --helpDo not use sudo. uv creates an isolated .venv and installs the locked dependencies there.
There is no run.sh or other installer script — use uv sync and uv run insta-unliker for all commands.
You need liked_posts.json in the project root before running unlike. If it is missing, the CLI prints step-by-step instructions.
- Open Accounts Center.
- Select Your information and permissions.
- Select Download your information and choose the Instagram account.
- Request Some of your information → Likes.
- Choose Download to device, All time, and JSON format.
- Download the ZIP when Instagram notifies you it is ready (this can take hours or days).
Inside the archive, the file is at:
your_instagram_activity/likes/liked_posts.json
Extract it into the project root (replace DOWNLOAD.zip with your file):
unzip -j ~/Downloads/DOWNLOAD.zip your_instagram_activity/likes/liked_posts.json -d .
chmod 600 liked_posts.jsonOr unzip the archive fully and copy the file:
unzip ~/Downloads/DOWNLOAD.zip -d ~/Downloads/instagram-export
cp ~/Downloads/instagram-export/your_instagram_activity/likes/liked_posts.json ./liked_posts.json
chmod 600 liked_posts.jsonInstagram exports may encode the file as either an object containing likes_media_likes or as a top-level array. Both formats are supported.
Keep the downloaded original as a backup. The application removes completed entries from its local copy to checkpoint progress.
uv run insta-unliker account addThe command asks for your username and sessionid cookie. To find the cookie:
- Sign in at
https://www.instagram.com. - Open browser developer tools.
- Open Application or Storage → Cookies →
https://www.instagram.com. - Copy the value of the
sessionidcookie.
The cookie is hidden while entered and stored in accounts/USERNAME.json with owner-only permissions. It grants access to your logged-in account: never share or commit it. Log out that Instagram session when finished to revoke it.
uv run insta-unliker unlike USERNAMEExample:
uv run insta-unliker unlike ereliePress Ctrl+C once for a safe stop. Successful items are removed from liked_posts.json, and remaining entries are preserved for the next run.
Other commands:
uv run insta-unliker account list
uv run insta-unliker account remove USERNAME
uv run insta-unliker stats
uv run insta-unliker config
uv run insta-unliker menuRuntime settings live in config.json:
{
"delay": {"min": 0.8, "max": 2.0},
"break": {"min": 300, "max": 900, "probability": 0.0005},
"accounts": {},
"max_retries": 3,
"retry_delay": 10,
"error_cooldown": 30,
"checkpoint_every": 25,
"stop_on_unlike_failure": true
}Longer delays reduce request frequency but do not guarantee that Instagram will permit or ignore automation.
- This project uses an unofficial Instagram API. Instagram can change or block it without warning.
- Automated access may violate Instagram's terms and can trigger rate limits, challenges, or account restrictions.
- The session cookie is stored locally in plaintext.
accounts/,logs/, andliked_posts.jsonare excluded by.gitignore.- Do not commit other files from your Instagram export; they may contain private account data.
- Claims that automation is undetectable are not credible. Use this only if you accept the account risk.
uv sync
uv run pytestTests do not make live Instagram requests.
Licensed under the MIT License.