twitter-x-user-search

Extract targeted Twitter (X.com) user profiles instantly. Scrape detailed metrics like follower counts, bios, locations, and verified status using specific search terms. Fast, reliable, and perfect for influencer research and competitor analysis.

Documentation

Apify Twitter (X.com) User Search Scraper n8n Node

This node allows you to integrate the Apify Twitter (X.com) User Search Scraper directly into your n8n workflows. It provides a powerful and specific way to scrape user data from Twitter (now X), allowing you to reliably extract detailed user profiles utilizing search queries.

Key Features

  • Focused Input Methods: Get straightforward, exact data from user queries.
    • Search Terms: Provide target search terms (e.g., "elonmusk", "apify") to extract matching users.
  • Targeted Output:
    • Maximum Items: Control the maximum number of user profiles retrieved for each query.
    • Custom Map Function: Transform and shape the output data using a custom JavaScript function before it is saved.
  • Built-in Concurrency & Pagination: Efficiently crawls and paginates through search results for quick and stable extraction.
  • Cost-Effective & Event-Driven: Charge per result.

Use Cases

  • Market & Influencer Research: Discover profiles relevant to specific topics or keywords.
  • Academic Research: Gather user-centric data for social media and political science studies.
  • Competitive Analysis: Monitor targeted competitors' digital footprints.
  • Data Archival: Regularly save out the profile metrics for designated entities for record keeping.

Installation

To install this node, you can follow the n8n community node installation guide. Use the following package name:

n8n-nodes-twitter-x-user-search

Setup & Credentials

  1. Get your Apify API Token from your Apify Console.
  2. In n8n, create a new credential for Apify API key connection.
  3. Paste your token into the API Key field.

Node Parameters

  • searchTerms: An array of explicit text queries you want to search.
  • maxItems: An integer limiting the maximum number of paginated output user profiles for each target.
  • customMapFunction: Execute raw javascript logic to mutate or adjust the parsed user object right before it is pushed to the Actor storage. Caution: improper functions may break output data shape.

Example customMapFunction:

(user) => { return { id: user.id, name: user.name, followers: user.followers_count, url: user.url } }

Output Example

{
    "id": "472460718",
    "url": "https://x.com/elonmusk_9714",
    "twitterUrl": "https://twitter.com/elonmusk_9714",
    "name": "ELON R.M",
    "screen_name": "elonmusk_9714",
    "description": "",
    "followers_count": 105,
    "normal_followers_count": 105,
    "fast_followers_count": 0,
    "friends_count": 0,
    "favourites_count": 15986,
    "statuses_count": 60284,
    "media_count": 1328,
    "location": "Texas, USA",
    "created_at": "Mon Jan 23 23:51:42 +0000 2012",
    "advertiser_account_service_levels": [
        "analytics"
    ],
    "advertiser_account_type": "promotable_user",
    "analytics_type": "enabled",
    "blocked_by": false,
    "blocking": false,
    "can_dm": false,
    "can_media_tag": false,
    "entities": {
        "description": {
            "hashtags": [],
            "symbols": [],
            "urls": [],
            "user_mentions": []
        }
    },
    "follow_request_sent": false,
    "followed_by": false,
    "following": false,
    "geo_enabled": true,
    "has_custom_timelines": true,
    "has_extended_profile": true,
    "id_str": "472460718",
    "is_translator": false,
    "muting": false,
    "notifications": false,
    "pinned_tweet_ids_str": [
        "1847958242489672135"
    ],
    "profile_background_color": "000000",
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/472460718/1760038286",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/1976369939058434048/I2HjvguS_normal.jpg",
    "profile_interstitial_type": "",
    "profile_link_color": "E81C4F",
    "profile_location_place": {
        "country": "",
        "country_code": "",
        "full_name": "Texas, USA",
        "id": "e0060cda70f5f341",
        "name": "Texas, USA",
        "place_type": "unknown"
    },
    "protected": false,
    "translator_type_enum": "None",
    "verified": false,
    "want_retweets": false,
    "withheld_in_countries": []
}

Ethical Use and Data Practices

Our 'actor' operates without logging in to X.com. This means it does not implicitly accept any Terms of Service (ToS) that require a login, as we only process data that is publicly displayed and accessible to everyone without authentication.

We are fully committed to the principle of privacy by design and by default. All data collected explicitly excludes sensitive personal information or non-public data.

Furthermore, our actor runs on Apify, an EU-based company, which means our operations are designed to be compliant with relevant EU data protection regulations, including GDPR, where applicable. You can find more information about the legality of web scraping on Apify's blog: Is web scraping legal?

We have implemented robust technical measures to ensure the actor operates gently and does not impose an undue burden on X.com's servers. Our sole purpose is to facilitate responsible research and public data analysis, and we strictly prohibit any use that could cause harm to any party or the platform itself.

Get Started

Explore these related APIs for your other data needs:

1. TikTok Actors

⚑ Fast TikTok API (No WM) πŸ‘€ Tiktok User Profile API πŸ” Advanced Search TikTok
πŸ”Ž TikTok Search Scraper πŸ“ˆ Tiktok Trend API πŸ’¬ TikTok Comment API
🎞️ TikTok Profile Videos API #️⃣ TikTok Hashtag API 🎡 TikTok Sound Music API
πŸ‘₯ TikTok Followers API πŸ”’ Multiple Hashtags Scraper πŸ† TikTok Scraper Ultimate
🎢 TikTok Music Trend API πŸ›οΈ TikTok Shop Scraper πŸ’° TikTok Scraper (Pay per video)
πŸ“„ Fast TikTok API (Simple) πŸ†” TikTok User Profile Scraper πŸ“ TikTok Location API
πŸ€– TikTok AI Video Scraper πŸ—―οΈ TikTok Comment (Novi) 🏷️ TikTok Scraper (Fixed price)
πŸ—£οΈ TikTok Comment + Replies

2. X.com (Twitter) Actors

🐦 X.com Twitter API Scraper 🐦 X.com Twitter User Tweets Scraper 🐦 X.com Twitter User Search Scraper

3. YouTube Actors

πŸ“œ YouTube Transcript API

Getting Help

Discussion