Contents
To scrape X (Twitter) data with an API in 2026, you send one authenticated POST request describing what you want (a profile's followers, a search query, or a tweet's repliers) and get back clean JSON. No headless browser, no proxy rotation, no HTML parsing. This guide shows the exact request in curl, Node.js, and Python using the XAutoDM API.
The official X API priced most builders out, and raw scraping of a login-walled platform is a maintenance treadmill. A purpose-built X data API sits in the middle: the public data you need, one key, usage-based pricing.
What you can pull
The XAutoDM API exposes X's public data through a single
scrapessource_typesource_value- followers / following of any handle
- repliers to a tweet (everyone who replied)
- retweeters of a tweet
- search results for a keyword or advanced query
- list_members of a public List
Every result is a profile object with the fields that matter for outreach: handle, name, bio, follower counts, verified status, and
canDmAuthentication
You need an API key. The XAutoDM API is in early access, so you request a key on the API page and authenticate with a bearer token:
Authorization: Bearer xad_live_...
Scrape a profile's followers (curl)
curl -X POST https://app.xautodm.com/api/v1/scrapes \ -H "Authorization: Bearer xad_live_..." \ -H "Content-Type: application/json" \ -d '{ "source_type": "followers", "source_value": "https://x.com/naval", "count": 500, "filters": { "canDmOnly": true } }'
The
filters.canDmOnlyThe same call in Node.js
const res = await fetch("https://app.xautodm.com/api/v1/scrapes", { method: "POST", headers: { "Authorization": "Bearer xad_live_...", "Content-Type": "application/json", }, body: JSON.stringify({ source_type: "search", source_value: "growth marketing agency", count: 200, filters: { canDmOnly: true }, }), }); const { data } = await res.json(); console.log(data.length, "profiles");
Swap
source_typesearchsource_valueAnd in Python
import requests resp = requests.post( "https://app.xautodm.com/api/v1/scrapes", headers={"Authorization": "Bearer xad_live_..."}, json={ "source_type": "repliers", "source_value": "https://x.com/user/status/1234567890", "count": 200, "filters": {"canDmOnly": True}, }, ) for profile in resp.json()["data"]: print(profile["username"], profile["followers"], profile["canDm"])
Here
source_type: repliersWhat the response looks like
Each profile comes back as structured JSON, roughly:
{ "username": "someone", "name": "Some One", "bio": "Founder, building in public", "followers": 4213, "verified": false, "canDm": true }
Clean fields, no scraping glue code. You filter, dedupe, and load them straight into your CRM or outreach flow.
Pagination and pacing
Ask for what you need with
countFrom data to booked calls
Scraping is step one. The reason to pull DM-able X leads is to reach them, and the same platform closes the loop: the XAutoDM API can send paced, personalized DMs and run follow-up sequences under the same key and safety rails. Before you build a sender, read our guide on X DM limits so your outreach stays under the caps, and see the full API overview for early access.
Want the endpoint and a key? Request early access on the XAutoDM API page. No official X API needed.
Your next customer is already on X.
Find the people talking about what you sell, message them on a safe schedule, and turn the replies into booked calls.
- Scrape leads from any tweet, keyword or X List
- Auto-DM new followers and people who engage
- Follow-ups that stop the moment someone replies
- Safe daily limits and warm-up, built in
- Every reply tracked through to a booked call
Free Test plan · no credit card.
Related posts
Ready to automate your Twitter DMs?
Start sending personalized DM campaigns to your target audience today. Get higher response rates and more leads than cold emails.








