Back to use cases

    Use case / X DATA / Python 3 (optional; the main path is a saved prompt with no code) / Published

    Find Influencers on X with No Code Using Desearch MCP

    Find influencers on X who post about your topic: one Desearch MCP search groups public posts by author and ranks them by likes, with follower counts.

    Card for Find Influencers on X with No Code Using Desearch MCP

    This page shows how to find influencers on X who post about your topic, so you can follow them, learn from them or reach out for a collaboration. One saved prompt in Claude or Cursor runs a Desearch search, groups the public posts by author and ranks the people who keep posting about your topic, with their follower counts. It is a first pass you can do without code in a few minutes.

    The problem

    Finding the right people to work with on X usually means scrolling search results, opening profiles one by one and keeping notes in a spreadsheet. It is slow, and it is easy to confuse someone who posted about your topic once with someone who keeps coming back to it. You want a short list of names, ranked, with their reach next to them.

    What the app does

    • Takes your topic words, such as ("sourdough" OR "bread baking").
    • Searches public X posts on that topic with the Desearch x-search tool (up to 50 posts per search).
    • Groups the posts by author and keeps authors with 2 or more posts.
    • Ranks them by total likes and shows followers, number of posts, total likes and their most liked post.
    • With the saved prompt, also lists authors with 1 post and more than 10,000 followers as "worth a look".
    • The script can hide handles and links when you share the result.

    How to find influencers on X with this prompt

    1. Connect once. Add the hosted Desearch MCP server (https://mcp.desearch.ai/mcp) to Claude or Cursor, with your Desearch API key in the Authorization header.
    2. Search. The saved prompt calls the x-search tool with your topic, lang:en -is:retweet, count 50, and the verified and min_likes settings.
    3. Group and rank. Your assistant groups the posts by author, keeps the people with 2 or more posts and ranks them by total likes, with follower counts from the posts.
    4. Check before you reach out. Open each profile. The table is a starting point, not a verdict.

    The code

    No code is needed for the saved prompt. For people who want a script, this is the core MCP call from find_influencers.py in the example (lines 88 to 98). The arguments come from build_args() in the same file, which adds -is:retweet and sets the count and the optional verified and min_likes filters.

    PYTHON
    async def search(args, key):
        from mcp import ClientSession
        from mcp.client.streamable_http import streamable_http_client
        from mcp.shared._httpx_utils import create_mcp_http_client
    
        async with create_mcp_http_client(headers={"Authorization": key}) as hc, \
                streamable_http_client(MCP_URL, http_client=hc) as streams:
            async with ClientSession(streams[0], streams[1]) as s:
                await s.initialize()
                res = await s.call_tool("x-search", args, read_timeout_seconds=180)
                return parse_posts([c.model_dump() for c in res.content])

    The script reads your key from a file (~/.desearch-api-key, or --key-file PATH). If you keep your key in an environment variable such as DESEARCH_API_KEY, you can pass its value as key to search() in your own code.

    The folder has saved-prompt.md (the no-code version), find_influencers.py (the script), README.md with a sample output, and offline tests in tests/.

    Endpoints

    • MCP tool x-search

    Example output

    Saved sample from a search on 2026-10-16 for ("sourdough" OR "bread baking") lang:en with --verified --min-likes 10, handles hidden. This page shows that stored request and response. It does not run a live demo.

    Sample request

    build_args() sends this to the x-search tool:

    JSON
    {
      "query": "(\"sourdough\" OR \"bread baking\") lang:en -is:retweet",
      "count": 50,
      "verified": true,
      "min_likes": 10
    }

    Sample response

    What came backResult
    Public posts50
    Authors38
    Authors with 2 or more posts5

    The top three rows of the ranked table:

    #AuthorFollowersPostsLikes
    1a creator #135,85552,382
    2a creator #22,036,39931,877
    3a creator #34,9603437

    Two numbers matter most when you read it. Posts on the topic tell you who keeps coming back to it. Followers tell you the reach, and a creator with a few thousand engaged followers can be a better partner than a huge account.

    Run it yourself

    No code: connect the Desearch MCP server in Claude or Cursor, paste saved-prompt.md, and change the topic words.

    Script:

    BASH
    git clone https://github.com/Desearch-ai/desearch-py-examples && cd desearch-py-examples/find-x-influencers-mcp
    pip install -r requirements.txt
    echo "<your key>" > ~/.desearch-api-key && chmod 600 ~/.desearch-api-key   # key from console.desearch.ai
    python find_influencers.py '("sourdough" OR "bread baking") lang:en' --verified --min-likes 10

    Useful flags: --verified and --min-likes (narrow the search), --min-posts (default 2), --hide-handles (share the table without handles or links). Keep OR terms inside parentheses.

    What it costs

    A 50-post search cost $0.0075, which is $0.00015 per post (the cost header returned by the same search through the Desearch API, GET /twitter with count 50, 2026-10-16 15:14 Asia/Tbilisi). See pricing.

    Ideas to extend it

    • Add a start date and end date in the saved prompt to see who posts about your topic now.
    • Run it for two or three related topics and look for names that show up in more than one list.
    • Export the ranked table to a sheet and add a column for notes after you open each profile.

    Use with AI agents

    Point an MCP client at the hosted Desearch server. Replace the placeholder with a key from the console. Do not commit the key.

    JSON
    {
      "mcpServers": {
        "desearch": {
          "url": "https://mcp.desearch.ai/mcp",
          "headers": {
            "Authorization": "Bearer <DESEARCH_API_KEY>"
          }
        }
      }
    }

    Prompt you can paste for this example:

    Use the Desearch x-search tool with query '(<topic words>) lang:en -is:retweet', count 50, verified true, and min_likes 10. Group the posts by author and keep authors with 2 or more posts. Return a table ranked by total likes with author, followers, number of posts, total likes, and their most liked post. Below the table, list authors with only 1 post but more than 10,000 followers as worth a look. Say how many posts came back and how old the oldest one is. If fewer than 3 authors have 2 or more posts, say so plainly and suggest a broader topic.

    Build your own example.

    Give your agents access to web and social search. Get an API key to start building, or talk to us about your integration.

    Read docs