X

X.com posts

Extract data about posts, profiles, search results, trends, and engagement from x.com (Twitter).

Social Media

Available Endpoints

What is the X.com Scraper?

The X.com (formerly Twitter) Scraper lets you extract posts, profiles, search results, and engagement data. Perfect for social listening, sentiment analysis, trend monitoring, and building social media analytics tools.

Available Endpoints

X.com posts - collect by URL

Extract post content, engagement metrics, and media.

X.com profiles - collect by URL

Get profile data including bio, followers, and post history.

X.com search - collect by keyword

Search posts by keyword, hashtag, or user mention.

Use Cases

  • Social listening: Monitor brand mentions, hashtags, and conversations in real-time.
  • Sentiment analysis: Analyze public sentiment about products, events, or topics.
  • Trend monitoring: Track trending topics and hashtags to stay ahead of the conversation.

Frequently Asked Questions

Can I access historical posts?

Yes, you can access historical posts up to the limits provided by the platform's public data.

Do you support X Spaces data?

Currently we support posts, profiles, and search results. Spaces support is on our roadmap.

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://x.com/brightdata/status/1879234567890",
    "format": "json"
}

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

data = response.json()
print(data)