# Scrape Newest X (Twitter) Comments

**Use case:** 

Collect the most recent replies under an X (Twitter) post, sorted newest first, with author, text, timestamp, and engagement. Requires your X cookies.

## Input

```json
{
  "twitterUrl": "https://x.com/jack/status/20",
  "cookies": "<YOUR_SECRET>",
  "maxDepth": 0,
  "onlyDirectReplies": true,
  "sortBy": "newest"
}
```

## Output

```json
{
  "tweet_id": {
    "label": "Tweet ID",
    "format": "text"
  },
  "tweet_url": {
    "label": "Tweet URL",
    "format": "link"
  },
  "conversation_id": {
    "label": "Conversation ID",
    "format": "text"
  },
  "in_reply_to_tweet_id": {
    "label": "In Reply To Tweet ID",
    "format": "text"
  },
  "is_quote_tweet": {
    "label": "Is Quote Tweet",
    "format": "boolean"
  },
  "quoted_tweet": {
    "label": "Quoted Tweet",
    "format": "json"
  },
  "user.id": {
    "label": "User ID",
    "format": "text"
  },
  "user.name": {
    "label": "Username",
    "format": "text"
  },
  "user.screen_name": {
    "label": "User Tag",
    "format": "text"
  },
  "user.account_created_at": {
    "label": "Account Created At",
    "format": "date"
  },
  "user.description": {
    "label": "User Description",
    "format": "text"
  },
  "user.location": {
    "label": "Location",
    "format": "text"
  },
  "user.followers_count": {
    "label": "Followers Count",
    "format": "number"
  },
  "user.following_count": {
    "label": "Following Count",
    "format": "number"
  },
  "user.favourites_count": {
    "label": "Favourites Count",
    "format": "number"
  },
  "user.tweet_count": {
    "label": "Tweet Count",
    "format": "number"
  },
  "user.media_count": {
    "label": "Media Count",
    "format": "number"
  },
  "user.lists_count": {
    "label": "Lists Count",
    "format": "number"
  },
  "user.profile_image": {
    "label": "Profile Image",
    "format": "image"
  },
  "user.profile_banner": {
    "label": "Profile Banner",
    "format": "image"
  },
  "user.profile_image_shape": {
    "label": "Profile Image Shape",
    "format": "text"
  },
  "user.is_blue_verified": {
    "label": "Blue Verified",
    "format": "boolean"
  },
  "user.is_verified": {
    "label": "Verified",
    "format": "boolean"
  },
  "user.is_protected": {
    "label": "Protected Account",
    "format": "boolean"
  },
  "user.default_profile": {
    "label": "Default Profile",
    "format": "boolean"
  },
  "user.default_profile_image": {
    "label": "Default Profile Image",
    "format": "boolean"
  },
  "user.pinned_tweet_ids": {
    "label": "Pinned Tweet IDs",
    "format": "json"
  },
  "user.profile_url": {
    "label": "Profile URL",
    "format": "link"
  },
  "user.professional_info": {
    "label": "Professional Info",
    "format": "json"
  },
  "user.tipjar_settings": {
    "label": "Tipjar Settings",
    "format": "json"
  },
  "text": {
    "label": "Tweet Content",
    "format": "text"
  },
  "reply_to_username": {
    "label": "Reply To",
    "format": "text"
  },
  "reply_to_user_id": {
    "label": "Reply To User ID",
    "format": "text"
  },
  "favorite_count": {
    "label": "Likes",
    "format": "number"
  },
  "reply_count": {
    "label": "Replies",
    "format": "number"
  },
  "retweet_count": {
    "label": "Retweets",
    "format": "number"
  },
  "quote_count": {
    "label": "Quotes",
    "format": "number"
  },
  "bookmark_count": {
    "label": "Bookmarks",
    "format": "number"
  },
  "views_count": {
    "label": "Views",
    "format": "number"
  },
  "created_at": {
    "label": "Created At",
    "format": "date"
  },
  "lang": {
    "label": "Language",
    "format": "text"
  },
  "source": {
    "label": "Source",
    "format": "text"
  },
  "media": {
    "label": "Media",
    "format": "json"
  },
  "entities": {
    "label": "Entities",
    "format": "json"
  },
  "has_community_notes": {
    "label": "Has Community Notes",
    "format": "boolean"
  },
  "is_edited": {
    "label": "Is Edited",
    "format": "boolean"
  },
  "edits_remaining": {
    "label": "Edits Remaining",
    "format": "text"
  },
  "is_translatable": {
    "label": "Is Translatable",
    "format": "boolean"
  },
  "possibly_sensitive": {
    "label": "Possibly Sensitive",
    "format": "boolean"
  },
  "possibly_sensitive_editable": {
    "label": "Sensitive Editable",
    "format": "boolean"
  },
  "unmention_data": {
    "label": "Unmention Data",
    "format": "json"
  },
  "affiliates_highlighted_label": {
    "label": "Affiliates Label",
    "format": "json"
  },
  "parody_commentary_fan_label": {
    "label": "Parody Label",
    "format": "text"
  },
  "edit_history": {
    "label": "Edit History",
    "format": "json"
  }
}
```

## About this Actor

This example demonstrates how to use [Twitter (X) Comment Scraper](https://apify.com/muhammetakkurtt/twitter-x-comment-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/muhammetakkurtt/twitter-x-comment-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/muhammetakkurtt/twitter-x-comment-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
