Skip to content
OSINTtools.io

TwexAPI Twitter Viewer API

Free viewer that shows a public X profile, its counts and latest 20 posts without signing in to X.

Base URL
https://api.twexapi.io
Sign-in
Bearer token
Free tier
Free trial
Pricing
Credits
Format
REST
Endpoints
2

Compiled by OSINTtools.io editors from docs.twexapi.io · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

TwexAPI is a REST API for public X (Twitter) data: user profiles, advanced tweet search, followers, replies, threads, lists, communities and more, with write actions that need the caller's own cookie or auth_token. This reference covers two read endpoints: the user About lookup and the advanced tweet search. The docs describe about 60 other endpoints; their pages and the OpenAPI file are linked below.

Calls go to https://api.twexapi.io with Authorization: Bearer YOUR_API_KEY. Successful responses use an envelope of code, msg and data; list endpoints add has_next_page and next_cursor for cursor pagination.

The docs describe prepaid credits, with 20,000 free credits to start and about $0.05 per 1,000 reads. Exceeded limits return HTTP 429, sometimes with a Retry-After header.

Quick start

  1. Get a key

    Create an account with TwexAPI Twitter Viewer and copy your bearer token (free trial). Where to get it

  2. Make your first request

    About information for an account: country it is based in, creation date, verification and username changes.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.twexapi.io/twitter/example_user/about' \
      -H 'Authorization: Bearer YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    {
      "code": 200,
      "msg": "success",
      "data": {
        "user_id": "1000000001",
        "name": "Example User",
        "screen_name": "example_user",
        "avatar": "https://example.com/avatar.jpg",
        "created_at": "Tue Jun 02 20:12:29 +0000 2009",
        "account_based_in": "Canada",
        "location_accurate": true,
        "is_blue_verified": false,
        "verification": false,
        "username_changes_count": 1
      }
    }

Authentication

Send your token in the Authorization header as Bearer YOUR_TOKEN.

Reads need only the API key; write actions also need the account's cookie or auth_token.

Get a key from TwexAPI Twitter Viewer

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

No fixed number: the effective limit depends on endpoint type, account tier and platform load. Exceeded limits return 429, sometimes with Retry-After.

Free trial. Pricing: credits.

Errors

StatusMeaning
422Validation error
429Rate limit exceeded; wait for Retry-After when present

Users

Returns the account's About data, including the country or region where it is based and whether that location is accurate.

Path parameters

screen_namestringrequiredtakes your username

The screen name (handle) of the account

Example: example_user
Response fields · 14Show

codeinteger

Status code

msgstring

Response message

user_idstring

Account id

namestring

Display name

screen_namestring

Username (handle)

avatarstring

Profile image URL

created_atstring

Account creation date in Twitter format

account_based_instring

Country or region where the account is based

location_accurateboolean

Whether the location information is accurate

is_blue_verifiedboolean

Whether the account has the paid verification badge

verificationboolean

Whether the account is verified

affiliate_usernamestring

Affiliated username, for example a business account

sourcestring

Source of account creation

username_changes_countinteger

Number of times the username has changed

curl 'https://api.twexapi.io/twitter/example_user/about' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "code": 200,
  "msg": "success",
  "data": {
    "user_id": "1000000001",
    "name": "Example User",
    "screen_name": "example_user",
    "avatar": "https://example.com/avatar.jpg",
    "created_at": "Tue Jun 02 20:12:29 +0000 2009",
    "account_based_in": "Canada",
    "location_accurate": true,
    "is_blue_verified": false,
    "verification": false,
    "username_changes_count": 1
  }
}
  • Takes: Username
  • Passive: the target is not contacted
  • Cost: $0.05 per 1,000 tweets

Builds the query from searchTerms (for example from:handle plus keywords). Pass next_cursor from the previous response to continue. The docs price it at $0.05 per 1,000 tweets.

Request body (JSON) · 3Show

searchTermsarrayalways present

Search terms used to build the query, for example from:handle

sortBystringalways present

Latest or Top; default Latest

next_cursorstring

Cursor from the previous page; leave out for the first page

Response fields · 18Show

codeinteger

Status code

msgstring

Response message

data[]object

Tweets on this page

tweet_idstring

Tweet id

textstring

Tweet text

created_atstring

Creation time in Twitter format

created_at_datetimestring

Creation time as ISO 8601

langstring

Language of the tweet

favorite_countinteger

Number of likes

retweet_countinteger

Number of retweets

reply_countinteger

Number of replies

view_countstring

Number of views

hashtags[]string

Hashtags in the tweet

urls[]string

URLs in the tweet

in_reply_to_screen_namestring

Screen name replied to

userobject

The account that posted the tweet

has_next_pageboolean

Whether another page is available

next_cursorstring

Cursor for the next page when has_next_page is true

curl -X POST 'https://api.twexapi.io/twitter/advanced_search/page' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"searchTerms":["from:example_user","example keyword"],"sortBy":"Latest"}'
Replace YOUR_API_KEY with your key
Response
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "tweet_id": "1000000000000000001",
      "text": "Example post text",
      "created_at": "Mon Jun 17 03:51:48 +0000 2024",
      "created_at_datetime": "2024-06-17T03:51:48.000Z",
      "lang": "en",
      "favorite_count": 3,
      "retweet_count": 1,
      "reply_count": 0,
      "view_count": "120",
      "hashtags": [
        "example"
      ],
      "urls": []
    }
  ],
  "has_next_page": true,
  "next_cursor": "EXAMPLE_CURSOR"
}