Get Instagram Account Details using Python With Source Code

Introduction :
Hello Curious Coders,
In this Project we are going to fetch the details of an Instagram Account. There is pre defined package in python named instaloader which is going to allow us to scrape through the instagram account of someone. Let’s get into it…..
Source Code :
Get Discount on Top Educational Courses
# Import instaloader package
import instaloader
# creating an Instaloader() object
ig=instaloader.Instaloader()
# Taking the instagram username as input from user
usrname=input("Enter username:")
#Fetching the details of provided useraname using instaloder object
profile=instaloader.Profile.from_username(ig.context, usrname)
# Printing the fetched details and storing the profile pic of that account
print("Username: ", profile.username)
print("Number of Posts Uploaded: ", profile.mediacount)
print(profile.username+" is having " + str(profile.followers)+' followers.')
print(profile.username+" is following " + str(profile.followees)+' people')
print("Bio: ", profile.biography)
instaloader.Instaloader().download_profile(usrname,profile_pic_only=True)
Code Explanation :
- Initially installed the instaloader package from cmd using command“pip install instaloader”
- We imported the required package instaloader
- Next we created an instaloader object
- Later we acquired username from the user using input() function
- Then we fetched all the details of the instagram user using Profile.from_username() method of instaloader package.
- Finally displayed all the fetched results on to the console.
Output :

*The Profile pic is selected in the same folder where your python file is saved in the folder which is same as user name on your system as follows….

Find More Projects
MathGenius Pro – AI-Powered Math Solver Using Python Introduction: From simple arithmetic to more complicated college-level subjects like integration, differentiation, algebra, matrices, …
CipherMaze: The Ultimate Code Cracking Quest Game Using Python Introduction: You can make CipherMaze, a fun and brain-boosting puzzle game, with Python …
Warp Perspective Using Open CV Python Introduction: In this article, we are going to see how to Create a Warp Perspective System …
Custom AI Story Generator With Emotion Control Using Python Introduction: With the help of this AI-powered story generator, users can compose stories …
AI Powered PDF Summarizer Using Python Introduction: AI-Powered PDF Summarizer is a tool that extracts and summarizes research papers from ArXiv PDFs using Ollama (Gemma 3 LLM). The …
AI Based Career Path Recommender Using Python Introduction: One of the most significant and frequently perplexing decisions in a person’s life is …