GetXAPI
Users

User Media

Get tweets that contain media for a user

GET /twitter/user/media

Query Parameters

ParameterTypeRequiredDescription
userNamestringYesScreen name (without @)
cursorstringNoPagination cursor

Notes

  • Returns tweets that contain media (photos, videos, GIFs).
  • Pagination uses next_cursor until has_more is false.

Response (200)

{
  "userName": "druv_kotwani",
  "userId": "1345154135381794816",
  "tweet_count": 13,
  "has_more": true,
  "next_cursor": "DAABCgABHAYpKoW___0...",
  "media": [
    {
      "type": "tweet",
      "id": "2010705621524292007",
      "text": "soon people will realize, claude code is a beast.",
      "media": [
        {
          "type": "photo",
          "url": "https://pbs.twimg.com/media/G-d19nhbMAAswrV.jpg"
        }
      ],
      "author": {
        "userName": "druv_kotwani"
      }
    }
  ]
}

Error Responses

400 - Missing userName

{
  "error": "Missing required query param: userName"
}

Example

curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/user/media?userName=druv_kotwani"

# With pagination
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/user/media?userName=druv_kotwani&cursor=DAABCgABHAYpKoW___0..."

On this page