{"id":37083952,"url":"https://github.com/yogeshwaran01/instagramy","last_synced_at":"2026-01-14T10:15:14.314Z","repository":{"id":38411476,"uuid":"293125798","full_name":"yogeshwaran01/instagramy","owner":"yogeshwaran01","description":"Python Package for Instagram Users, Posts, and Hashtag data. ","archived":true,"fork":false,"pushed_at":"2022-04-21T04:26:48.000Z","size":2184,"stargazers_count":153,"open_issues_count":6,"forks_count":33,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-25T14:22:21.561Z","etag":null,"topics":["instagram","instagram-downloader","instagram-scraper","pypi-package","python","python3","scraper","yogeshwaran01"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/instagramy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yogeshwaran01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-05T17:44:52.000Z","updated_at":"2025-08-10T19:10:56.000Z","dependencies_parsed_at":"2022-07-12T15:31:03.293Z","dependency_job_id":null,"html_url":"https://github.com/yogeshwaran01/instagramy","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/yogeshwaran01/instagramy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogeshwaran01%2Finstagramy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogeshwaran01%2Finstagramy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogeshwaran01%2Finstagramy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogeshwaran01%2Finstagramy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yogeshwaran01","download_url":"https://codeload.github.com/yogeshwaran01/instagramy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogeshwaran01%2Finstagramy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["instagram","instagram-downloader","instagram-scraper","pypi-package","python","python3","scraper","yogeshwaran01"],"created_at":"2026-01-14T10:15:13.487Z","updated_at":"2026-01-14T10:15:14.306Z","avatar_url":"https://github.com/yogeshwaran01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- headings --\u003e\n\n\u003ch1 align=\"center\"\u003e Instagramy \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003ePython Package for Instagram Without Any external dependencies\u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/instagramy/\"\u003e\n    \u003cimg alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/instagramy.svg\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pepy.tech/project/instagramy\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://pepy.tech/badge/instagramy\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/yogeshwaran01/instagramy/stargazers\"\u003e\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/yogeshwaran01/instagramy\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/yogeshwaran01/instagramy/network\"\u003e\n    \u003cimg alt=\"GitHub forks\" src=\"https://img.shields.io/github/forks/yogeshwaran01/instagramy\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/yogeshwaran01/instagramy/blob/master/LICENSE.txt\"\u003e\n    \u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/yogeshwaran01/instagramy?color=blue\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\n    \u003cimg alt=\"Code style\" src=\"https://img.shields.io/badge/codestyle-Black-blue\"/\u003e\n    \u003c/a\u003e\n    \u003cimg alt=\"GitHub Repo size\" src=\"https://img.shields.io/github/repo-size/yogeshwaran01/instagramy\"/\u003e\n    \u003ca href=\"https://github.com/yogeshwaran01/instagramy/actions/workflows/python-publish.yml\"\u003e\u003cimg alt=\"GitHub Actions\" src=\"https://github.com/yogeshwaran01/instagramy/workflows/Upload%20Python%20Package/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/yogeshwaran01/instagramy/actions/workflows/python-package.yml\"\u003e\u003cimg alt=\"GitHub Actions\" src=\"https://github.com/yogeshwaran01/instagramy/workflows/Python%20package/badge.svg\"\u003e\u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003c/hr\u003e\n\n\u003cp align=\"center\"\u003e\nScrape Instagram Users Information, Posts data, Hashtags and Locations data. This Package scrapes the user's recent posts with some information like likes, comments, captions and etc. No external dependencies.\n\u003c/p\u003e\n\n\u003c!-- Features --\u003e\n\n## Features\n\n- It scrapes most of the data of [Instagram user](#Instagram-User-details), [hastags](#Instagram-Hashtag-details), [Posts](#Instagram-Post-details) and [Location](#Instagram-Location-details)\n- You can use this package [with login](#Sample-Usage) or [without login](#Use-Without-Login)\n- Download [Instagram post](#Plugins-for-Downloading-Posts) and [User profile picture](#Plugins-for-Downloading-Posts)\n- Have some [plugins](#Plugins) for Data analysis\n- No External dependencies\n- Having [caching Function](#Caching-Feature)\n- Lightweight\n- Easy to Use\n\n\u003c!-- Downloading Guides --\u003e\n\n## Download\n\n### Installation\n\n```bash\n\npip install instagramy\n\n```\n\n### Upgrade\n\n```bash\n\npip install instagramy --upgrade\n\n```\n\n\u003c!-- Usage --\u003e\n\n## Sample Usage\n\n### Getting Session Id of Instrgram\n\nFor Login into Instagram via instagramy session id is required. No username or password is Needed. You must be login into Instagram via Browser to get session id\n\n1. Login into Instagram in default webbrowser\n2. Move to Developer option\n3. Copy the sessionid\n   - Move to storage and then to cookies and copy the sessionid (Firefox)\n   - Move to Application and then to storage and then to cookies and copy the sessionid (Chrome)\n\n**Note:** Check for session id frequently, It may be changed by Instagram\n\n\u003cimg src=\"https://raw.githubusercontent.com/yogeshwaran01/instagramy/master/samples/sessionid.gif\" width=100% height=100%\u003e\n\n### Instagram User details\n\nClass `InstagramUser` scrape some of the information related to the user of the Instagram\n\n```python\n\u003e\u003e\u003e from instagramy import InstagramUser\n\n\u003e\u003e\u003e session_id = \"38566737751%3Ah7JpgePGAoLxJe%334\"\n\n\u003e\u003e\u003e user = InstagramUser('google', sessionid=session_id)\n\n\u003e\u003e\u003e user.is_verified\nTrue\n\n\u003e\u003e\u003e user.biography\n'Google unfiltered—sometimes with filters.'\n\n\u003e\u003e\u003e user.user_data # More data about user as dict\n```\n\nIf you get the data of the user onetime, instagramy store the data as cache file for avoid the error. you can get the data from cache also. Don't provide the sessionid.\n\n```python\n\u003e\u003e\u003e from instagramy import InstagramUser\n\n\u003e\u003e\u003e user = InstagramUser('google', from_cache=True)\n\n\u003e\u003e\u003e user.is_verified\nTrue\n```\n\nIt is opt of all classes `InstagramUser`, `InstagramHashTag` and `InstagramPost`.\n\n\u003cdetails\u003e\u003csummary\u003eShow all Properties\u003c/summary\u003e\n\u003cp\u003e\n\n- biography\n- connected_fb_page\n- followed_by_viewer\n- follows_viewer\n- fullname\n- has_blocked_viewer\n- has_country_block\n- has_requested_viewer\n- is_blocked_by_viewer\n- is_joined_recently\n- is_private\n- is_verified\n- no_of_mutual_follower\n- number_of_followers\n- number_of_followings\n- number_of_posts\n- other_info\n- posts\n- posts_display_urls\n- profile_picture_url\n- requested_by_viewer\n- restricted_by_viewer\n- username\n- website\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n`InstagramUser.user_data` has more data other than defined as `Properties`\n\n### Instagram Hashtag details\n\nClass `InstagramHashTag` scrape some of the information related to the hash-tag of the Instagram\n\nyou can also set your sessionid as env variable\n\n```bash\n$ export SESSION_ID=\"38566737751%3Ah7JpgePGAoLxJe%er40q\"\n```\n\n```python\n\u003e\u003e\u003e import os\n\n\u003e\u003e\u003e from instagramy import InstagramHashTag\n\n\u003e\u003e\u003e session_id = os.environ.get(\"SESSION_ID\")\n\n\u003e\u003e\u003e tag = InstagramHashtag('google', sessionid=session_id)\n\n\u003e\u003e\u003e tag.number_of_posts\n9556876\n\n\u003e\u003e\u003e tag.tag_data # More data about hashtag as dict\n```\n\n\u003cdetails\u003e\u003csummary\u003eShow all Properties\u003c/summary\u003e\n\u003cp\u003e\n\n- number_of_posts\n- posts_display_urls\n- profile_pic_url\n- tagname\n- top_posts\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n`InstagramHashTag.tag_data` has more data other than defined as `Properties`\n\n### Instagram Post details\n\nClass `InstagramPost` scrape some of the information related to the particular post of Instagram. It takes the post id as the parameter. You can get the post id from the URL of the Instagram posts from the property of `InstagramUser.posts`. or `InstagramHagTag.top_posts`\n\n```python\n\u003e\u003e\u003e from instagramy import InstagramPost\n\n\u003e\u003e\u003e session_id = \"38566737751%3Ah7JpgePGAoLxJe%334\"\n\n\u003e\u003e\u003e post = InstagramPost('CLGkNCoJkcM', sessionid=session_id)\n\n\u003e\u003e\u003e post.author\n'ipadpograffiti'\n\n\u003e\u003e\u003e post.number_of_likes\n1439\n\n\u003e\u003e\u003e post.post_data # More data about post as dict\n\n```\n\n\u003cdetails\u003e\u003csummary\u003eShow all Properties\u003c/summary\u003e\n\u003cp\u003e\n\n- author\n- caption\n- display_url\n- get_json\n- number_of_comments\n- number_of_likes\n- post_source\n- text\n- type_of_post\n- upload_time\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n`InstagramPost.post_data` has more data other than defined as `Properties`\n\n### Instagram Location details\n\nClass `InstagramLocation` scrape some of the information and posts related to the given Location . It takes the location id and slug as the parameter. You can get the location id and slug from the URL of the Instagram Location or from the property of `InstagramPost.location.id` and `InstagramPost.location.slug`.\n\n```python\n\u003e\u003e\u003e from instagramy import InstagramPost\n\n\u003e\u003e\u003e session_id = \"38566737751%3Ah7JpgePGAoLxJe%334\"\n\n\u003e\u003e\u003e post = InstagramPost('CLGkNCoJkcM', sessionid=session_id)\n\n\u003e\u003e\u003e location_id, slug = post.location.id, post.location.slug\n\n\u003e\u003e\u003e from Instagramy import InstagramLocation\n\n\u003e\u003e\u003e location = InstagramLocation(location_id, slug, session_id)\n\n\u003e\u003e\u003e location.latitude\n28.6139\n\n\u003e\u003e\u003e location.longitude\n77.2089\n\n\u003e\u003e\u003e location.address\n{'street_address': 'T2, Indira Gandhi International Airport', 'zip_code': '', 'city_name': 'New Delhi', 'region_name': '', 'country_code': 'IN', 'exact_city_match': False, 'exact_region_match': False, 'exact_country_match': False}\n```\n\nyou can also get the location id and slug from the instagram url\n\n```url\nhttps://www.instagram.com/explore/locations/977862530/mrc-nagar\nhttps://www.instagram.com/explore/locations/\u003clocation_id\u003e/\u003cslug\u003e\n```\n\n\u003cdetails\u003e\u003csummary\u003eShow all Properties\u003c/summary\u003e\n\u003cp\u003e\n\n- address\n- id\n- latitude\n- location_data\n- longitude\n- name\n- number_of_posts\n- phone\n- profile_pic_url\n- sessionid\n- slug\n- top_posts\n- url\n- viewer\n- website\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n`InstagramLocation.location_data` has more data other than defined as `Properties`\n\n### Plugins\n\nInstagramy has some plugins for ease\n\n#### Plugins for Data Analyzing\n\n- analyze_users_popularity\n- analyze_hashtags\n- analyze_user_recent_posts\n\n```python\n\u003e\u003e\u003e import pandas as pd\n\u003e\u003e\u003e from instagramy.plugins.analysis import analyze_users_popularity\n\n\u003e\u003e\u003e session_id = \"38566737751%3Ah7JpgePGAoLxJe%334\"\n\n\u003e\u003e\u003e teams = [\"chennaiipl\", \"mumbaiindians\",\n        \"royalchallengersbangalore\", \"kkriders\",\n        \"delhicapitals\", \"sunrisershyd\",\n        \"kxipofficial\"]\n\u003e\u003e\u003e data = analyze_users_popularity(teams, session_id)\n\u003e\u003e\u003e pd.DataFrame(data)\n\n                   Usernames  Followers  Following  Posts\n0                 chennaiipl    6189292        194   5646\n1              mumbaiindians    6244961        124  12117\n2  royalchallengersbangalore    5430018         59   8252\n3                   kkriders    2204739         68   7991\n4              delhicapitals    2097515         75   9522\n5               sunrisershyd    2053824         70   6227\n6               kxipofficial    1884241         67   7496\n```\n\n#### Plugins for Downloading Posts\n\n- download_hashtags_posts\n- download_post\n- download_profile_pic\n\n```python\n\u003e\u003e\u003e import os\n\n\u003e\u003e\u003e from instagramy.plugins.download import *\n\n\u003e\u003e\u003e session_id = os.environ.get('SESSION_ID')\n\n\u003e\u003e\u003e download_profile_pic(username='google', sessionid=session_id, filepath='google.png')\n\n\u003e\u003e\u003e download_post(id=\"ipadpograffiti\", sessionid=session_id, filepath='post.mp4')\n\n\u003e\u003e\u003e download_hashtags_posts(tag=\"tamil\", session_id=session_id, count=2)\n```\n\n### Use Without Login\n\nYou can use this package without login. Sessionid is not required but it may rise `RedirectionError` error after four to five requests.\n\n```python\n\u003e\u003e\u003e from instagramy import *\n\n\u003e\u003e\u003e user = InstagramUser('google')\n\u003e\u003e\u003e user.fullname\n'Google'\n\u003e\u003e\u003e tag = InstagramHashTag('python')\n\u003e\u003e\u003e tag.tag_data\n```\n\n### Caching Feature\n\nfrom version `4.3`, Added the new feature that is caching the required data. If you get the data of the user onetime, instagramy store the data as cache json file for avoid the error. you can get the data from cache also. Don't need to provide the sessionid. Instead of sessionid add the optional parameter `from_cache=True`.\n\n```python\n\u003e\u003e\u003e from instagramy import InstagramUser\n\n\u003e\u003e\u003e user = InstagramUser('google', from_cache=True)\n\n\u003e\u003e\u003e user.is_verified\nTrue\n```\n\nIt is opt of all classes `InstagramUser`, `InstagramHashTag`, `InstagramPost` and `InstagramLocation`.\n\nClear all Caches created by instagramy in current dir by\n\n```python\n\u003e\u003e\u003e from instagramy.core.cache import clear_caches\n\n\u003e\u003e\u003e clear_caches() # clear all caches of instagramy\n\n```\n\nList of all Cache files created by instagramy in current dir\n\n```python\n\u003e\u003e\u003e from instagramy import list_caches\n\n\u003e\u003e\u003e list_caches() # list all caches of instagramy\n```\n\n## Sample Scripts\n\n### Getting Email address and phone number\n\n```python\nuser = InstagramUser('username')\nemail, phone_number = user.user_data['business_email'], user.user_data['business_phone_number']\n```\n\n## ✏️ Important Notes\n\n- Don't send huge request to Instagram with sessionid, Instagram may ban you.\n- You can use this package without sessionid (Login). But it may `RedirectionError` after four to five requests.\n- class `Viewer` provide the data about currently logged in user.\n- Check for session id frequently, It may be changed by Instagram\n- If code execution is never gets completed, check and change your session id and try again.\n- Don't provide the wrong session_id.\n- `InstagramUser.user_data`, `InstagramPost.post_data`, `InstagramHashtag.tag_data` and `InstagramLocation.location_data` which is python `dict` has more and more data other than defined as `Properties`.\n- This Package does not scrap all the posts from an account, the limit of the post only 12 (For non-private account)\n- This Package not scrap all the posts of given hash-tag and location it only scrapes the top 60 - 72 posts.\n\n\u003c!-- Conclution --\u003e\n\n## Disclaimer\n\nIf you send the huge request to the Instagram with session id Instagram may ban you. I am not responsible for any misuse or damage caused by this program.\n\n## License\n\n[MIT License](https://github.com/yogeshwaran01/instagramy/blob/master/LICENSE.txt)\n\n## Contributions\n\nContributions are Welcome. Feel free to report bugs in [issue](https://github.com/yogeshwaran01/instagramy/issues) and fix some bugs by creating [pull requests](https://github.com/yogeshwaran01/instagramy/pulls). Comments, Suggestions, Improvements and Enhancements are always welcome. Let disscuss about it [Here](https://github.com/yogeshwaran01/instagramy/discussions/9).\n\n\u003ch3 align=\"center\"\u003e Made with Python ❤️ \u003c/h3\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogeshwaran01%2Finstagramy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyogeshwaran01%2Finstagramy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogeshwaran01%2Finstagramy/lists"}