Skip to main content

Profile

A Facebook user profile.

Profile can be created with:

Profile.from_user_id(context: FacebookContext, user_id: str) -> Profile

Properties​

Identity

id : str
Facebook user ID.
name : str | None
Display name.
alternate_name : str | None
Alternate name or nickname.
gender : str | None
Reported gender, e.g. "MALE".
url : str | None
Facebook profile URL.
status_text : str | None
Short status or tagline.
profile_picture_url : str | None
URL of the profile picture.
is_verified : bool | None
Whether the account has a verified badge.
followers_count : str | None
Follower count as a display string, e.g. "6.9k".
following_count : str | None
Following count as a display string, e.g. "6.9k".
friends_count : str | None
Friend count as a display string, e.g. "4".

About

biography : str | None
Short bio shown on the profile.
category : str | None
Page category, e.g. "Gaming video creator".
description : str | None
Longer profile description.
current_location : str | None
Current city or location.
hometown : str | None
Hometown listed on the profile.
birthday : str | None
Birthday as a display string, e.g. "21 January 2005".

Relationship & family

relationship : dict | None

Relationship status as {"type", "date", "desc"}.

family : list[dict] | None

Family members as {"name", "type"} entries.

Languages, links, work

language : list[str] | None
Languages listed on the profile.
links : list[dict] | None

External links as {"link", "desc"} entries.

works : list[dict] | None

Work history as {"company", "desc"} entries.

Education

colleges : list[dict] | None

Colleges as {"name", "date", "subject", "activities", "dorm", "classes", "desc"} entries.

high_schools : list[dict] | None

High schools as {"name", "date"} entries.

Interests & travel

hobbies : list[dict] | None

Hobbies as {"name", "desc"} entries.

travels : list[dict] | None

Places visited as {"name", "date"} entries.

interests : dict | None

Interests grouped under musics, tv_shows, movies, games, and sports.

Contacts & pronunciation

contacts : list[dict] | None

Contact info under socials, phones, emails, messenger, whatsapp_number, and media_kit.

name_pronunciation : list[dict] | None

Name pronunciation as {"name"} entries.

nicknames : list[dict] | None

Nicknames as {"type", "name"} entries.

Business

business_rating : str | None
Rating summary, e.g. "4.6 (100 reviews)".
business_address : str | None
Business address.
business_hours : str | None
Business hours as a display string, e.g. "Mon-Fri: 6am-7pm".

Methods​

All methods return a PaginatedIterator of model objects.

get_posts() -> PaginatedIterator[Post]
User's posts.
get_photos() -> PaginatedIterator[Photo]
User's photos.
get_videos() -> PaginatedIterator[Video]
User's videos / reels.
get_followers() -> PaginatedIterator[Profile]
Users following this user.
get_followees() -> PaginatedIterator[Profile]
Users this user follows.
get_friends_followers() -> PaginatedIterator[Profile]
Friends of the user who also follow them.
get_friends_followees() -> PaginatedIterator[Profile]
Friends of the user whom they also follow.

Example​

import facebook_gql_scraper as fgs

context = fgs.FacebookContext(cookies_file="facebook_cookies.json")

user = fgs.Profile.from_user_id(context, user_id="100084254631043")
# Or from username: user = fgs.Profile.from_username(ctx, username="Ishowspeed")


for post in user.get_posts():
print(post.id, post.text)