Twitter User Tweets API - Get a User's Timeline
FetchLayer fetchlayer.dev Sign in

Fetch tweets for a user

Retrieve timeline tweets for a user handle with full engagement data and pagination support.

POST /user-tweets Content
https://api.fetchlayer.dev/twitter/user-tweets
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

handle string required

Twitter handle without @.

count number optional

Number of tweets (max 100). (default: 25)

cursor string optional

Pagination cursor for next page.

Response Fields

user-tweets

Fetch tweets for a user

tweets[].id string

Tweet ID.

tweets[].text string

Full tweet text.

tweets[].createdAt string

ISO 8601 timestamp.

tweets[].likeCount number

Like count.

tweets[].replyCount number

Reply count.

tweets[].retweetCount number

Retweet count.

tweets[].viewCount number

Impression count.

tweets[].url string

Canonical tweet URL.

cursor string

Pagination cursor.

Request

curl -X POST "https://api.fetchlayer.dev/twitter/user-tweets" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"handle":"openai","count":3}'

Response

{
  "tweets": [
    {
      "id": "1942900000000000000",
      "text": "Introducing GPT-4.1 — our most capable model yet, with improved reasoning, coding, and instruction following. Rolling out to API users starting today.",
      "createdAt": "2026-07-01T14:00:00.000Z",
      "likeCount": 12500,
      "replyCount": 2100,
      "retweetCount": 3400,
      "viewCount": 1200000,
      "url": "https://x.com/OpenAI/status/1942900000000000000"
    },
    {
      "id": "1942800000000000000",
      "text": "Sora is now available to all ChatGPT Plus and Pro subscribers. Create realistic and imaginative videos from text instructions.",
      "createdAt": "2026-06-30T16:00:00.000Z",
      "likeCount": 9800,
      "replyCount": 1600,
      "retweetCount": 2800,
      "viewCount": 950000,
      "url": "https://x.com/OpenAI/status/1942800000000000000"
    }
  ],
  "cursor": "DAABCgABF8zK9v__-X0"
}