Developer tutorial
How to scrape Facebook profiles with Python (2026)
This tutorial shows how to scrape Facebook profiles in Python using the SocialCrawl API. You get a page's name, category, like and follower counts, about text, website, and profile photo from its public URL from one GET request, with no Facebook developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.
Code tested July 2026
How it works
- 1Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
- 2Set up PythonInstall the requests library with `pip install requests`.
- 3Call the Facebook Profile endpointSend a GET request to /v1/facebook/profile with your API key in the x-api-key header and the `url` parameter.
- 4Read the responseParse the JSON. SocialCrawl returns a page's name, category, like and follower counts, about text, website, and profile photo from its public URL in one normalized schema, so you write no HTML parsing or proxy code.
The code
A real, unedited response from the request above.
import requests
response = requests.get(
"https://www.socialcrawl.dev/v1/facebook/profile",
headers={"x-api-key": "YOUR_API_KEY"},
params={"url": "https://www.facebook.com/nasa"},
)
data = response.json()
print(data)[ RESPONSE ]
{
"success": true,
"platform": "facebook",
"endpoint": "/v1/facebook/profile",
"data": {
"author": {
"id": "100044561550831",
"username": null,
"display_name": "NASA - National Aeronautics and Space Administration",
"avatar_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?stp=dst-png&cstp=mx800x800&ctp=s480x480&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=8JwJCEbIJtcQ7kNvwF4m0PJ&_nc_oc=Adpb2KtMW7iJcfQDw5vrJ2gcmOIYzxcbskBkWUvyXuKB2knLf3KxIB31iNdtSSQfmXk&_nc_zt=24&_nc_ht=scontent-ord5-3.xx&_nc_gid=bQj0PJvWT0cTfauTYxaM5g&_nc_ss=7f289&oh=00_AQB2XBNizGaJC4t72LBffYn6lbMWlgguJwwv2jPTGaMcTQ&oe=6A632E95",
"bio": "Explore the universe and discover our home planet. \nThere's space for everybody. ✨",
"verified": null,
"followers": 28000000,
"following": null,
"posts_count": null,
"likes_count": 28657098,
"url": "https://www.facebook.com/NASA/",
"private": null,
"joined_at": "March 4, 2009"
},
"computed": {
"engagement_rate": null,
"language": "en",
"content_category": "other",
"estimated_reach": null
},
"_warnings": [
"computed.engagement_rate: author ratio exceeded 1.0 (raw: 1.023468); returned null — a lifetime likes/followers ratio is not a real engagement rate"
]
},
"credits_used": 1,
"credits_remaining": 9999,
"request_id": "req_example000000",
"cached": false
}Prefer another language?
FAQ
Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usDo I need a Facebook developer account to scrape Facebook profiles?
No. SocialCrawl handles authentication and proxies upstream, so you never register a Facebook app, manage OAuth tokens, or run your own scrapers. One API key returns Facebook data directly.
What does the Facebook Profile endpoint return?
It returns a page's name, category, like and follower counts, about text, website, and profile photo from its public URL. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape Facebook profiles?
Each call costs a small number of credits, and new accounts start with free credits. There are no monthly minimums, so you pay only for the calls you make.
Can I use this Python code in production?
Yes. The snippet on this page is the real request against the live API. For production, add error handling and follow the response cursor to paginate through large result sets.
Ask AI about SocialCrawl
