This tutorial walks you through sending a synchronous request to each Bright Data X Scraper API endpoint. By the end, you’ll have working examples for profiles and posts.Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Bright Data account with an active API key
- Completed the Quickstart
Request structure
Every synchronous request follows the same pattern: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.How to scrape X (Twitter) profiles
Dataset ID:gd_lwxmeb2u1cniijd7t4
200 response. This takes 10-30 seconds.
Example response
Example response
How to scrape X (Twitter) posts
Dataset ID:gd_lwxkxvnf1cynvib9co
Example response
Example response
Quick reference: dataset IDs
| Endpoint | Dataset ID | URL pattern |
|---|---|---|
| Profiles | gd_lwxmeb2u1cniijd7t4 | x.com/{username} |
| Posts | gd_lwxkxvnf1cynvib9co | x.com/{username}/status/{id} |
Output formats
Control the response format with theformat query parameter:
| Value | Description |
|---|---|
json | JSON array (default) |
ndjson | Newline-delimited JSON, one record per line |
csv | Comma-separated values |
Next steps
Async batch requests
Scrape hundreds of URLs in a single batch job.
API reference
Full parameter and response field reference.