POST

User Posts

/v1/twitter/user/posts

Fetch the latest posts from any Twitter user's timeline. Returns tweets, retweets, replies, and quotes with full metadata.

Request Parameters

ParameterTypeRequiredDescription
usernamestringYesTwitter username (without @)
limitintNoMax results (1-100) (default: 20)

Example

curl -X POST https://query-data-api.notpeople.ai/v1/twitter/user/posts \
  -H "X-API-Key: tw_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"username": "elonmusk", "limit": 10}'

Response Schema

All responses include success, data, and usage fields.

FieldTypeDescription
metadata.usernamestringUsername queried
metadata.with_repliesboolWhether replies were included
metadata.posts_foundintNumber of posts returned
metadata.has_pinnedboolWhether the user has a pinned post
metadata.elapsed_msintRequest duration in milliseconds
pinned_postobject | nullPinned post object (same fields as data posts)
post_idstringUnique tweet ID
user_idstringAuthor user ID
usernamestringAuthor handle
namestringAuthor display name
textstringTweet text content
created_atstringHuman-readable timestamp
timestampintUnix timestamp
post_typestringtweet | retweet | reply | quote
likes_countintNumber of likes
retweets_countintNumber of retweets
replies_countintNumber of replies
views_countintNumber of views
is_blue_verifiedboolAuthor verification status
profile_image_urlstringAuthor profile picture URL
reply_to_post_idstring | nullID of the post being replied to
reply_to_userstring | nullUsername of the user being replied to
reply_to_postobject | nullFull post object being replied to
is_pinnedboolWhether the post is pinned
mediaarrayAttached media [{type, url}]
quoted_postobject | nullQuoted tweet data if post_type is quote

Example Response

{
  "success": true,
  "metadata": {
    "username": "elonmusk",
    "with_replies": true,
    "posts_found": 1,
    "has_pinned": true,
    "elapsed_ms": 5366
  },
  "pinned_post": {
    "post_id": "2036665153778000143",
    "user_id": "44196397",
    "username": "elonmusk",
    "name": "Elon Musk",
    "text": "Optimus",
    "created_at": "Wed Mar 25 04:43:06 +0000 2026",
    "timestamp": 1774413786,
    "post_type": "tweet",
    "likes_count": 253368,
    "retweets_count": 25824,
    "replies_count": 11426,
    "is_blue_verified": true,
    "profile_image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg",
    "views_count": 78502620,
    "reply_to_post_id": null,
    "reply_to_user": null,
    "reply_to_post": null,
    "is_pinned": true,
    "media": [
      { "type": "video", "url": "https://pbs.twimg.com/amplify_video_thumb/.../img.jpg" }
    ],
    "quoted_post": null
  },
  "data": [
    {
      "post_id": "2036665153778000143",
      "user_id": "44196397",
      "username": "elonmusk",
      "name": "Elon Musk",
      "text": "Optimus",
      "created_at": "Wed Mar 25 04:43:06 +0000 2026",
      "timestamp": 1774413786,
      "post_type": "tweet",
      "likes_count": 253368,
      "retweets_count": 25824,
      "replies_count": 11426,
      "is_blue_verified": true,
      "profile_image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg",
      "views_count": 78502620,
      "reply_to_post_id": null,
      "reply_to_user": null,
      "reply_to_post": null,
      "is_pinned": true,
      "media": [
        { "type": "video", "url": "https://pbs.twimg.com/amplify_video_thumb/.../img.jpg" }
      ],
      "quoted_post": null
    }
  ],
  "usage": {
    "unique_posts": 82,
    "limit": 6000,
    "remaining": 5918
  }
}

Try this endpoint live

Sign up for free to try endpoints directly from the docs. No credit card required.

Create Free Account