FB

Facebook pages

Extract data about pages, posts, comments, events, and groups from facebook.com.

Social Media

Available Endpoints

What is the Facebook Scraper?

The Facebook Scraper allows you to extract public page data, posts, comments, and event information from Facebook. Useful for social listening, brand monitoring, audience research, and content analysis at scale.

Available Endpoints

Facebook pages - collect by URL

Extract page details including about info, followers, and likes.

Facebook posts - collect by URL

Get post content, engagement metrics, and media.

Facebook comments - collect by URL

Collect comments and replies on specific posts.

Facebook events - collect by URL

Extract event details including dates, locations, and attendees.

Use Cases

  • Brand monitoring: Track brand mentions and sentiment across Facebook pages and groups.
  • Audience analysis: Understand follower demographics and engagement patterns.
  • Event tracking: Monitor events, attendance, and community engagement.
  • Content analysis: Analyze post performance and engagement across pages.

Frequently Asked Questions

Can I scrape private groups?

No, we only collect data from public Facebook pages, posts, and events.

Is there a limit on the number of posts I can extract?

You can extract up to 1,000 posts per request using pagination. There's no daily limit.

Code Examples

Authentication
import requests

API_TOKEN = "YOUR_API_TOKEN"
headers = {
    "Authorization": f"Bearer {API_TOKEN}",
    "Content-Type": "application/json"
}

response = requests.get(
    "https://api.brightdata.com/v1/auth/test",
    headers=headers
)
print(response.json())
Scraper API Call
import requests

API_TOKEN = "YOUR_API_TOKEN"
headers = {
    "Authorization": f"Bearer {API_TOKEN}",
    "Content-Type": "application/json"
}

payload = {
    "url": "https://www.facebook.com/NASA",
    "format": "json"
}

response = requests.post(
    "https://api.brightdata.com/v1/scrapers/facebook-pages",
    headers=headers,
    json=payload
)

data = response.json()
print(data)