Facebook profile API: resolve links, pull the overview
Every Facebook pipeline starts with the same two questions: which
entity is this URL, and what does the world see of it. Facebook
URLs are notoriously polymorphic — profiles, pages, groups, posts,
profile.php?id= forms, people/ aliases — and guessing wrong wastes
every downstream call. Two endpoints settle it.
Step 1: resolve the link
GET /fb/resolve?url=https://www.facebook.com/groups/800246542990860
GET /fb/api/v1/resolve-profile?profile_url=https://facebook.com/zuck
The link resolver classifies any
facebook.com URL — profile, group, page or post — and returns its
numeric id and type. The
profile resolver is the focused
variant for profile/page URLs, including the people/… alias forms
that redirect everywhere else.
from getsocialapi_facebook import Client
fb = Client(api_key="gsa_live_...").facebook
entity = fb.resolve("https://www.facebook.com/groups/800246542990860")
print(entity) # type + numeric id
uid = fb.resolve_profile("https://facebook.com/zuck")
The id is the key every other endpoint wants: members, posts, feed, followers, friends, contacts.
Step 2: pull the overview card
GET /fb/api/v1/overview?user_id=<id>
The overview is the cheap profile card: name, avatar, verification, friend/follower counters, privacy posture. Before spending requests on deep lists, the overview answers the gating questions:
| Check | Why |
|---|---|
| privacy flags | hidden lists return empty — know before you walk |
| follower/friend counters | sizes the export budget |
| verification | entity confirmation for due-diligence flows |
The pattern
target = fb.resolve(profile_url) # any URL form in
card = fb.overview(user_id=target_id) # what exists, what's public
if card says lists are public:
followers = walk(fb.followers, target_id)
friends = walk(fb.friends, target_id)
Resolve → overview → deep lists. The first two calls cost two units and prevent entire wasted walks on private or misclassified targets.
Where the ids flow next
- Groups → members, group posts, unified feed
- Profiles/pages → followers, followings, friends, contacts
Handling the alias zoo
Facebook happily serves several URLs for one entity: facebook.com/zuck,
fb.com/zuck, m.facebook.com/zuck, profile.php?id=4. Don't
normalize URLs client-side — the resolver tracks canonicalization
server-side, and its answer is the id your pipeline should trust.
Two calls, any URL in, stable id out — getsocialapi.com, 100 free calls to wire the pair into your stack.
Build with GetSocialAPI
Explore Facebook API for capabilities, pricing and integration examples. Create an account to start with 100 free calls, or follow the quickstart.