# TwexAPI Twitter Viewer API reference

> 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…

Source: https://osinttools.io/apis/twexapi-twitter-viewer/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/twexapi-twitter-viewer/

- Base URL: https://api.twexapi.io
- Authentication: Bearer token in the `Authorization` header. Get a key: https://twexapi.io/ Reads need only the API key; write actions also need the account's cookie or auth_token.
- Free tier: a free trial only
- Pricing: Credits
- Rate limits: No fixed number: the effective limit depends on endpoint type, account tier and platform load. Exceeded limits return 429, sometimes with Retry-After.
- Vendor docs: https://docs.twexapi.io/api-reference/overview
- OpenAPI spec: https://docs.twexapi.io/openapi.json

## Overview

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.

## Errors

| Status | Meaning |
| --- | --- |
| 422 | Validation error |
| 429 | Rate limit exceeded; wait for Retry-After when present |

## Users

### About information for an account: country it is based in, creation date, verification and username changes.

`GET /twitter/{screen_name}/about`

- Takes: Username
- Footprint: passive (the target is not contacted)

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `screen_name` | path | string | yes | The screen name (handle) of the account Example: example_user |

Response fields:

- `code` (integer): Status code
- `msg` (string): Response message
- `data.user_id` (string): Account id
- `data.name` (string): Display name
- `data.screen_name` (string): Username (handle)
- `data.avatar` (string): Profile image URL
- `data.created_at` (string): Account creation date in Twitter format
- `data.account_based_in` (string): Country or region where the account is based
- `data.location_accurate` (boolean): Whether the location information is accurate
- `data.is_blue_verified` (boolean): Whether the account has the paid verification badge
- `data.verification` (boolean): Whether the account is verified
- `data.affiliate_username` (string): Affiliated username, for example a business account
- `data.source` (string): Source of account creation
- `data.username_changes_count` (integer): Number of times the username has changed

```bash
curl 'https://api.twexapi.io/twitter/example_user/about' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "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
  }
}
```

## Search

### Advanced tweet search with cursor pagination, up to 20 tweets per page.

`POST /twitter/advanced_search/page`

- Takes: Username
- Footprint: 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.

Response fields:

- `code` (integer): Status code
- `msg` (string): Response message
- `data[]` (object): Tweets on this page
- `data[].tweet_id` (string): Tweet id
- `data[].text` (string): Tweet text
- `data[].created_at` (string): Creation time in Twitter format
- `data[].created_at_datetime` (string): Creation time as ISO 8601
- `data[].lang` (string): Language of the tweet
- `data[].favorite_count` (integer): Number of likes
- `data[].retweet_count` (integer): Number of retweets
- `data[].reply_count` (integer): Number of replies
- `data[].view_count` (string): Number of views
- `data[].hashtags[]` (string): Hashtags in the tweet
- `data[].urls[]` (string): URLs in the tweet
- `data[].in_reply_to_screen_name` (string): Screen name replied to
- `data[].user` (object): The account that posted the tweet
- `has_next_page` (boolean): Whether another page is available
- `next_cursor` (string): Cursor for the next page when has_next_page is true

```bash
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"}'
```

Example response (200):

```json
{
  "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"
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
