Felo API PlatformFelo API Platform

Configure Harness

X Search API

Search X users, tweets, timelines, and replies with pagination metadata.

POST/v2/x/tweet/search

Authentication

Bearer API key

Content type

application/json

Rate notes

1 request per 10 seconds, 3 per minute, 10 per 10 minutes.

The X Search API provides access to X (Twitter) data, including user profiles, tweet search, user tweets, and tweet replies.

Authentication

All requests require an API Key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

1. Get User Info

Batch retrieve X user profiles by username.

Endpoint

POST https://openapi.felo.ai/v2/x/user/info

Request Body

ParameterTypeRequiredDescription
usernamesarray of stringsYesList of X usernames to look up

Example

curl -X POST 'https://openapi.felo.ai/v2/x/user/info' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "usernames": ["elonmusk", "OpenAI"]
  }'

Success Response (200)

{
  "status": "ok",
  "message": null,
  "data": {
    "total": 2,
    "users": [
      {
        "user_id": "44196397",
        "username": "elonmusk",
        "display_name": "Elon Musk",
        "description": "...",
        "followers_count": 100000000,
        "following_count": 500,
        "tweet_count": 30000,
        "verified": true,
        "blue_verified": true,
        "profile_image_url": "https://pbs.twimg.com/...",
        "created_at": "2009-06-02T00:00:00Z",
        "location": "Mars"
      }
    ]
  }
}

User Object Fields

FieldTypeDescription
user_idstringX user ID
usernamestringX handle (without @)
display_namestringDisplay name
descriptionstringUser bio
followers_countintegerNumber of followers
following_countintegerNumber of following
tweet_countintegerTotal tweets
verifiedbooleanWhether the account is verified
blue_verifiedbooleanWhether the account has Blue verification
verified_typestringVerification type
profile_image_urlstringProfile image URL
cover_image_urlstringCover image URL
created_atstringAccount creation time
locationstringUser location
urlstringUser website URL
protectedbooleanWhether the account is protected
favorites_countintegerNumber of likes
media_countintegerNumber of media posts
can_dmbooleanWhether DM is open
is_automatedbooleanWhether the account is automated
pinned_tweet_idsarray of stringsPinned tweet IDs

2. Search Users

Search X users by keyword.

Endpoint

POST https://openapi.felo.ai/v2/x/user/search

Request Body

ParameterTypeRequiredDescription
querystringYesSearch keyword
cursorstringNoPagination cursor from previous response

Example

curl -X POST 'https://openapi.felo.ai/v2/x/user/search' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "artificial intelligence"
  }'

Success Response (200)

{
  "status": "ok",
  "message": null,
  "data": {
    "total": 50,
    "has_next": true,
    "next_cursor": "cursor_abc123",
    "users": [
      {
        "user_id": "...",
        "username": "...",
        "display_name": "..."
      }
    ]
  }
}

Response Fields

FieldTypeDescription
totalintegerTotal number of results
has_nextbooleanWhether more results are available
next_cursorstringCursor for next page
usersarrayList of user objects (see section 1)

3. Get User Tweets

Retrieve tweets from a specific X user.

Endpoint

POST https://openapi.felo.ai/v2/x/user/tweets

Request Body

ParameterTypeRequiredDescription
x_user_idstringNoX user ID (provide either x_user_id or username)
usernamestringNoX username (provide either x_user_id or username)
limitintegerNoNumber of tweets to return
cursorstringNoPagination cursor
include_repliesbooleanNoWhether to include replies

Example

curl -X POST 'https://openapi.felo.ai/v2/x/user/tweets' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "elonmusk",
    "limit": 20
  }'

Success Response (200)

{
  "status": "ok",
  "message": null,
  "data": {
    "total": 20,
    "has_next": true,
    "next_cursor": "cursor_def456",
    "tweets": [
      {
        "id": "1234567890",
        "content": "Tweet content here...",
        "author": { "user_id": "...", "username": "elonmusk" },
        "created_at": "2026-03-09T12:00:00Z",
        "metrics": {
          "retweet_count": 1000,
          "favorite_count": 5000,
          "reply_count": 200,
          "quote_count": 100,
          "view_count": 500000,
          "bookmark_count": 50
        },
        "hashtags": ["AI"],
        "mentions": ["OpenAI"],
        "url": "https://x.com/elonmusk/status/1234567890",
        "lang": "en"
      }
    ]
  }
}

Tweet Object Fields

FieldTypeDescription
idstringTweet ID
contentstringTweet text content
authorobjectAuthor user object (see section 1)
created_atstringTweet creation time
metricsobjectEngagement metrics (see below)
repliesarrayReply tweets (if available)
conversation_idstringConversation thread ID
media_urlsarrayAttached media
hashtagsarray of stringsHashtags in the tweet
mentionsarray of stringsMentioned usernames
urlsarray of stringsURLs in the tweet
urlstringPermalink to the tweet
sourcestringTweet source (e.g. "Twitter Web App")
langstringTweet language code
is_replybooleanWhether this is a reply
in_reply_to_idstringID of the tweet being replied to
in_reply_to_user_idstringUser ID of the tweet being replied to
in_reply_to_usernamestringUsername of the tweet being replied to
quoted_tweetobjectQuoted tweet object (recursive)
retweeted_tweetobjectRetweeted tweet object (recursive)
is_limited_replybooleanWhether replies are limited

Metrics Object Fields

FieldTypeDescription
retweet_countintegerNumber of retweets
favorite_countintegerNumber of likes
reply_countintegerNumber of replies
quote_countintegerNumber of quotes
view_countintegerNumber of views
bookmark_countintegerNumber of bookmarks

4. Search Tweets

Search X tweets by keyword with advanced query support.

Endpoint

POST https://openapi.felo.ai/v2/x/tweet/search

Request Body

ParameterTypeRequiredDescription
querystringYesSearch query (supports advanced search syntax)
query_typestringNoQuery type filter
since_timeintegerNoStart time filter (Unix timestamp in seconds)
until_timeintegerNoEnd time filter (Unix timestamp in seconds)
limitintegerNoNumber of tweets to return
cursorstringNoPagination cursor

Example

curl -X POST 'https://openapi.felo.ai/v2/x/tweet/search' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "artificial intelligence",
    "limit": 20
  }'

Success Response (200)

{
  "status": "ok",
  "message": null,
  "data": {
    "total": 20,
    "has_next": true,
    "next_cursor": "cursor_ghi789",
    "tweets": [
      {
        "id": "...",
        "content": "...",
        "author": { "user_id": "...", "username": "..." },
        "created_at": "2026-03-09T12:00:00Z",
        "metrics": { "retweet_count": 100, "favorite_count": 500 }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
totalintegerTotal number of results
has_nextbooleanWhether more results are available
next_cursorstringCursor for next page
tweetsarrayList of tweet objects (see section 3)

5. Get Tweet Replies

Retrieve replies for specific tweets.

Endpoint

POST https://openapi.felo.ai/v2/x/tweet/replies

Request Body

ParameterTypeRequiredDescription
tweet_idsarray of stringsYesTweet ID(s) to get replies for
cursorstringNoPagination cursor
since_timeintegerNoStart time filter (Unix timestamp)
until_timeintegerNoEnd time filter (Unix timestamp)

Example

curl -X POST 'https://openapi.felo.ai/v2/x/tweet/replies' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "tweet_ids": ["1234567890"]
  }'

Success Response (200)

{
  "status": "ok",
  "message": null,
  "data": {
    "results": [
      {
        "tweet_id": "1234567890",
        "total": 10,
        "has_next": true,
        "next_cursor": "cursor_jkl012",
        "replies": [
          {
            "id": "...",
            "content": "Great tweet!",
            "author": { "user_id": "...", "username": "..." },
            "created_at": "2026-03-09T12:30:00Z"
          }
        ]
      }
    ]
  }
}

Response Fields

FieldTypeDescription
resultsarrayList of reply result objects
results[].tweet_idstringOriginal tweet ID
results[].totalintegerTotal number of replies
results[].has_nextbooleanWhether more replies are available
results[].next_cursorstringCursor for next page
results[].repliesarrayList of reply tweet objects (see section 3)

Error Codes

CodeHTTP StatusDescription
INVALID_API_KEY401API Key is invalid or revoked
X_SEARCH_FAILED400/500X search request failed (check parameters or downstream error)
RATE_LIMIT_EXCEEDED429Too many requests, please retry after a short delay
insufficient_credits402Insufficient credits to complete the request

Credits & Rate Limiting

Credit Costs

Each API call deducts credits based on the number of results returned:

EndpointCredit Cost
POST /x/user/info1 credit per user returned
POST /x/user/search1 credit per user returned
POST /x/user/tweets1 credit per tweet returned
POST /x/tweet/search1 credit per tweet returned
POST /x/tweet/replies1 credit per reply returned

Credits are deducted after the request completes, based on the actual number of results. If a request returns 0 results, no credits are deducted.

Minimum balance requirement: Your account must have at least 10 credits to make any X API request. Requests made with fewer than 10 credits will be rejected with HTTP 402.

Rate Limiting

Non-paid-subscriber accounts with a credit balance under 100 are subject to rate limiting:

WindowLimit
10 seconds1 request
1 minute3 requests
10 minutes10 requests

Paid subscribers are exempt from rate limiting regardless of credit balance.

When rate limited, the API returns HTTP 429. The Retry-After header indicates the suggested wait time in seconds.