Skip to main content
GET
/
v1
/
twitter
/
users
/
{username}
/
latest_tweets
Get user tweets
curl --request GET \
  --url https://scrapebadger.com/v1/twitter/users/{username}/latest_tweets \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "1234567890123456789",
      "text": "Hello, world! This is a tweet.",
      "created_at": "Wed Oct 10 20:19:24 +0000 2018",
      "full_text": "<string>",
      "lang": "en",
      "user_id": "44196397",
      "username": "elonmusk",
      "user_name": "Elon Musk",
      "favorite_count": 0,
      "retweet_count": 0,
      "reply_count": 0,
      "quote_count": 0,
      "view_count": 123,
      "bookmark_count": 123,
      "favorited": false,
      "retweeted": false,
      "bookmarked": false,
      "possibly_sensitive": false,
      "is_quote_status": false,
      "is_retweet": false,
      "conversation_id": "<string>",
      "in_reply_to_status_id": "<string>",
      "in_reply_to_user_id": "<string>",
      "media": [
        {
          "media_key": "<string>",
          "type": "photo",
          "url": "<string>",
          "preview_image_url": "<string>",
          "width": 123,
          "height": 123,
          "duration_ms": 123,
          "view_count": 123,
          "alt_text": "<string>"
        }
      ],
      "urls": [
        {
          "url": "<string>",
          "expanded_url": "<string>",
          "display_url": "<string>",
          "unwound_url": "<string>"
        }
      ],
      "hashtags": [
        {
          "text": "AI",
          "indices": [
            123
          ]
        }
      ],
      "user_mentions": [
        {
          "id": "<string>",
          "username": "<string>",
          "name": "<string>",
          "indices": [
            123
          ]
        }
      ],
      "poll": {
        "id": "<string>",
        "voting_status": "open",
        "end_datetime": "<string>",
        "duration_minutes": 123,
        "options": [
          {
            "position": 123,
            "label": "<string>",
            "votes": 123
          }
        ]
      },
      "place": {
        "id": "<string>",
        "full_name": "San Francisco, CA",
        "name": "San Francisco",
        "country": "United States",
        "country_code": "US",
        "place_type": "city"
      },
      "quoted_status_id": "<string>",
      "retweeted_status_id": "<string>",
      "edit_tweet_ids": [
        "<string>"
      ],
      "editable_until_msecs": 123,
      "edits_remaining": 123,
      "is_edit_eligible": true,
      "has_card": true,
      "thumbnail_url": "<string>",
      "thumbnail_title": "<string>",
      "has_community_notes": true,
      "source": "Twitter Web App"
    }
  ],
  "next_cursor": "<string>"
}

Authorizations

x-api-key
string
header
required

Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys.

Path Parameters

username
string
required

The username (screen name) of the user.

Example:

"elonmusk"

Query Parameters

cursor
string

Pagination cursor for fetching the next page of results.

Response

Successfully retrieved user tweets.

Paginated list of tweets.

data
object[] | null

Array of tweet objects.

next_cursor
string | null

Cursor for fetching the next page. Null if no more results.