ProfileData is a read-only data container populated from the API response. Profile extends it with authenticated action methods that let you follow users, iterate their posts and followers, and fetch their stories or highlights.
Package
ProfileData
ProfileData holds the raw fields returned by Instagram for any user. It serves as the base class for Profile and is also returned directly by PublicAPIs.getProfileInfo.
Fields
The account’s username (without the
@ symbol).The unique numeric identifier for this account (Instagram’s internal primary key).
The full display name as shown on the profile page (
full_name in the API).The profile bio text. Empty string if the user has not set a bio.
URL of the user’s profile picture.
true if the account is registered as a business or creator account.true if the account is set to private.true if the account has a verified badge.Total number of posts published by the user. May be
0 if the endpoint that populated this object does not return a post count.Follower count. Returns
-1 when the endpoint did not include follower data.Following count. Returns
-1 when the endpoint did not include following data.Profile
Profile extends ProfileData and is returned by JxInsta.getProfile. It holds an authenticated session internally and exposes methods to paginate posts, followers, and followings, and to perform social actions.
getPosts(String cursor)
Returns a paginator that yields the user’s media posts in reverse-chronological order, 12 at a time.
Opaque pagination cursor from a previous page. Pass
null to start from the most recent post.com.jxinsta.web.paginators.PostPaginator
getFollowers(String cursor)
Returns a paginator over the accounts that follow this user, fetching up to 200 per page.
Pagination cursor. Pass
null to start from the first page.com.jxinsta.web.paginators.ProfilePaginator
getFollowings(String cursor)
Returns a paginator over the accounts this user is following, fetching up to 200 per page.
Pagination cursor. Pass
null to start from the first page.com.jxinsta.web.paginators.ProfilePaginator
getStory()
Fetches the user’s currently active story reels. Returns null when the user has no active stories (or their account is private and you are not a follower).
List<Story> or null
Throws — InstagramException
getHighlights()
Fetches all story highlights published by this user. Returns null if the user has no highlights.
List<Story> or null
Throws — InstagramException
follow()
Sends a follow request to this user. For private accounts this creates a pending request; for public accounts the follow takes effect immediately.
void
Throws — InstagramException
unfollow()
Unfollows this user.
void
Throws — InstagramException
block()
Blocks this user. The blocked account can no longer view your profile or contact you.
void
Throws — InstagramException