Twitter/X

Twitter/X Scraper API

Real-time Twitter/X data -- user profiles, tweets, and tweet details. All data is scraped directly from Twitter/X and returned as structured JSON.

3 Endpoints REST API JSON 99.9% Uptime

Try it instantly

See real data shapes from every endpoint — no signup required.

Request
GET /twitter/profile
username elonmusk required
curl -G "https://api.pullapi.com/twitter/profile" \
  -H "x-rapidapi-key: YOUR_API_KEY"
Response 200 OK
{
  "success": true,
  "data": {
    "user_id": "44196397",
    "username": "elonmusk",
    "name": "Elon Musk",
    "description": "Mars & Cars, Chips & Dips",
    "location": "Earth",
    "website": "https://x.com",
    "created_at": "2009-06-02T20: 12: 29.000Z",
    "followers_count": 195000000,
    "following_count": 830,
    "tweet_count": 45200,
    "listed_count": 150000,
    "is_verified": true,
    "is_protected": false,
    "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/44196397/example.jpg"
  },
  "credits_used": 1,
  "cache_hit": false,
  "timestamp": "2026-03-15T12: 00: 00+00: 00"
}

API Endpoints

3 endpoints across 2 categories.

User

GET /twitter/profile

Get a Twitter/X user's full profile including bio, follower/following counts, tweet count, verification status, and profile images. Accepts a username (without @) or a full Twitter/X profile URL.

Parameters

Name Type Required Description Example
username string Yes Twitter username (without @) or full profile URL. Examples: "elonmusk", "https://x.com/elonmusk" elonmusk

Example Response

{
  "success": true,
  "data": {
    "user_id": "44196397",
    "username": "elonmusk",
    "name": "Elon Musk",
    "description": "Mars & Cars, Chips & Dips",
    "location": "Earth",
    "website": "https://x.com",
    "created_at": "2009-06-02T20: 12: 29.000Z",
    "followers_count": 195000000,
    "following_count": 830,
    "tweet_count": 45200,
    "listed_count": 150000,
    "is_verified": true,
    "is_protected": false,
    "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/44196397/example.jpg"
  },
  "credits_used": 1,
  "cache_hit": false,
  "timestamp": "2026-03-15T12: 00: 00+00: 00"
}

Tweets

GET /twitter/tweets

Get a user's recent tweets including text, metrics (likes, retweets, replies, views), media attachments, and quoted/retweeted tweets. Returns up to 40 tweets per request. The response also includes the user's profile summary.

Parameters

Name Type Required Description Example
username string Yes Twitter username (without @) or full profile URL. Examples: "elonmusk", "https://x.com/elonmusk" elonmusk
count integer No Number of tweets to return. Must be between 1 and 40. 20

Example Response

{
  "success": true,
  "data": {
    "user": {
      "user_id": "44196397",
      "username": "elonmusk",
      "name": "Elon Musk",
      "description": "Mars & Cars, Chips & Dips",
      "location": "Earth",
      "website": "https://x.com",
      "created_at": "2009-06-02T20: 12: 29.000Z",
      "followers_count": 195000000,
      "following_count": 830,
      "tweet_count": 45200,
      "listed_count": 150000,
      "is_verified": true,
      "is_protected": false,
      "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
      "profile_banner_url": "https://pbs.twimg.com/profile_banners/44196397/example.jpg"
    },
    "tweets": [
      {
        "tweet_id": "1890123456789012345",
        "text": "The future is now. We're building something incredible.",
        "created_at": "2026-03-14T18: 30: 00.000Z",
        "author": {
          "username": "elonmusk",
          "name": "Elon Musk",
          "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
          "is_verified": true
        },
        "metrics": {
          "likes": 245000,
          "retweets": 32000,
          "replies": 18500,
          "quotes": 4200,
          "bookmarks": 12000,
          "views": 48000000
        },
        "language": "en",
        "media": [],
        "urls": [],
        "is_pinned": false,
        "is_retweet": false,
        "quoted_tweet": null,
        "retweeted_tweet": null
      },
      {
        "tweet_id": "1890098765432109876",
        "text": "Check out this photo from Starbase",
        "created_at": "2026-03-14T14: 15: 00.000Z",
        "author": {
          "username": "elonmusk",
          "name": "Elon Musk",
          "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
          "is_verified": true
        },
        "metrics": {
          "likes": 180000,
          "retweets": 21000,
          "replies": 9800,
          "quotes": 2100,
          "bookmarks": 7500,
          "views": 35000000
        },
        "language": "en",
        "media": [
          {
            "type": "photo",
            "url": "https://pbs.twimg.com/media/example.jpg",
            "expanded_url": "https://x.com/elonmusk/status/1890098765432109876/photo/1"
          }
        ],
        "urls": [],
        "is_pinned": false,
        "is_retweet": false,
        "quoted_tweet": null,
        "retweeted_tweet": null
      }
    ],
    "tweet_count": 2
  },
  "credits_used": 1,
  "cache_hit": false,
  "timestamp": "2026-03-15T12: 00: 00+00: 00"
}
GET /twitter/tweet

Get a single tweet by its ID or full URL. Returns the tweet text, author info, engagement metrics, media attachments, and any replies. Accepts a numeric tweet ID or a full tweet URL (e.g. https://x.com/user/status/1234567890).

Parameters

Name Type Required Description Example
tweet_id string Yes Tweet ID (numeric string) or full tweet URL. Examples: "1890123456789012345",... 1890123456789012345

Example Response

{
  "success": true,
  "data": {
    "tweet_id": "1890123456789012345",
    "text": "The future is now. We're building something incredible.",
    "created_at": "2026-03-14T18: 30: 00.000Z",
    "author": {
      "username": "elonmusk",
      "name": "Elon Musk",
      "profile_image_url": "https://pbs.twimg.com/profile_images/example/photo.jpg",
      "is_verified": true
    },
    "metrics": {
      "likes": 245000,
      "retweets": 32000,
      "replies": 18500,
      "quotes": 4200,
      "bookmarks": 12000,
      "views": 48000000
    },
    "language": "en",
    "media": [],
    "replies": [
      {
        "tweet_id": "1890123456789099999",
        "text": "Amazing! Can't wait to see it.",
        "created_at": "2026-03-14T18: 35: 00.000Z",
        "author": {
          "username": "techfan",
          "name": "Tech Fan",
          "profile_image_url": "https://pbs.twimg.com/profile_images/example/fan.jpg",
          "is_verified": false
        },
        "metrics": {
          "likes": 1200,
          "retweets": 45,
          "replies": 12,
          "quotes": 3,
          "bookmarks": 8,
          "views": 250000
        },
        "language": "en",
        "media": [],
        "urls": [],
        "is_pinned": false,
        "is_retweet": false,
        "quoted_tweet": null,
        "retweeted_tweet": null
      }
    ]
  },
  "credits_used": 1,
  "cache_hit": false,
  "timestamp": "2026-03-15T12: 00: 00+00: 00"
}

Code Examples

Get started in seconds with your preferred language.

Terminal
curl -G "https://api.pullapi.com/twitter/profile?username=elonmusk" \
  -H "x-rapidapi-host: twitter-scraper-api.p.rapidapi.com" \
  -H "x-rapidapi-key: YOUR_API_KEY"

Why PullAPI

</>

No Browser Needed

HTTP-based API. No Selenium, no Puppeteer, no headless browsers to manage.

Built-in Proxy Rotation

Automatic residential proxy rotation handles anti-bot detection for you.

Cached Responses

Smart Redis caching means faster repeated queries and lower costs.

$

Pay Per Request

No monthly commitment. Free tier included. Pay only for what you use.

Use Cases

What developers build with the Twitter/X Scraper API.

1

Sentiment Analysis

2

Influencer Monitoring

3

Trend Tracking

4

Brand Listening

Related Scrapers

More APIs in Social Media.

Ready to scrape Twitter/X data?

Start with the free tier. No credit card required.

Subscribe on RapidAPI →