How to get a user's posts from X (Twitter) with Python

Pass the username and page with data.next, 20 posts a page. Ten pages are 200 posts for 10 calls and $0.02; on X's own pay-per-use API, reading 200 posts is reported at about $1.

Updated 2026-11-22·This page as Markdown

Page through the posts

screen_name is the handle without @. If you store numeric user IDs, pass rest_id instead; IDs this long stay strings so they are not rounded. The cursor in data.next goes back unchanged.

X post list API·GET /v1/x/posts/list·$0.002 a call

curl "https://xtikapi.com/v1/x/posts/list?screen_name=NASA" \
  -H "Authorization: Bearer YOUR_API_KEY"
Recorded response (lists keep the first two items)
{
  "data": {
    "items": [
      {
        "id": "5197244563152330773",
        "text": "Example text",
        "author": {
          "id": "41089034",
          "username": "example_user",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg",
          "followers": 92213506
        },
        "createdAt": "2026-11-18T21:40:00.000Z",
        "likeCount": 1521,
        "commentCount": 63,
        "shareCount": 243,
        "viewCount": 218599,
        "url": "https://example.com/link"
      },
      {
        "id": "5197231336585028234",
        "text": "Example text",
        "author": {
          "id": "41089034",
          "username": "example_user",
          "name": "Example name",
          "avatar": "https://example.com/image.jpg",
          "followers": 92213506
        },
        "createdAt": "2026-11-18T20:47:24.000Z",
        "likeCount": 506,
        "commentCount": 41,
        "shareCount": 53,
        "viewCount": 193300,
        "url": "https://example.com/link"
      }
    ],
    "has_more": true,
    "next": {
      "cursor": "DAAHCgABHXc0…"
    }
  },
  "meta": {
    "request_id": "example",
    "endpoint": "x.posts.list",
    "normalized": true,
    "unavailable": [
      "cover"
    ],
    "billing": {
      "charged": true,
      "amount": 0.002,
      "balance": 4.98
    }
  }
}

What the example costs

Calls: 10
Price: $0.002
Subtotal: $0.02
Total
Calls: 10
Price: —
Subtotal: $0.02

Failed calls and timeouts are not charged. A new account with a verified email gets $0.50 of trial balance, enough to run this example.

Good to know

  • A page held 20 posts in our test on 2026-11-22, and page two had no overlap.
  • Each post carries likes, replies, reposts and views; posts without media list cover in meta.unavailable.
  • The X comparison is in our answer on X API pricing, with its sources.

Endpoints

More about X

Questions

How much does this cost with XTikAPI?

The example here is 10 calls, $0.02 in total. Failed calls and timeouts are free, and a new account with a verified email gets $0.50 of trial balance.

Do I need an X developer account?

No. The call reads public posts with an API key from this site, with no developer portal, app review or monthly plan.