Skip to main content

API Response Format: User and Tweet Object Schemas

Sorsa API returns all data as JSON. This page documents the response structure, core data objects, field types, and pagination model so you know exactly what to expect from every endpoint.

Conventions

Before diving into specific objects, here are the formatting rules that apply across the entire API. IDs are strings. All X/Twitter IDs (id, conversation_id_str, in_reply_to_tweet_id, etc.) are returned as strings, not integers. X uses Snowflake IDs, which are 64-bit numbers that exceed JavaScript’s Number.MAX_SAFE_INTEGER. Returning them as strings prevents silent precision loss in browsers, Node.js, and any language that represents JSON numbers as floating-point. Core timestamps are ISO 8601 strings. User and Tweet created_at fields use values such as 2026-03-06T12:00:00Z. Consult the endpoint schema for other date fields; do not assume a verification result or relationship date has the same format. Booleans are strict. Status flags like verified, is_reply, protected, and can_dm are always true or false, never 0/1 or "true"/"false". Null and missing fields. Handle optional fields defensively: distinguish a missing value from a measured zero or false. For optional arrays such as bio_urls and pinned_tweet_ids, normalize null or missing values to an empty list when iterating (user.get("bio_urls") or [] in Python; user.bio_urls ?? [] in JavaScript). Compact response models omit fields present on a full User object.

Response wrappers

Endpoints that return a single object (like /info or /tweet-info) return the object directly at the top level. Endpoints that return lists use one of the following wrapper structures. UsersResponse - used by /followers, /follows, /verified-followers, /retweeters, /search-users, /list-members, and /list-followers. /community-members uses the same wrapper keys but returns compact CommunityUser objects.
TweetsResponse - used by /user-tweets, /comments, /quotes, /search-tweets, /mentions, /list-tweets, /community-tweets, /community-search-tweets
FollowersResponse - used by /new-followers-7d, /new-following-7d, and /top-following. /top-followers uses TopFollowersResponse, with compact profiles and a score field.
Note: FollowersResponse does not include next_cursor. It returns the full result set in a single response.

The User object

The User object represents an X/Twitter account profile. It is returned directly by /info, as an array element in list endpoints, and nested inside every Tweet object as the user field.

The Follower object

The Follower object extends the User object with one additional field. It is returned by /new-followers-7d, /new-following-7d, and /top-following. /top-followers returns a separate compact model with score.

The Tweet object

The Tweet object contains the full content, metadata, engagement metrics, and nested relationships for a single tweet. It is returned directly by /tweet-info and as array elements in tweet list endpoints.
Content fields Engagement metrics Thread and reply context Nested objects The quoted_status and retweeted_status fields contain complete Tweet objects, including their own user, entities, and engagement metrics. This means you get all related data in a single API call without needing to make follow-up requests.

The TweetEntity object

Each item in the entities array represents a media attachment or embedded link within a tweet.

Cursor-based pagination

Paginated list endpoints use cursor-based pagination. Batch lookups and the crypto analytics lists described above do not use a cursor. This approach is more reliable than offset-based pagination for dynamic feeds where new content is constantly being added. How it works:
  1. Send your initial request without a cursor.
  2. The response includes a next_cursor field along with the data.
  3. To fetch the next page, include the next_cursor value in your next request.
  4. When next_cursor is null or absent, you have reached the end of the data.
GET endpoints accept the cursor as a query parameter:
POST endpoints accept the cursor in the JSON body:
Python example: paginating through all followers
For a deeper look at pagination strategies and performance tips, see Pagination.

Next steps

  • Pagination - Advanced pagination patterns and best practices
  • Error Codes - How error responses are structured
  • API Reference - Full endpoint schemas with request and response examples