Skip to main content
This tutorial walks you through sending a synchronous request to each Bright Data Facebook Scraper API endpoint. By the end, you’ll have working examples for profiles, page posts, posts, marketplace listings, and comments.

Prerequisites

Request structure

Every synchronous request follows the same pattern:
POST https://api.brightdata.com/datasets/v3/scrape?dataset_id={DATASET_ID}&format=json
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

[{"url": "https://www.facebook.com/..."}]
The only thing that changes between endpoints is the dataset_id and the input URL format.
Synchronous requests support up to 20 URLs and have a 1-minute timeout. If the request takes longer, the API automatically returns a snapshot_id instead. See async requests.

Profiles

Dataset ID: gd_mf0urb782734ik94dz
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_mf0urb782734ik94dz&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.facebook.com/zuck"}]'
You should see a 200 response. This takes 10-30 seconds.
[
  {
    "name": "Mark Zuckerberg",
    "url": "https://www.facebook.com/zuck",
    "followers": 120000000,
    "bio": "Building the future...",
    "profile_type": "public_figure",
    "is_verified": true
  }
]
Full Profiles response schema

Page Posts

Dataset ID: gd_lkaxegm826bjpoo9m5
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lkaxegm826bjpoo9m5&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.facebook.com/NASA"}]'
[
  {
    "url": "https://www.facebook.com/NASA",
    "post_text": "Exploring the cosmos...",
    "num_comments": 450,
    "date_posted": "2024-04-10T14:30:00.000Z",
    "reactions": 12500,
    "content_type": "Photo"
  }
]
Full Page Posts response schema

Posts by post URL

Dataset ID: gd_lyclm1571iy3mv57zw
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lyclm1571iy3mv57zw&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.facebook.com/zuck/posts/example123"}]'
[
  {
    "url": "https://www.facebook.com/zuck/posts/example123",
    "post_text": "Excited to share...",
    "num_comments": 320,
    "date_posted": "2024-05-01T09:00:00.000Z",
    "reactions": 8500,
    "shares": 1200
  }
]
Full Posts response schema

Marketplace

Dataset ID: gd_lvt9iwuh6fbcwmx1a
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lvt9iwuh6fbcwmx1a&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.facebook.com/marketplace/item/123456789"}]'
[
  {
    "url": "https://www.facebook.com/marketplace/item/123456789",
    "title": "Vintage Coffee Table",
    "price": "$150",
    "location": "San Francisco, CA",
    "seller_name": "John Doe",
    "description": "Beautiful mid-century modern coffee table..."
  }
]
Full Marketplace response schema

Comments

Dataset ID: gd_lkay758p1eanlolqw8
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lkay758p1eanlolqw8&format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.facebook.com/zuck/posts/example123"}]'
[
  {
    "url": "https://www.facebook.com/zuck/posts/example123",
    "comment_user": "Jane Smith",
    "comment_date": "2024-05-02T10:15:00.000Z",
    "comment_text": "Great update!",
    "reactions": 12,
    "replies_count": 3
  }
]
Full Comments response schema

Quick reference: dataset IDs

EndpointDataset IDURL pattern
Pages Posts by Profile URLgd_lkaxegm826bjpoo9m5facebook.com/{page_name}
Commentsgd_lkay758p1eanlolqw8facebook.com/{user}/posts/{post_id}
Posts by group URLgd_lz11l67o2cb3r0lkj3facebook.com/groups/{group_id}
Posts by post URLgd_lyclm1571iy3mv57zwfacebook.com/{user}/posts/{post_id}
Marketplacegd_lvt9iwuh6fbcwmx1afacebook.com/marketplace/item/{item_id}
Profilesgd_mf0urb782734ik94dzfacebook.com/{username}
Pages and Profilesgd_mf124a0511bauquyowfacebook.com/{page_or_profile}
Eventsgd_m14sd0to1jz48ppm51facebook.com/events/{event_id}
Reels by profile URLgd_lyclm3ey2q6rww027tfacebook.com/{username}
Company Reviewsgd_m0dtqpiu1mbcyc2g86facebook.com/{company_page}

Output formats

Control the response format with the format query parameter:
ValueDescription
jsonJSON array (default)
ndjsonNewline-delimited JSON, one record per line
csvComma-separated values

Next steps

Async batch requests

Scrape hundreds of URLs in a single batch job.

API reference

Full parameter and response field reference.