Data API

X (formerly Twitter) Data API

Scrape public X profiles, posts, and timelines without building your own scraper.

Use the X Data API to collect profile details, follower counts, recent posts, and post engagement of an X profile in a structured format. Paid credit packs start at $3.00 per 1,000 requests. No X login, browser automation, or HTML parsing required.

X scraper API pricing

Start with 1,000 requests and pay less per 1,000 as you buy larger packs. Your API key is issued immediately, and later packs top up the same key rather than issuing a new one.

What it costs in practice

Each request costs one credit. So, checking 5,000 creator profiles costs a 5,000-request pack at $13.50. A batch of 25,000 profile lookups costs $57.50.

Note that a profile lookup with include=tweets returns roughly 3 to 6 recent posts per credit. Deeper history pull-up might cost you more than one credit.

Free profile lookup tool, no account or API key neededOne request equals one credit, with usage shown in the responseFailed requests are never chargedPrepaid credit packs, no subscription to cancelExport JSON, CSV, TSV, or NDJSON

X Data API specifications

Data source

Publicly visible X profiles

Coverage

Public X profiles worldwide

Input

Profile URL, @handle or bare handle

Caching

15 minute cache; use fresh=true to bypass it

Response speed

Cached responses in single-digit milliseconds

Billing

One request equals one credit; prepaid packs, no subscription

Authentication

access_key query parameter

Connection and output

HTTPS; JSON, CSV, TSV and NDJSON

What you get with the X Data API

Profile data without a scraper to maintain

Send a public X handle and receive structured profile data. No X login, browser automation, or HTML parsing needed.

Recent posts at no extra cost

Add include=tweets to a profile lookup to get recent posts, including the pinned post, with engagement metrics in the same response.

Data ready for analysis

Export results as JSON, CSV, TSV, or NDJSON. Move profile and engagement data into spreadsheets, research datasets, or your existing data pipeline.

Clear credit usage

Check credits used and remaining through response metadata and the X-Credits-Used and X-Credits-Remaining headers.

What data does one profile request return?

Data groupFields
ProfileHandle, display name, bio, avatar, banner, website, and location
AudienceFollower count, following count, total posts, and verification status
AccountNumeric user ID, join date, and protected status
PostsText, timestamp, permalink, pinned and repost flags
EngagementLikes, reposts, replies, quotes, bookmarks, and views

What is an X scraper API?

An X/Twitter scraper API is an API that collects publicly visible data from X and returns it in a structured format. Instead of building and maintaining your own scraper, you send a request with a profile handle and receive the available profile details and post metrics.

Building your own scraper means managing proxies, browser automation, and changes to X's page structure. A managed API handles the data collection for you, so you can focus on using the results.

How the X Data API works

When you send an HTTPS request to https://data.spyderproxy.com with your access_key and the profile URL or handle, the API retrieves the public profile data and returns the result in JSON, including metadata showing whether the response was cached and how many credits were used.

Responses are cached for 15 minutes. Add fresh=true when you need to bypass the cache and request fresh data. Failed requests are not charged.

X Data API or your own scraper with proxies?

FeatureX Data APIRotating Mobile proxiesPremium Residential proxies
Data collectionAPI retrieves public X profile dataBuild and run your own scraperBuild and run your own scraper
IP managementHandled by the APIReal SIM 4G/5G IPs in 120+ countries120M+ residential IPs in 190+ countries
BillingPer request, using prepaid creditsPer GBPer GB
SessionsStateless requests, 15-minute cacheRotation per request or sticky sessions up to 30 minutesRotation per request or timed sessions, sticky up to 8 hours
Best forProfile data and engagement without maintaining a scraperCustom X scraping or tasks requiring mobile carrier IPsCustom scraping across X and other websites
Starting price$3.00 per 1,000 requests$3.50/GB$2.75/GB

Choose the X Data API when you need public profile data and engagement metrics without maintaining scraping infrastructure. Choose Rotating Mobile proxies when building your own scraper requires mobile carrier IPs, or Premium Residential proxies when your scraper needs residential IPs across multiple websites.

What you can use the X data API for

Influencer vetting

Collect follower counts, verification status, and recent post engagement for creator profiles. Compare engagement against audience size to identify accounts that need closer review.

Change detection and brand monitoring

Track public profile details, follower counts, and recent posts from executives, partners, or lookalike accounts. Use regular lookups to identify changes over time. Learn more about brand protection.

Competitive monitoring

Compare competitors' audience growth and post engagement over time. Export profile data into spreadsheets to track changes and prepare reports.

Dataset enrichment and AI pipelines

Enrich CRM records, lead lists, and research datasets with public X profile data. Export results as JSON or NDJSON for integration into your existing data pipeline. Learn more about AI data collection.

Get started with the X scraper API in three steps

  1. 1

    Try it free

    Look up a handle using the free X profile lookup tool. No account or API key needed.

  2. 2

    Buy credits

    Choose a pack through the SpyderProxy dashboard. Your API key is issued immediately, and later purchases top up the same key.

  3. 3

    Make your first request

    Send a GET request to the profile endpoint with your access_key and a public profile URL or handle. Follow the X Data API documentation for supported parameters and response fields.

API base and endpoint

https://data.spyderproxy.com · GET /twitter/profile

cURL

curl "https://data.spyderproxy.com/twitter/profile?access_key=YOUR_KEY&url=x.com/naval"

Python

import requests

API = "https://data.spyderproxy.com"
KEY = "YOUR_KEY"

# Profile lookup: one credit
r = requests.get(f"{API}/twitter/profile",
                 params={"access_key": KEY, "url": "x.com/naval"}, timeout=30)
body = r.json()
if body["success"]:
    print(body["data"]["followers"], body["meta"]["credits_remaining"])
else:
    print(r.status_code, body["error"]["code"])  # failed requests are not charged

# Timeline: loop until has_more is false
page = 1
while page:
    t = requests.get(f"{API}/twitter/tweets",
                     params={"access_key": KEY, "url": "x.com/naval",
                             "page": page, "limit": 100}, timeout=30).json()
    for post in t["data"]["tweets"]:
        print(post["created_at"], post["likes"], post["views"], post["url"])
    page = t["meta"]["next_page"] if t["meta"]["has_more"] else None

Node.js

// Node.js 18+ (built-in fetch), run as an ES module
const url = "https://data.spyderproxy.com/twitter/profile?access_key=YOUR_KEY&url=x.com/naval";

const res = await fetch(url);
const body = await res.json();
if (!body.success) throw new Error(`${res.status} ${body.error.code}`);

console.log(body.data.username, body.data.followers);
console.log("Credits left:", res.headers.get("x-credits-remaining"));

Sample response

{
  "success": true,
  "data": {
    "username": "@naval",
    "name": "Naval",
    "bio": "Incompressible",
    "followers": 3893151,
    "following": 0,
    "tweets": 27129,
    "is_verified": true,
    "joined": "2007-02-01",
    "location": "",
    "id": "745273",
    "profile_image_url": "https://pbs.twimg.com/profile_images/.../ycqwaMI2.jpg",
    "banner_url": "https://pbs.twimg.com/profile_banners/745273/1588490328",
    "website": "https://nav.al",
    "is_protected": false
  },
  "meta": { "cached": false, "credits_used": 1, "credits_remaining": 999 }
}

Works with any HTTP client, including cURL, Python requests, Node.js, Go, and Java. Add format=csv to open results directly in a spreadsheet.

Works with public X profiles worldwide

The X Data API retrieves publicly available profile data regardless of the account's location. Send a profile URL or handle without setting up proxy locations or geographic targeting.

Building your own scraper instead? SpyderProxy's residential network covers 190+ countries.

Browse the available proxy locations.

Why use our X Data API?

Track your usage

Check credits used and remaining in response metadata and headers.

No charge for failed requests

Failed requests are not billed, according to the API documentation.

No subscription

Buy prepaid credit packs when you need them, without a recurring plan.

Flexible payments

Pay by card through Stripe, Apple Pay, or cryptocurrency through Cryptomus, including Bitcoin, Ethereum, USDT, and Litecoin.

24/7 support

Get help when you need it.

Frequently asked questions

How much does the Twitter scraper API cost?

Credit packs start at $3.00 for 1,000 requests. Larger packs reduce the rate to $1.33 per 1,000 requests on the 500,000-request package, which costs $665.00.

Is there a free tier?

Yes. Use the free X profile lookup tool without an account or API key. It returns profile fields like the paid endpoint, subject to a lower rate limit.

Do I need an X account or cookies?

No. The API retrieves publicly visible profile data on your behalf. You don't need an X login, cookies, browser automation, or an HTML parser. Authenticate using your access_key.

What does one request return?

A profile request returns details such as the handle, display name, bio, avatar, banner, website, location, follower and following counts, total posts, verification status, user ID, and join date. Add include=tweets to include recent posts and engagement metrics in the same request.

How many posts can I get per profile?

A profile lookup with include=tweets returns roughly 3 to 6 recent posts, including the pinned post. For more history, use the /twitter/tweets timeline endpoint to request pages of 1 to 100 posts. Deeper pages can require additional upstream requests, with actual usage shown in meta.credits_used.

How do I refresh cached profile data?

Profile results are cached for 15 minutes. Use fresh=true to bypass the cache and request fresh data.

Do failed requests cost a credit?

No. Failed requests are not charged. Check meta.credits_used and the X-Credits-Used response header to see the cost of a request.

Which payment methods can I use?

SpyderProxy accepts card payments via Stripe, Apple Pay, and cryptocurrency through Cryptomus, including Bitcoin, Ethereum, USDT, and Litecoin.

Is it legal to scrape X data?

The API retrieves publicly visible profile data. Private and suspended accounts are not accessible, while protected accounts return public metadata only. You are responsible for complying with applicable laws, data protection requirements, and X's terms of service. Read the SpyderProxy Terms of Service.

Test a handle for free, then start with 1,000 requests for $3.00.